Re: New Linux 4word

Terry Loveall <[email protected]>
Newsgroups gmane.comp.lang.forth.colorforth
Message-ID <[email protected]>
On Fri, 8 Apr 2005 11:57:41 +0200
[email protected] (Albert van der Horst) wrote:
> An assembler is the proper starting point. There is no Metacompiler
> without assembler. And an assembler may be enough.
> Unless of course you think you have a nice source if it is sprinkled
> with
>         cd45 2,      12 1, 3135 2,

While porting 4word to linux I encountered the above problem of inline
opcode compilation without comments. Had to go back and decode the 16-bit mode
opcodes and translate them into 32-bit mode opcodes.

Rather than putting together a sub-set of an assembler I just commented the
new inline opcodes with their intel mneumonics. Maximum efficiency of size and
readability.

Old 16-bit definition:
macro : 2*    [ $ e0d166 L ] 3, ] ;

New 32-bit definition:
macro : 2*    [ $ e0d1 L ( shl eax,1) ] w, ] ;

The really tough discipline is keeping the comments up to date...

Regards,
Terry Loveall
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.