- BTOD START
- RPUSH
- LD GR6,GR3
- LAD GR7,4,GR3
- LAD GR3,UDAT ; 除数の初期設定
- LP CALL DIV
- OR ,='0'
- ST ,0,GR6 ; 10 進数字1文字格納
- CPL GR6,GR7
- JZE FIN
- LAD GR6,1,GR6
- LD GR1,GR4 ; 被除数の再設定
- LD GR2,GR5
-
- JUMP LP
- FIN RPOP
- RET
- UDAT DC 0
- DC 10000
- DC 0
- DC 1000
- DC 0
- DC 100
- DC 0
- DC 10
- DC 0
- DC 1
- END
+BTOD START
+ RPUSH
+ LD GR6,GR3
+ LAD GR7,4,GR3
+ LAD GR3,UDAT ; 除数の初期設定
+LP CALL DIV
+ OR GR2,='0'
+ ST GR2,0,GR6 ; 10進数字1文字格納
+ CPL GR6,GR7
+ JZE FIN
+ LAD GR6,1,GR6
+ LD GR1,GR4 ; 被除数の再設定
+ LD GR2,GR5
+ LAD GR3,2,GR3
+ JUMP LP
+FIN RPOP
+ RET
+UDAT DC 0
+ DC 10000
+ DC 0
+ DC 1000
+ DC 0
+ DC 100
+ DC 0
+ DC 10
+ DC 0
+ DC 1
+ END