Your readsectors
is broken. The call reset
at the beginning (line 270) destroys registers such as AX
with important information in them. Then the call to LBAtoCHS
(line 282) is too "late", it's after AX
has already been destroyed by the previous two lines preparing for the BIOS interrupt. You should move the call LBAtoCHS
up to line 278.
Fixing that, you will see that you are loading sectors that will eventually overwrite your stack area that you have set to 0x9000
. You will have to resolve that conflict.
One further problem I spotted is on line 102: it should be repe
not plain rep
.
Finally, a piece of advice: learn to use a debugger so you can solve your own problems.