What is the highest memory address an assembly program can safely use?
At address F197 the DPB (Drive Parameter Block) starts. Is it safe to use memory below F197?
Login or register to post comments
What is the highest memory address an assembly program can safely use?
At address F197 the DPB (Drive Parameter Block) starts. Is it safe to use memory below F197?
I think is defined by SP.
System variable "MEMSIZ" (at 0F672h).
The Drive Parameter Blocks are not in a fixed area. To know the DPB of each drive see the "DPBLIST" (at 0F353h ~ 0F363h).
yes it is not ld hl,address but ld hl,(variable).
it is variable dependant on disk drives.
the highest one is HIMEM.
ld hl,(0xfc4a)
dec hl
thats the top byte you can use.
and the stackpointer goes somewhere below, need to reload it to be sure.
Nice, gdx.
Marked for future reference.
Nice figure! How come "BOTTOM" has a higher value than "MEMSIZ" given it's above?
Nice figure! How come "BOTTOM" has a higher value than "MEMSIZ" given it's above?
"(address)" means the value stored at that address.
So "BOTTOM (0FCh48h)" means that the BOTTOM address is stored at 0FC48h.
Oh! I see! makes sense
@Gdx. That image is so nice that it should be added to the WIKI.
Hi, according to the MSX technical handbook, MEMSIZ is:
MEMSIZ (F672H, 2)
contents: highest address of memory used by BASIC
So maybe is not what you want if your environment is not BASIC. The map can vary if you use binary (ASM) program, with 4000-7fffh available (in that picture is shown as used by BASIC interpreter), or DOS, with also 100-3fffh available.
But, concerning the question, MEMSIZ could not have the highest one to use if not using BASIC. It would be good if someone knows about this.
Don't you have an account yet? Become an MSX-friend and register an account!