.LOC 100
START:   NIOC  37     ; CLEAR FLAG
         LDA   1,MASK
         LDA   2,C1
         JSR   OUTCR  ; OUTPUT CR&LF
LOOP:    SKPDN 37     ; TEST FLAG
         JMP   .-1
         DIAC  0,37     ; INPUT TO AC0
         STA   0,TEMP
         MOVS  0,0
         MOVZL 0,0
         MOVL  0,0
         MOVL  0,0
         AND   1,0
         ADD   2,0
         JSR   TYPE
         LDA   0,TEMP
         MOVR  0,0
         MOVR  0,0
         MOVR  0,0
         AND   1,0
         ADD   2,0
         JSR   TYPE
         LDA   0,TEMP
         AND   1,0
         ADD   2,0
         JSR   TYPE
         JSR   OUTCR
         JMP   LOOP
C1:      260
MASK:    7
TEMP:    0
TYPE:    SKPBZ TTO
         JMP   .-1
         DOAS  0,TTO
         JMP   0,3
OUTCR:   STA   3,.IN1
         LDA   0,CR
         JSR   TYPE
         LDA   0,LF
         JSR   TYPE
         JMP   @.IN1
.IN1:    0
CR:      215
LF:      212
.END START
