[ColorForth] switch
- Subject: [ColorForth] switch
- From: Mark Slicker <maslicke@xxxxxxxxxxx>
- Date: Wed, 7 Nov 2001 13:29:17 -0500 (EST)
Hello,
I am trying to implement 'switch' in colorForth. This is what I have:
[ macro ]
: switch $808c8d 3, here 8 + , [drop] $21ff 2, ; [ forth ]
: f0 0 ;
: f1 1 ;
: f switch f0 f1
The machine code above is:
lea ecx, [disp+eax+eax*4] ; where disp is calculated above
lods ; drop
jmp [ecx]
It seems correct, but the result is certainly not. Maybe I'm making an
obvious mistake?
I've put the source at
http://www.oakland.edu/~maslicke/colorforth/switch.blk , in case you want
to try it.
Mark
------------------------
To Unsubscribe from this list, send mail to Mdaemon@xxxxxxxxxxxxxxxxxx with:
unsubscribe ColorForth
as the first and only line within the message body
Problems - List-Admin@xxxxxxxxxxxxxxxxxx
Main ColorForth site - http://www.colorforth.com