add16.asm ;
10 lik sanoq sistemasida ikki son yig`indisini hisoblash
.model tiny
.code org 100h start:
mov AL,CS:P1+1
add AL,CS:P2+1
aaa
mov CS:
SUM+1,AL
mov AL,CS:P1 adc AL,CS:P2
aaa
mov CS:SUM, AL
add BYTE PTR CS:SUM,48
add BYTE PTR CS:SUM+1,48
mov DX, OFFSET
SUM P1 DB '39' P2 DB '12'
SUM DB ' ', 13, 10, '$'
mov ah,9 int 21H ret
END start
Endi MS DOS buyruqlar satrida kompilyatsiyalashni amalga oshiramiz. Natija comfayldan iborat bo‘ladi.
Kompilyatsiyalash (TASM da):
tasm add16.asm
tlink /t /x add16.obj
Dastur natijasi quyidagicha bo‘ladi:
Do'stlaringiz bilan baham: |