⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 9by91.asm

📁 选择性九九乘法表,用汇编编写的程序。功能:先输入要显示的最大乘数
💻 ASM
字号:
data segment
        result db ?,?
        x db ?
data ends
code segment
        assume cs:code,ds:data
start:
        mov ax,data
        mov ds,ax
        sub ax,ax
        sub bx,bx
        sub cx,cx

        mov ah,01h
        int 21h
        sub al,30h 
        mov x,al

        call retxx
     L:
        sub al,al

        mov cl,1
        mov bh,1
        mov bl,1

     L1:
        mov dl,bh
        call output

        call mulfun

        mov dl,bl
        call output

        call deng

        mov al,bh
        mul bl
        aam

        mov result,al
        mov result+1,ah

        cmp result+1,0
        jna L2

        mov dl,result+1
        call output
        jmp L3

     L2:
        call space
     L3:
        mov dl,result

        call output

        call space

        inc bl
        loop L1

        call retxx

        sub cx,cx    
        push dx


        sub bl,bl
        mov bl,1
        cmp bh,x
        jnb exit
        inc bh
        mov cl,bh
        cmp bh,9
        jna L1

   exit:
        mov ah,4ch
        int 21h

output proc near
        add dl,30h
        mov ah,02h
        int 21h
        ret
output endp
mulfun proc near
        push dx
        mov dl,'*'
        mov ah,02h
        int 21h
        pop dx
        ret
mulfun endp
deng proc near
        push dx
        mov dl,'='
        mov ah,02h
        int 21h
        pop dx
        ret
deng endp
retxx proc near
        push dx
        mov dl,0dh
        mov ah,02h
        int 21h
        mov dl,0ah
        mov ah,02h
        int 21h
        pop dx
        ret
retxx endp
space proc near
      push dx
      mov dl,' '
      mov ah,02h
      int 21h
      pop dx
      ret
space endp        
code ends
end start

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -