Thursday, December 11, 2008

Guessing Letter in Assembly

.model small
.stack 100h
.data
message db 'Enter any small letter: ' ,'$'
message0 db 13d, 10d,'Right guessed....', '$'
message1 db 13d, 10d, 'Wrong Guessed!','$'
sayop1 db 13, 10, 'sayop ug input....','$'

.code
start:

mov ax,@data
mov ds,ax

mov dx,offset message
call puts

mov ah,1h
int 21h

mov bl,al

cmp bl, 'a'
jb sayop

cmp bl, 'z'
ja sayop

cmp bl, 'x'
jne not_x

mov dx,offset message0
call puts
jmp finish


not_x:
mov dx,offset message1
call puts
jmp finish

sayop:
mov dx,offset sayop1
call puts
jmp finish

finish:

mov ax,4c00h
int 21h

puts:
mov ah,9h
int 21h
ret



end start

1 comment:

Anonymous said...

Making Money - Work/Tennis: The Ultimate Guide
The way 바카라사이트 you would herzamanindir.com/ expect from betting on the หาเงินออนไลน์ tennis matches of tennis is to bet on jancasino.com the player you like most. But you https://jancasino.com/review/merit-casino/ also need a different