Determing how many Bytes a file contains - Assembly -


im having assignment requires me open file , stuff in :)

as searching on how read file, reached website ;its pretty , easy introduction http://stuff.pypt.lt/ggt80x86a/asm6.htm

here mate says should provide number of bytes in cx int21h.. if don't know how many bytes file conatains??

ah = 3fh bx = handle cx = number of bytes read ds:dx = segment:offset of buffer  

is there way find out :?

before calling function, set cx size of buffer receive data. when function returns ax have number read. if file shorter cx, ax < cx. if same or longer ax = cx.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -