|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
这个实验可以结合之前显示字符串的子程序,可以达到验证实验结果的目的
assume cs:codesg
datasg segment
db "Beginner's All-purpose Symbolic Instruction Code.",0
datasg ends
codesg segment
begin:
mov ax,datasg
mov ds,ax
mov si,0
call letterc
mov dh,8
mov dl,3
mov cl,2
call show_str
mov ax,4c00H
int 21h
letterc: push si
mov ax,0
mov si,0
s: mov al,[si]
mov ch,0
mov cl,[si]
jcxz ok
cmp al,97
jb s0
cmp al,122
ja s0
and al,11011111b
mov [si],al
s0: inc si
jmp short s
ok: pop si
ret
show_str:
;push bx
;push cx
;push si
mov al,dh
mov bl,160
mul bl
add dl,dl
add al,dl
mov bx,0B800h
mov es,bx
mov bx,ax
mov ah,cl
s1: mov cl,[si]
mov ch,0
jcxz ok1
mov di,1
mov al,[si]
mov es:[bx],ax
inc si
add bx,2
jmp short s1
ok1:
;pop si
;pop cx
;pop bx
ret
codesg ends
end begin |
|