Wednesday, June 23, 2010

32 subtraction

Buzz It
#make_COM#
; COM file is loaded at CS:0100h
ORG 100h
MOV AX,[2000H]
MOV BX,[2002H]
MOV CX,[2004H]
MOV DX,[2006H]
SUB AX,CX
SUB BX,DX
MOV [2008H],AX
MOV [200AH],BX
HLT


Input
[2000H]=04
[2001H]=04
[2002H]=04
[2003H]=04
[2004H]=03
[2005H]=03
[2006H]=03
[2007H]=03


Output
[2008H]=01
[2009H]=01
[200AH]=01
[200BH]=01


0 comments:

Post a Comment