Re: Help on disassembler/decompilers

ch@dce.ie (Charles Bryant)
Fri, 14 Sep 90 18:16:16 GMT

          From comp.compilers

Related articles
[14 earlier articles]
Re: Help on disassembler/decompilers Jonathan.Bowen@prg.oxford.ac.uk (Jonathan Bowen) (1990-09-13)
Re: Help on disassembler/decompilers nreadwin@miclon.uucp (1990-09-13)
Re: Help on disassembler/decompilers td@alice.UUCP (1990-09-13)
Re: Help on disassembler/decompilers kym@bingvaxu.cc.binghamton.edu.cc.binghamton.edu (1990-09-14)
Re: Help on disassembler/decompilers hankd@dynamo.ecn.purdue.edu (1990-09-14)
Re: Help on disassembler/decompilers hawley@icot32.icot.or.jp (1990-09-15)
Re: Help on disassembler/decompilers ch@dce.ie (1990-09-14)
Re: Help on disassembler/decompilers kym@bingvaxu.cc.binghamton.edu.cc.binghamton.edu (1990-09-15)
Re: Help on disassembler/decompilers roland@ai.mit.edu (1990-09-16)
Re: Help on disassembler/decompilers raulmill@usc.edu (1990-09-16)
Re: Help on disassembler/decompilers ch@dce.ie (1990-09-18)
Re: Help on disassembler/decompilers ctl8588@rigel.tamu.edu (1990-09-18)
Re: Help on disassembler/decompilers megatest!djones@decwrl.dec.com (1990-09-18)
[2 later articles]
| List of all articles for this month |

Newsgroups: comp.compilers
From: ch@dce.ie (Charles Bryant)
Keywords: assembler, debug
Organization: Datacode Communications Ltd, Dublin, Ireland
References: <HOW.90Sep5173755@sundrops.ucdavis.edu> <6839.26ea3b0e@vax1.tcd.ie> <3972@bingvaxu.cc.binghamton.edu>
Date: Fri, 14 Sep 90 18:16:16 GMT

In article <3972@bingvaxu.cc.binghamton.edu> vu0310@bingvaxu.cc.binghamton.edu.cc.binghamton.edu (R. Kym Horsell) writes:
>There's no _unique_ mapping from HLL into assembler, or from assembler into
>assembler for that matter, either! In _principle_ translation between
>assembler and an HLL is no harder than the other way 'round. You can't even
>say that "assembly language is close to the machine & you can do things in
>it that you can't in HLLs" -- after all, assembly and HLL are both capable
>of emulating Turning machines, right?


Well how would you translate this C function into Pascal.


typedef struct list {
struct list *next;
int item;
} list;


list *head;


insert(list *newelem)
{
list **p;
for (p = &head; *p; p = &(*p)->next)
if ( (*p)->item >= newelem->item) break;
newelem->next = *p;
*p = newelem;
}


It seems to me that you either need an extra node, or you have to simulate the
pointers in an array. If you manage the Pascal, try BASIC (even with no
pointer operations at all it is still "equivalent" to C).
--
Charles Bryant (ch@dce.ie)
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.