Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Multiplication table
org 100h
use16
include 'dec_proc32.asm'
include 'lab4lib.asm'
mov CL,1
mov BL,1
mov dx,0
main_loop:
mov bh,dh
row_loop:
mov al, cl
mul bl
push dx
push bx
mov bh,0
mov dx,bx
call wr_decimal
pop bx
pop dx
inc dl
call mvcr
pusha
mov ah,9
mov al,'*'
mov bh,0
mov bl,7
mov cx,1
int 10h
popa
inc dl
call mvcr
push dx
push cx
mov ch,0
mov dx,cx
call wr_decimal
pop cx
pop dx
inc dl
call mvcr
pusha
mov ah,9
mov al,'='
mov bh,0
mov bl,7
mov cx,1
int 10h
popa
inc dl
call mvcr
push dx
mov dx,ax
call wr_decimal
pop dx
mov ax,0
add dl, 3
call mvcr
inc bl
cmp bl,10
jne row_loop
mov bl,1
mov dl,0
add dh,2
call mvcr
inc cl
cmp cl,10
jne main_loop
mov ah,0
int 16h
INT 20h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.