RE: [colorforth] Running the x18 simulator from Xwindows Colorforth?
- Subject: RE: [colorforth] Running the x18 simulator from Xwindows Colorforth?
- From: John Drake <jmdrake_98@xxxxxxxxx>
- Date: Wed, 12 Jul 2006 16:41:02 -0700 (PDT)
--- Roman Pavlyuk <roman.pavlyuk@xxxxxxxxx> wrote:
> Hi Ray,
>
> One of key differences between native and Windows
> ColorForth memory models
> is in the fact that it's impossible (or I just do
> not know how?) to allocate
> memory below 64K limit under Windows (using
> VirtualAlloc). So if there's
> code that's using absolute addresses, it won't work
> properly. Usually here
> are variables where you can just set base address,
> but I did not play with
> x18, so I cannot tell you any details.
>
> BR,
> Roman
>
> P.S. I'm glad to see some activity inthis list :)
Hello Roman.
I actually got this working. I'm sorry. I thought
I had reported that to the list. Basically I change
how "block" works. Here's the trick. Magenta
variables actually point to a memory location inside
the block of code where they are defined. So if
you put a magenta variable at the beginning of a
block, then when you access it the address it returns
is 1 plus the block offset.
Look at the block definition in "block 30".
http://www.dnd.utwente.nl/~tim/colorforth/ether-ip-udp/oninshiko/net.html
I changed the code:
( colors etc )
: block 100 * ;
: white ffffff color ;
.
.
.
To read:
var blk 0 ( colors etc )
: block -30 + 100 * blk + -1 + ;
: white ffffff color ;
.
.
.
After doing this all code that uses "block" works
just fine. All of the x18 experimentation /
development I've done recently I did using
Windows ColorForth, including a new/improved
x18 disassembler.
Regards,
John M. Drake
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com