MAIN START
  LAD GR1,1
  LAD GR4,2
;LABEL3
  ST GR4,ALL
  ST GR4,PN
	NOP	 ;あいうaa	;aaa
  LAD GR0,+3
  ST GR0,PN,GR1 ;ppppppppppppp
  LAD GR2,5 あ
  LD GR5,GR2
  XOR GR3,GR3 ;コメント
  JUMP DIV2 
DIV CPL GR4,GR7
  JPL NZ8
DIV2 XOR GR6,GR6
  XOR GR7,GR7
CL2 LD GR0,GR4
  ADDL GR6,GR1
	  AND GR0,MSK
  JNZ CL4 ; comment
  SLL GR4,1
  JUMP CL2
CL4 CPL GR2,GR4
  JPL PLS
  JMI MIS
  JZE ZER
PLS OR GR7,GR1
  SUBL GR2,GR4
  SRL GR4,1
  SUBL GR6,GR1
  JZE PM
  SLL GR7,1
  JPL CL4
MIS SRL GR4,1
  SUBL GR6,GR1
  JZE PM 
  SLL GR7,1
  JUMP CL4
ZER OR GR7,GR1
  SLL GR7,-1,GR6
  JUMP NL
; XOR GR2,GR2
; JUMP PM
PM LD GR2,GR2
  JNZ NZ8
NL LD GR2,GR5
  JUMP NPN
NZ8 LD GR2,GR5
  ADDL GR3,GR1
  CPL GR3,ALL
  JNZ PNX
  LD GR7,GR2
  ST GR2,PN,GR3
  ADDL GR3,GR1
  ST GR3,ALL
  CPL GR3,LIM
  JZE FIN
NPN ADDL GR2,GR1
  ADDL GR2,GR1
  LD GR5,GR2
  LD GR3,GR1
	
PNX LD GR4,PN,GR3
  JUMP DIV
FIN CALL MAIN2
	RET ;comment
MSK DC #4000
ALL DS 1
LIM DC       1000
PN DS        1000
   END
;--------------------------
MAIN2      START
  LAD GR1,1
  LAD GR4,2
  ST GR4,ALL
  ST GR4,PN
  LAD GR0,+3
  ST GR0,PN,GR1 ;ppppppppppppp
  LAD GR2,5
  LD GR5,GR2
  XOR GR3,GR3
  JUMP DIV2 
DIV CPL GR4,GR7
  JPL NZ8
DIV2 XOR GR6,GR6
  XOR GR7,GR7
CL2 LD GR0,GR4
  ADDL GR6,GR1
  AND GR0,MSK
  JNZ CL4
  SLL GR4,1
  JUMP CL2
	;DC 99999
CL4 CPL GR2,GR4
  JPL PLS
  JMI MIS
  JZE ZER
PLS OR GR7,GR1
  SUBL GR2,GR4
  SRL GR4,1
  SUBL GR6,GR1
  JZE PM
  SLL GR7,1
  JPL CL4
MIS SRL GR4,1
  SUBL GR6,GR1
  JZE PM 
  SLL GR7,1
  JUMP CL4
ZER OR GR7,GR1
  SLL GR7,-1,GR6
  JUMP NL
; XOR GR2,GR2
; JUMP PM
PM LD GR2,GR2
  JNZ NZ8
NL LD GR2,GR5
  JUMP NPN
NZ8 LD GR2,GR5
  ADDL GR3,GR1
  CPL GR3,ALL
  JNZ PNX
  LD GR7,GR2
  ST GR2,PN,GR3
  ADDL GR3,GR1
  ST GR3,ALL
  CPL GR3,LIM
  JZE FIN
NPN ADDL GR2,GR1
  ADDL GR2,GR1
  LD GR5,GR2
  LD GR3,GR1
PNX LD GR4,PN,GR3
  JUMP DIV
FIN CALL MAIN3
	RET
MSK DC #4000
ALL DS 1
LIM DC       1000
PN DS        1000
   END
;--------------------------
MAIN3      START
  LAD GR1,1
  LAD GR4,2
  ST GR4,ALL
  ST GR4,PN
  LAD GR0,+3
  ST GR0,PN,GR1 ;ppppppppppppp
  LAD GR2,5
  LD GR5,GR2
  XOR GR3,GR3
  JUMP DIV2 
DIV CPL GR4,GR7
  JPL NZ8
DIV2 XOR GR6,GR6
  XOR GR7,GR7
CL2 LD GR0,GR4
  ADDL GR6,GR1
  AND GR0,MSK
  JNZ CL4
  SLL GR4,1
  JUMP CL2
CL4 CPL GR2,GR4
  JPL PLS
  JMI MIS
  JZE ZER
PLS OR GR7,GR1
  SUBL GR2,GR4
  SRL GR4,1
  SUBL GR6,GR1
  JZE PM
  SLL GR7,1
  JPL CL4
MIS SRL GR4,1
  SUBL GR6,GR1
  JZE PM 
  SLL GR7,1
  JUMP CL4
ZER OR GR7,GR1
  SLL GR7,-1,GR6
  JUMP NL
; XOR GR2,GR2
; JUMP PM
PM LD GR2,GR2
  JNZ NZ8
NL LD GR2,GR5
  JUMP NPN
NZ8 LD GR2,GR5
  ADDL GR3,GR1
  CPL GR3,ALL
  JNZ PNX
  LD GR7,GR2
  ST GR2,PN,GR3
  ADDL GR3,GR1
  ST GR3,ALL
  CPL GR3,LIM
  JZE FIN
NPN ADDL GR2,GR1
  ADDL GR2,GR1
  LD GR5,GR2
  LD GR3,GR1
PNX LD GR4,PN,GR3
  JUMP DIV
FIN RET
MSK DC #4000
ALL DS 1
LIM DC       1000
PN DS        1000
   END
   