You are on page 1of 1

mov dx,offsetbuffermov ah, 0x0aint0x21 jmpprintbufferdb0x15,?

, 0x15 dup(' ');max of 21 chars here,


adjustableprint:mov ah, 0x02mov dl, 0x0aint0x21mov dl, 0x0dint0x21xor bx,bx mov bl, buffer[1] ;%bl
shows the no. of char inputmov ax, 0x0000mov cx, 0x0000mov dx, 0x0000mov bh, 0x00mov cx, msgend-
offsetmsg; calculate message size. jmpmsgendmsgdb "Brando" ;password here, make sure of
matchmsgend:cmp bl,cl ;compares no of input characters to no of output jneverifymov dx,bx mov bx,
0x0000cycle:mov cl, msg[bx] mov al, buffer[bx+2] cmp al,cl jneverifyadd bx, 0x0001cmp bx,dx
jnecycledone:hlt

You might also like