x86 Assembly

Moderators: None (Apply to moderate this forum)
Number of threads: 4563
Number of posts: 16029

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
reading files in nasm Posted by akj on 1 Mar 2010 at 3:29 PM
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


Report
Re: reading files in nasm Posted by anthrax11 on 1 Mar 2010 at 3:56 PM
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.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.