I'm still working on a Pascal Operating System. Yes, I'm not letting go of Pascal... Anyways, I'm having trouble writing a sector to a floppy using inline assembly using Turbo Pascal 6.
Code: Select all
... Pascal Stuff ...
asm
mov DX, 0100h
mov CX, 0000h
mov AX, DS
mov ES, AX
mov AX, 0301h
mov BX, offset sector
int 13h
end;
end.
The code above works in Bochs, with no problem. I've made another function that will read the sector and display the first 4 bytes of it to the screen to test it.
However, when I actually boot the computer with the floppy, it boots to it, does its little pascal code and then I can hear the floppy drive spinning but when it goes to show the four bytes, it gives me 0000.
Whats the difference from Bochs and the real computer? Can I change something in my code for it to work? I'm just starting to get to know assembly.
Heres a post from me on another forum (where you can find full code on the second page)
http://www.codeguru.com/forum/showthrea ... 742&page=1