Wednesday, June 23, 2010

Largest element

Buzz It
#make_COM#
;COM file is loaded at CS:0100h
ORG 100h
mov si,3000h
mov cx,05h
mov ax,[3000h]
inc si
xx:add ax,[si]
inc si
loop xx
mov [3009h],ax
hlt


Input
[3000H]=01
[3002H]=02
[3003H]=03
[3004H]=04
[3005H]=05

Output
[3009H]=05

0 comments:

Post a Comment