100% found this document useful (1 vote)
7K views1 page

8086 Emulator Example - Password Program

This document contains assembly code for a program that verifies a user input password by comparing the number of characters entered to the length of a hardcoded password string and comparing each character of the input to the corresponding character in the password string. The program loops through the password string and input, comparing characters, and verifies or re-prompts the user if any characters do not match.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
7K views1 page

8086 Emulator Example - Password Program

This document contains assembly code for a program that verifies a user input password by comparing the number of characters entered to the length of a hardcoded password string and comparing each character of the input to the corresponding character in the password string. The program loops through the password string and input, comparing characters, and verifies or re-prompts the user if any characters do not match.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

source code: hoopla.

asm

8/12/13, 22:37

; hoopla.asm
verify: mov dx, offset buffer mov ah, 0x0a int 0x21 jmp print buffer db 0x15,?, 0x15 dup(' ') ;max of 21 chars here, adjustable print: mov ah, 0x02 mov dl, 0x0a int 0x21 mov dl, 0x0d int 0x21 xor bx, bx mov bl, buffer[1] mov ax, 0x0000 mov cx, 0x0000 mov dx, 0x0000 mov bh, 0x00 mov cx, msgend - offset msg ; calculate message size. jmp msgend msg db "Brando" msgend: ;password here, make sure of match ;%bl shows the no. of char input

cmp bl, cl;compares no of input characters to no of output jne verify mov dx, bx mov bx, 0x0000 cycle: mov cl, msg[bx] mov al, buffer[bx+2] cmp al, cl jne verify add bx, 0x0001 cmp bx, dx jne cycle done: hlt

; - asm2html -

le:///Users/NoodleBytes/Desktop/hoopla.html

Page 1 of 1

You might also like