Re: Multi-Platform Support
Bernie Ryan writes:
> If Euphoria uses the flat address model then can you tell me what
> segment address it uses ?
If you trace execution of demo\dos32\hardint.ex you will see what the
code and data segments are. I think they may be different from
run to run, and I think they are different from each other,
although they *map* to the *same* physical memory.
On the 386 and up, running in 32-bit mode, a full machine
address is 48 bits:
16 bit segment number + 32-bit offset within that segment
In general, only the operating system cares about the
segment number. With the 32-bit flat address model used by Euphoria,
it is *rarely* of any importance to your program what these
segment values are, even when you are mucking about
at the machine level with peeks/pokes etc.
99.9% of the time all you care about is the 32-bit *offset* part of
an address. In ancient 16-bit machine-level programming, you
are constantly dealing with segment numbers, because a segment
can only contain 64K bytes, so any large program *must* use
many segments. This was a pain. You do not have to worry about
it anymore when you are working with *one* huge segment of
4Giga bytes.
Euphoria (actually Causeway) arranges for low 32-bit memory
addresses to map into the 0..640K conventional memory range
without any need for old-style 16-bit segments and 16-bit offsets.
Regards,
Rob Craig
Rapid Deployment Software
http://members.aol.com/FilesEu/
|
Not Categorized, Please Help
|
|