struggling with file i/o in pmode

im trying to create a text editor in pmode and so far i have been able to create a file now im strugling with opening a file.
i was given the following sourcecode that makes use of int 21 but nothing i cant seem to display the file let alone know if its opened.

mov ah,3dh
mov edx,fname
mov al,2
int 21h
mov [ds:fhandle],ax

mov ah,3eh
mov bx,[fhandle]
int 21h

mov esi,buffer
mov edi,0b8000h
add edi,482
mov ah,4
mov ecx,0
mov ah,0eh
mov bh,0
mov al,'


  • uhm... int 0x21 is a dos interrupt which is a real mode os. It is not possible to use int 0x21 (or any dos or real mode interrupts) in pmode (Specifically without dos)

    If you are in pmode, look at either your system API (interrupts) or (if there is none), you will need to write your own drivers via port io.
    [hr][size=1][leftbr].:EvolutionEngine[rightbr][leftbr].:MicroOS Operating System[rightbr][leftbr][link=]Website :: OS Development Series[rightbr][/link][/size]
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion