Carica file su '22-11-2021'

This commit is contained in:
Borededdy 2021-12-20 08:55:16 +00:00
parent 6a196e8b8b
commit 5331874dc7
1 changed files with 44 additions and 0 deletions

View File

@ -0,0 +1,44 @@
data segment
; add your data here!
num1 db 0Ah
num2 db 2h
ris db 0000h
pkey db "press any key...$"
ends
stack segment
dw 128 dup(0)
ends
code segment
start:
; set segment registers:
mov ax, data
mov ds, ax
mov es, ax
; add your code here
mov ax, 0000h
mov bx, 0000h
mov al, num1
mov bl, num2
cmp ax, bx
je salta
sub al, bl
mov ris, al
salta: lea dx, pkey
mov ah, 9
int 21h ; output string at ds:dx
; wait for any key....
mov ah, 1
int 21h
mov ax, 4c00h ; exit to operating system.
int 21h
ends
end start ; set entry point and stop the assembler.