I\'ve been stuck with this for weeks now and have no idea where I\'m going wrong because NASM hasn\'t given me any errors. The code is pretty self explanatory because of the com
I'm not sure why the code doesn't work, since I can't check the the whole environment (disk, memory dump, etc)...but what I can say is...the code is wrong. You are loading the second program, not at 0x8000
(that was the point of using 0rg 0x8000
right?), but at 0x80000
.
The reason being, you are using the segment:offset addressing in the wrong way,
the address 0x8000:0x0000
is resolved to the linear address 0x80000
, since
the segment value is shifted left by 4 bits an then added to the offset.
To resolve this problem, you should take a look at a memory dump and see if the program works as you expect it too....either that or you're loading the wrong sectors of the disk.