当前位置: 代码迷 >> 汇编语言 >> 编译语言显示9-9乘法表和ASCII字符表(从20H-FFH)
  详细解决方案

编译语言显示9-9乘法表和ASCII字符表(从20H-FFH)

热度:9877   发布时间:2013-02-26 00:00:00.0
汇编语言显示9-9乘法表和ASCII字符表(从20H--FFH)
基本功能 1 建立主菜单;
  2 按下相应键分别显示9-9乘法表和ASCII字符表。

希望解答能够详细点,也可以发邮件到cxh_dream@126.com,谢谢!!


------解决方案--------------------------------------------------------
冲着这40分去了。。乱是乱了点。。

Assembly code
;2009-5-29;from damacheng(marcusxing);----------------------------------------------------------------datasg    segment    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','$'datasg    endscodesg    segment    assume ds:datasg,cs:codesgstart:    mov    ax,datasg    mov    ds,ax    lea    dx,menuinfo    mov    ah,9    int    21h    mov    ah,8    int    21h        cmp    al,'0'    je    Print99MultTable    cmp    al,'1'    je    PrintASCIITable    lea    dx,errorinfo    mov    ah,9    int    21hexit:    mov    ax,4c00h    int    21hPrint99MultTable:    mov    bx,1    mov    cx,1s0:    mov    ax,bx    push    cx    mov    cx,1s3:    mov    dl,bl    add    dl,30h    mov    ah,2    int    21h    mov    dl,'*'    int    21h    mov    dl,cl    add    dl,30h    int    21h    mov    dl,'='    int    21h    mov    ax,bx    mov    dl,bl    mul    cl        call    htod    mov    ah,2    mov    dl,20h    int    21h    inc    cx    cmp    cx,bx    jle    s3    mov    dl,0dh    mov    ah,2    int    21h    mov    dl,0ah    int    21h    pop    cx    inc    cx    cmp    cx,10    inc    bx    jb    s0    jmp    exitPrintASCIITable:    xor    dl,dl    mov    cx,128    mov    ah,2s2:    int    21h    inc    dl    loop    s2    jmp    exithtod proc    push    ax    push    cx    push    dx    push    bx    xor    cx,cx    mov    bx,10s:    xor    dx,dx    div    bx    inc    cx    push    dx    cmp    ax,0    jne    ss1:    pop    dx    add    dl,30h    mov    ah,2    int    21h    loop    s1    pop    bx    pop    dx    pop    cx    pop    ax    rethtod endpcodesg    endsend start
  相关解决方案