: :D i am so happy, i have finally managed to make the code work :)
:
: OK here was the problem (full source clode attached):
:
: mov al,[cs:TotalFATs]
: mov cl,[cs:SectorsPerFAT]
: mul cl
: add al, [cs:ReservedSectors]
: mov [DIRTable],al
: mov al,[cs:MaxRootEntries]
: mov cl,32
: mul cl
: mov cx,[cs:BytesPerSector]
: div cx
: mov [DIRTableLen],al
: add al,[DIRTable]
: mov [dataStart],al
: mov cl,[DIRTable]
: mov bx,0x200
: mov ah,2
: mov al,1 ;THIS LINE WAS "mov al,[DIRTableLen]"...so mov al,14
: call get_location
: int 0x13
:
: reading 14 sectors at 0x200 wrote to 0x1000....writing null
: bytes...but for some reason loading the actual OS there did not
: overwrite these bytes, even though the .loadDIR code was called
: first (and not again), so the OS code should have been written on
: top, do you have any idea why it wasnt (the code now works on a real
: pc btw...although the kernel still needs lots of work.)
:
: that is what i need to try to understand now, why did the OS not
: simply overwright the code....is it something to do with the memory
: being set to read not overright perhaps?
:
: any suggestions would be appreciated...u may also have noticed that
: i totally re-wrote the code from the original, this was to try and
: make it simpler... and to understand it more
:
In real mode, there is no memory protection--so all memory is writable.
To answer your question of "why" will require debugging it
I am very glad to hear its working now!
[.:EvolutionEngine][.:MicroOS Operating System][Website]