习题2.26(1)
.model small
.data
string DB 'chenrui$'
.code
main PROC
mov ax,@data
mov ds,ax
mov dh,[string+5]
mov dl,string
mov ah,4ch
int 21h
main ENDP
END main
习题2.26(7)
.model small
.data
array DB 100 DUP(64h)
.code
main PROC
mov ax,@data
mov ds,ax
mov cx,100
mov si,0
NEXT:
dec BYTE PTR [array+si]
inc si
loop NEXT
mov ah,4ch
int 21h
main ENDP
END main
习题2.26(8)
.model small
.data
string DB "sdfhdjkshkjagjkhjrkhwehgjashdfdjlfhhkwhjkeab$"
.code
main PROC
mov ax,@data
mov ds,ax
mov si,OFFSET string
NEXT:
cmp BYTE PTR [si],'$'
jz QUIT
inc si
jmp NEXT
QUIT:
inc si
sub si,OFFSET string
mov ah,4ch
int 21h
main ENDP
END main