实验十一(并把字符串显示到屏幕上)
这个实验可以结合之前显示字符串的子程序,可以达到验证实验结果的目的
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,
mov ch,0
mov cl,
jcxz ok
cmp al,97
jb s0
cmp al,122
ja s0
and al,11011111b
mov ,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,
mov ch,0
jcxz ok1
mov di,1
mov al,
mov es:,ax
inc si
add bx,2
jmp short s1
ok1:
;pop si
;pop cx
;pop bx
ret
codesg ends
end begin
页:
[1]