📄 3-20.asm
字号:
stack segment stack 'stack'
dw 32 dup(?)
stack ends
data segment
Outbuf db 'The ASC2 code of$'
BufIS db ' is$'
BufEnd db ' is 0DH$'
ASCNum db 3 dup(?),'$'
data ends
code segment
begin proc far
assume ss:stack,cs:code,ds:data
push ds
sub ax,ax
push ax
mov ax,data
mov ds,ax
AGAIN:
mov dx,offset Outbuf
mov ah,9
int 21H
mov ah,1
int 21H
CMP al,00DH
JZ LOOPOUT
mov cx,ax
mov dl,00AH
mov ah,2
int 21H
mov dx,offset BufIS
mov ah,9
int 21H
mov ax,cx
mov ah,0
mov bl,10
div bl
add ah,30H
mov ASCNum + 2,ah
mov ah,0
div bl
add ah,30H
mov ASCNum + 1,ah
add al,30H
mov ASCNum,al
mov dx,offset ASCNum
mov ah,9
int 21H
JMP AGAIN
LOOPOUT:
mov dx,offset BufEnd
mov ah,9
int 21H
ret
begin endp
code ends
end begin
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -