Message board for the users of flat assembler.
> OS Construction > Int 13h - READ
Hi to all; I'm writing on my own kernel and now I want to load some more sectors from my FD into RAM beginning at segment 50h (Real Mode).
Do the Int 13h ah=4xh - extensions also work fith Floppy Disks?
I tried both (ah=02h and ah=42h) but it doesn't work.
This is a part of my code:
mov ax, 50h
mov es, ax
mov dl, 0
mov ah, 0h
mov ah, 2h
mov al, 2 ;sect. count
mov cx, 1 ;also load boot sector
mov dh, 0
mov bx, 0
;check for errors
mov ah, 1h
cmp al, 0
Until now I found out the following:
The processor seems to hang in the 'Retry'-Loop because it doesnt react on any command after 'jne Retry'.
If I use the code without such a loop, the code at 50h:200h is not executed.
Thx for helping
|15 Jul 2007, 13:38||
push es ;Save ES read_again: xor ax,ax ;AX=0 mov bx,ax ;BX=0 mov cx,ax ;CX=0 mov dx,ax ;DX=0 int 13h jc failure mov ax,0202h mov cl,1 mov bx,50h mov es,bx ;ES:BX=0050:0200h mov bx,200h int 13h jc read_again jnc continue failure: pop es mov si,... ;Display the failure message ... mov ah,0x4C ;Exit the program or hang or whatever, but int 21h ;dont continue continue: pop es mov ax,0050h ;Just in case mov bx,0200h ;and this too push ax push bx sti retf
Should work, but it's untested. Give it a try
|15 Jul 2007, 17:21||
Thank you, inflater.
I tried your code in my code frame and it didn't work too. Now I fount out, that a wrong value in sp was the prob.
|15 Jul 2007, 18:37||
< Last Thread | Next Thread >
Copyright © 1999-2020, Tomasz Grysztar.
Powered by rwasa.