A9 F3 8D 00 60 A9 00 8D 03 60 8D 04 60 8D 05 60 AD 00 60 8D 01 60 AD 01 60 C9 64 90 13 AD 01 60 38 E9 64 8D 01 60 EE 01 60 AD 01 60 C9 64 B0 ED AD 01 60 C9 0A 90 13 AD 01 60 38 E9 0A 8D 01 60 EE 04 60 AD 01 60 C9 0A B0 ED AD 01 60 8D 05 60
FB5B:A9 F3 LDA #$F3
FB5D:8D 00 60 STA $6000
FB60:A9 00 LDA #$00
FB62:8D 03 60 STA $6003
FB65:8D 04 60 STA $6004
FB68:8D 05 60 STA $6005
FB6B:AD 00 60 LDA $6000
FB6E:8D 01 60 STA $6001
FB71:AD 01 60 LDA $6001
FB74:C9 64 CMP #$64
FB76:90 13 BCC $FB8B
FB78:AD 01 60 LDA $6001
FB7B:38 SEC
FB7C:E9 64 SBC #$64
FB7E:8D 01 60 STA $6001
FB81:EE 03 60 INC $6003
FB84:AD 01 60 LDA $6001
FB87:C9 64 CMP #$64
FB89:B0 ED BCS $FB78
FB8B:AD 01 60 LDA $6001
FB8E:C9 0A CMP #$0A
FB90:90 13 BCC $FBA5
FB92:AD 01 60 LDA $6001
FB95:38 SEC
FB96:E9 0A SBC #$0A
FB98:8D 01 60 STA $6001
FB9B:EE 04 60 INC $6004
FB9E:AD 01 60 LDA $6001
FBA1:C9 0A CMP #$0A
FBA3:B0 ED BCS $FB92
FBA5:AD 01 60 LDA $6001
FBA8:8D 05 60 STA $6005
.ORG $FB5B
L1: ;initialise
LDA #$F3
STA $6000 ;$6000=F3
LDA #$00
STA $6003 ;$6003=00
STA $6004 ;$6004=00
STA $6005 ;$6005=00
L2: ;copy data $6000 to 6001
LDA $6000
STA $6001
L3: ;hundred
LDA $6001
CMP #$64
BCC L6 ;$6001<100 goto L6
L4:
LDA $6001
SEC
SBC #$64 ;$6001=$6001-100
STA $6001
INC $6003 ;hundred++
L5:
LDA $6001
CMP #$64
BCS L4 ;$6001>100 goto L4
L6: ;decade
LDA $6001
CMP #$0A
BCC L9 ;$6001<10 goto L9
L7:
LDA $6001
SEC
SBC #$0A
STA $6001 ;$6001=$6001-10
INC $6004 ;decade++
L8:
LDA $6001
CMP #$0A
BCS L7 ;$6001>10 goto L7
;unit
L9:
LDA $6001 ;$6005=$6001
STA $6005 ;unit
RTS ;return
FB5B:A9 F3 LDA #$F3
FB5D:8D 00 60 STA $6000
FB60:A9 00 LDA #$00
FB62:8D 03 60 STA $6003
FB65:8D 04 60 STA $6004
FB68:8D 05 60 STA $6005
FB6B:AD 00 60 LDA $6000
FB6E:8D 01 60 STA $6001
FB71:AD 01 60 LDA $6001
FB74:C9 64 CMP #$64
FB76:90 13 BCC $FB8B
FB78:AD 01 60 LDA $6001
FB7B:38 SEC
FB7C:E9 64 SBC #$64
FB7E:8D 01 60 STA $6001
FB81:EE 03 60 INC $6003
FB84:AD 01 60 LDA $6001
FB87:C9 64 CMP #$64
FB89:B0 ED BCS $FB78
FB8B:AD 01 60 LDA $6001
FB8E:C9 0A CMP #$0A
FB90:90 13 BCC $FBA5
FB92:AD 01 60 LDA $6001
FB95:38 SEC
FB96:E9 0A SBC #$0A
FB98:8D 01 60 STA $6001
FB9B:EE 04 60 INC $6004
FB9E:AD 01 60 LDA $6001
FBA1:C9 0A CMP #$0A
FBA3:B0 ED BCS $FB92
FBA5:AD 01 60 LDA $6001
FBA8:8D 05 60 STA $6005
.ORG $FB5B
L1: ;initialise
LDA #$F3
STA $6000 ;$6000=F3
LDA #$00
STA $6003 ;$6003=00
STA $6004 ;$6004=00
STA $6005 ;$6005=00
L2: ;copy data $6000 to 6001
LDA $6000
STA $6001
L3: ;hundred
LDA $6001
CMP #$64
BCC L6 ;$6001<100 goto L6
L4:
LDA $6001
SEC
SBC #$64 ;$6001=$6001-100
STA $6001
INC $6003 ;hundred++
L5:
LDA $6001
CMP #$64
BCS L4 ;$6001>100 goto L4
L6: ;decade
LDA $6001
CMP #$0A
BCC L9 ;$6001<10 goto L9
L7:
LDA $6001
SEC
SBC #$0A
STA $6001 ;$6001=$6001-10
INC $6004 ;decade++
L8:
LDA $6001
CMP #$0A
BCS L7 ;$6001>10 goto L7
;unit
L9:
LDA $6001 ;$6005=$6001
STA $6005 ;unit
RTS ;return