skane2004
September 27th, 2004, 01:46 AM
I'm new with programming in assembly...and when I don't know what I'm doing wrong, it makes it very difficult to fix my mistakes =P I'm using nasm assembler and this simple code:
;ASM Example 2.1 -- password protect
org 100h
section .text
gprmpt: mov dx,prompt ;get ready to prompt user
mov ah,09h ;by sending a character string
int 21h ;Okay -- now do it
ginput: mov ah,08h
int 21h
mov dl,al
mov ah,09h
int 21h
mov ah, 4ch
int 21h
section .data
prompt db "Please enter password: ","$"
invalid db "ERROR: Invalid login$"
verify db "Password accepted.$"
There are no errors, and right now all I'm trying to do is display the character they input...some characters work, but others display the rest of the code or do something else. I think my problem is something with how I've declared my prompt, invalid, and verify db's...please help =)
;ASM Example 2.1 -- password protect
org 100h
section .text
gprmpt: mov dx,prompt ;get ready to prompt user
mov ah,09h ;by sending a character string
int 21h ;Okay -- now do it
ginput: mov ah,08h
int 21h
mov dl,al
mov ah,09h
int 21h
mov ah, 4ch
int 21h
section .data
prompt db "Please enter password: ","$"
invalid db "ERROR: Invalid login$"
verify db "Password accepted.$"
There are no errors, and right now all I'm trying to do is display the character they input...some characters work, but others display the rest of the code or do something else. I think my problem is something with how I've declared my prompt, invalid, and verify db's...please help =)