Wednesday, June 23, 2010

16 bit Subtraction

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

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


Output
[2004H]=50
[2005H]=00

0 comments:

Post a Comment