Skip to content

Instantly share code, notes, and snippets.

@yuriihabrusiev
Created March 5, 2012 09:56
Show Gist options
  • Save yuriihabrusiev/1977691 to your computer and use it in GitHub Desktop.
Save yuriihabrusiev/1977691 to your computer and use it in GitHub Desktop.
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