;Ако някой от комисията чете това, искам само да кажа, че здрасти пак

;init
MOV A 0
IN G
IN H
MOV F 1
MOV RES 0
JZ 13



;loop
IN E
MOV F 1
CMP E F
JNZ 22
JZ 34



;type1
IN B
IN C
IN D
;I
;DONT
;WANT TO RE-ENTER JZ AND JNZ ADRESSES
MOV RES 0
JZ 67



;type2
MOV F 1
MOV A 0
IN B
IN C
MOV D B

CMP D C ;t2loop
JNZ 45
JZ 50

LOAD D E ;t2payload
ADD A E
ADD D F
JNZ 41

MOV RES 0 ;t2end
OUT A
JZ 56



;dash
MOV F 1
SUB H F
MOV F 0
CMP H F
JZ 13
RETURN



;newtype1
MOV F 1
MOV A 0
MOV RES 0
JZ 72

CMP B C ;t1loop
JNZ 76
JZ 82

LOAD B E ;t1payload
ADD E D
STORE B E
ADD B F
JNZ 72

MOV RES 0
JZ 56