这个汇编程序怎样编写呢?
来源:百度知道 编辑:UC知道 时间:2024/05/23 02:23:36
;这个刚好是昨天的作业,用十进制打印的,希望对你有点用
;打印顺序是字母,数字,其他
dataseg segment
maxlen db 127d
actlen db ?
string db 124 dup('$'),13,10,'$'
letter db 0
digit db 0
other db 0
dataseg ends
codeseg segment
assume cs:codeseg,ds:dataseg,es:dataseg
main proc far
push ds
sub ax , ax
push ax
mov ax , dataseg
mov ds , ax
mov es , ax
start:
lea dx , maxlen
mov ah , 0ah
int 21h
add dx , 1
mov si , dx
mov cx , [si]
mov dl , 0dh
mov ah , 2h
int 21h
mov dl , 0ah
mov ah , 2
int 21h
sub ax , ax
mov letter , al
mov digit , al