Wednesday, June 23, 2010

32 bit addition

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]
ADD AX,CX
ADD 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]=07
[2009H]=07
[200AH]=07
[200BH]=07

0 comments:

Post a Comment