Wednesday, June 23, 2010

16 bit division

Buzz It
#make_COM#
; COM file is loaded at CS:0100h
ORG 100h
mov ax,[2000h]
mov bx,[2002h]
div bx
mov [2004h],ax
mov [2006h],dx
hlt

Input
[2000H]=00
[2001H]=02
[2002H]=00
[2003H]=02


Output
[2004H]=01
[2005H]=00
[2006H]=00
[2007H]= 00

0 comments:

Post a Comment