Int 21h / 0ah 数据 - > AL 第一个登记册 第二个寄存器Al
添加第一个寄存器,第二个寄存器 寄存器 人 打印
答案 0 :(得分:1)
mov ah, 09h
mov dx, enterfnstr
int 21h
mov ah, 01h
int 21h
mov bl, al
sub bl, 30h
mov ah, 09h
mov dx, entersnstr
int 21h
mov ah,01h
int 21h
sub al, 30h
add al, bl
aaa
dec ah
mov bh, ah
add bh, 30h
add al, 30h
mov bl, al
mov ah, 09h
mov dx, sum
int 21h
mov ah, 02h
mov dl, bh
int 21h
mov ah, 02h
mov dl, bl
int 21h
mov ah, 0
int 16h
答案 1 :(得分:0)
您可以自定义此模板和其他启动模板; ;该模板的位置是c:\ emu8086 \ inc \ 0_com_template.txt
org 100h
mov ah,1h ;read the character ,input stored in al
int 21h
len equ 32
mov bl,al ;bl stores first input
mov al,'+' ;print the character
mov ah,0eh
int 10h
mov ah,1h ;read the character ,input stored in al
int 21h
mov cl,al ;cl another reg
mov dl,bl ;moving the value of bl to dl
mov ah,2h
mov dl,cl ;moving the value of cl to dl
mov ah,2h
mov al,'=' ;print the character
mov ah,0eh
int 10h
sub bl,30h ;converted first to decimal
sub cl,30h
add bl,cl
add bl,30h
mov dl,bl ;print the character
mov ah,2h
int 21h
保留
答案 2 :(得分:0)
.model small
.stack 100
.data
a dw 2
b dw 4
.code
start:
mov ax, @data
mov ds, ax
mov ax, a
add ax, b
mov ax, 4c00h
int 21h
end start