汇编语言显示9-9乘法表和ASCII字符表(从20H--FFH)
基本功能 1 建立主菜单;
2 按下相应键分别显示9-9乘法表和ASCII字符表。
希望解答能够详细点,也可以发邮件到cxh_dream@126.com,谢谢!!
[解决办法]
冲着这40分去了。。乱是乱了点。。
;2009-5-29
;from damacheng(marcusxing)
;----------------------------
datasgsegment
menuinfo db 'Menu',0ah,0dh,
'0 for print 9X9 multiplication table',0ah,0dh,
'1 for print ASCII table',0ah,0dh,'$'
errorinfo db 'illegal input,try again','$'
datasgends
codesgsegment
assume ds:datasg,cs:codesg
start:
movax,datasg
movds,ax
leadx,menuinfo
movah,9
int21h
movah,8
int21h
cmpal,'0'
jePrint99MultTable
cmpal,'1'
jePrintASCIITable
leadx,errorinfo
movah,9
int21h
exit:
movax,4c00h
int21h
Print99MultTable:
movbx,1
movcx,1
s0:
movax,bx
pushcx
movcx,1
s3:
movdl,bl
adddl,30h
movah,2
int21h
movdl,'*'
int21h
movdl,cl
adddl,30h
int21h
movdl,'='
int21h
movax,bx
movdl,bl
mulcl
callhtod
movah,2
movdl,20h
int21h
inccx
cmpcx,bx
jles3
movdl,0dh
movah,2
int21h
movdl,0ah
int21h
popcx
inccx
cmpcx,10
incbx
jbs0
jmpexit
PrintASCIITable:
xordl,dl
movcx,128
movah,2
s2:
int21h
incdl
loops2
jmpexit
htod proc
pushax
pushcx
pushdx
pushbx
xorcx,cx
movbx,10
s:
xordx,dx
divbx
inccx
pushdx
cmpax,0
jnes
s1:
popdx
adddl,30h
movah,2
int21h
loops1
popbx
popdx
popcx
popax
ret
htod endp
codesgends
end start