21,387
社区成员




data segment
msg db 'hello, world', 0ah, 0dh, '$'
msg2 db 'hello, world', '$'
d db 1h
data ends
stack segment stack para 'stack' stack
sta db 256 dup(?)
stack ends
code segment
assume cs:code,ds:data,ss:stack
start:
mov ax, data
mov ds, ax
;mov dx, offset msg
;lea dx, msg
mov ah, 9
mov cx, 3
loop1:
push cx
mov cx, 4
loop2:
cmp d , 0CH
jne p2
p1:
lea dx, msg2
jmp p3
p2:
lea dx, msg
p3:
int 21h
inc d
loop loop2
pop cx
loop loop1
mov ah, 4ch
int 21h
code ends
end start
data segment
msg db 'hello, world', 0dh, 0ah, '$'
data ends
stack segment stack para 'stack' stack
sta db 256 dup(?)
stack ends
code segment
assume cs:code,ds:data,ss:stack
start:
mov ax, data
mov ds, ax
mov dx, offset msg
mov ah, 9
mov cx, 3
loop1:
push cx
mov cx, 4
loop2:
int 21h
loop loop2
pop cx
loop loop1
mov ah, 4ch
int 21h
code ends
end start