reading from File in assembly
Posted
by Natasha
on Stack Overflow
See other posts from Stack Overflow
or by Natasha
Published on 2010-04-15T19:31:56Z
Indexed on
2010/04/15
20:53 UTC
Read the original article
Hit count: 415
assembly
i am trying to read a username and a password from a file in x86 assembly for the perpose of authentication obviously the file consists of two lines , the user name and the password how can i read the two lines seperately and compare them?
My attempt:
proc read_file
mov ah,3dh
lea dx,file_name
int 21h
mov bx, ax
xor si,si
repeat:
mov ah, 3fh
lea dx, buffer
mov cx, 100
int 21h
mov si, ax
mov buffer[si], '$'
mov ah, 09h
int 21h ;print on screen
cmp si, 100
je repeat
jmp stop;jump to end
stop:
RET
read_file ENDP
© Stack Overflow or respective owner