;This program multiplies a byte by a byte giving a word
;input: 600h & 601h
;output: word ptr 602h
mov al, byte ptr 600h
mov bl, byte ptr 601h ;input
mov dx, 0 ;zero accumulator
mov ah, 0 ;convert al -> ax (unsigned)
cmp bl, 0 ;special check for mult by 0
je stopit
lp: add dx, ax ;one more to add!
sub bl, 1 ;one less to go
jnz lp ; done when bl goes down to 0
stopit: mov word ptr 602h, dx
int 20h