can not execute code loaded in memory
Posted: Sat Mar 11, 2006 12:08 pm
i read the contents of flopy disk into real memory at 0x7f00,
when i jmp into PM ,
i write
jmp 08h:7f00h+pmmode
[bits32]
pmmode:
mov eax, 10h
mov ds, ax,
mov [ds:0b800000h], 'p'
mov [ds:0b800001h], 0xab
mov [ds:0b800002h], 'm'
mov [ds:0b800003h], 0xab
jmp $
....
btw, the org starts from 0,
if I change
jmp 08:0x7f00+pmmode
to
jmp 08h:0x7c00+pmmode
the code will work,
i wonder why 7f00h wont work although the same code is loaded into the memory at the address 0x7f00h .
when i jmp into PM ,
i write
jmp 08h:7f00h+pmmode
[bits32]
pmmode:
mov eax, 10h
mov ds, ax,
mov [ds:0b800000h], 'p'
mov [ds:0b800001h], 0xab
mov [ds:0b800002h], 'm'
mov [ds:0b800003h], 0xab
jmp $
....
btw, the org starts from 0,
if I change
jmp 08:0x7f00+pmmode
to
jmp 08h:0x7c00+pmmode
the code will work,
i wonder why 7f00h wont work although the same code is loaded into the memory at the address 0x7f00h .