IN H
IN G

IN D
IN A
IN B
CMP D 1
JZ 22
;UP
IN E
MOV F A

LOAD R1 F
ADD R1 E
STORE F R1
ADD F 1
CMP B F
JZ 13
;QRY
MOV F A
MOV R2 0

LOAD R F
ADD R2 R
ADD F 1
CMP B F
JZ 23

OUT R2
CMP G C
JZ 4
RETURN
