Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- data segment
- num1 db ? ; define byte carieli (arainicializirebuli)
- num2 db ?
- msg1 db 10,13,"Enter first number to compare : $"
- msg2 db 10,13,"Enter second number to compare : $"
- msg3 db 10,13,"Smaller number is : $"
- ends
- code segment
- start:
- mov ax, data ; data ax (nebismier zogadi danishnulebis registrshi)
- mov ds, ax ;da mere ds-shi!
- ; lea misamarts inaxavs igive mov dx, offset msg1
- lea dx, msg1
- mov ah, 9
- int 21h ; DO IT - sheasrule brdzaneba romelic weria ah-Shi mxolod!
- mov ah, 1 ; konsolidan kitxva da chawera mxolod al-shi!
- int 21h
- mov num1, al
- mov dx, offset msg2
- mov ah, 9
- int 21h
- mov ah, 1
- int 21h
- mov num2, al
- lea dx, msg3
- mov ah, 9
- int 21h
- mov al, num1
- cmp al, num2 ; compare
- jg second
- ; jump greater anu tu metia pirveli
- ; mashin gadava second-is shesrulebaze
- first:
- mov ah, 2; shedegis gamotana print mxolod dl-dan!
- mov dl, num1
- int 21h
- jmp exit ; exit-ze gadaxtoma
- second:
- mov ah, 2
- mov dl, num2
- int 21h
- exit:
- ; operaciulze moqmedebis gadacema (return-i)
- mov ah, 4Ch ; 4C00 chaiwereba ah-shi mxolod 4C rac programis dasasruls nishnavs
- int 21h
- ends
- end start
Advertisement
Add Comment
Please, Sign In to add comment