IN G
IN H
MOV A 1
MOV B 0
STORE A B
IN A
IN B
IN C
MOV D 1
CMP A D
JNZ 21
IN D
MOV A 1
LOAD A E
ADD E D
STORE A E
MOV RES 1
JNZ 25
MOV A 1
LOAD A E
OUT E
MOV RES 1
MOV A 1
SUB H A
MOV A 0
CMP H A
JNZ 6
RETURN
