IN G
IN H
MOV G 1
SUB H G
IN F
IN A
IN B
CMP F G
JZ 19
IN E
MOV D A
LOAD D C
ADD C E
STORE D C
ADD D G
CMP D B
JNZ 12
JZ 27
MOV D A
MOV C 0
LOAD D E
ADD C E
ADD D G
CMP D B
JNZ 21
OUT C
MOV E 0
CMP H E
JZ 4
RETURN
