reading files in nasm

hey can someone help me with this, im trying to read from a very large file and my interupt function reads only 4096 once, i've been trying to create a loop to read more file but it doesnt seem to be working, this is what i got s far after the file has been opened

mov ah, 3fh ; interupt function
mov bx, [handle] ; i got handle from open
mov cx, buffsize ; the amount of file to read
mov edx, buffer ; the buffer to read the file into
int 0f1h ; interupt call
mov [nbytes], ax ; the number of file read to nbytes

so hw do i put this in a loop so i can read more bytes


  • Check that your ds segment is set up correctly and that buffsize is correct (maybe it should be in square brackets?). If that doesn't work, post the code of your interrupt handler.

    Btw, you would save yourself a lot of time if you did this on a modern operating system.
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