Atom BASIC Routines part 1

Constants

c2ac_RDRVEC,		; p_ (RDRVEC) 
c2ac_STRVEC,		; p_ (STRVEC) 
OSFIND: C278_SHUT,	; p_ (SHTVEC) OSSHUT:
; HTML Disassembly of file ABASIC.ROM
; File size is 4096 bytes, loaded at $C000-$CFFF
; Data included
; Data from $C000 to $C232 (563 bytes)
C000  3c        ??? 
C001  .BYTE 3d, 3e, fe, 2d, 2b, c8, 23, 28, 21, 3f  ; =>.-+.#(!?
C00B  .BYTE 52, 54, 4c, 43, 41, 50, 45, 47, 42, 46  ; RTLCAPEGBF
C015  .BYTE f0, 54, ff, 4f, cb, 53, cb, 54, 45, 50  ; .T.O.S.TEP
C01F  .BYTE cb, 54, c3, 48, 45, 4e, c3, 22, 24, ce  ; .T.HEN."$.
C029  .BYTE ce, cc, 24, 2c, c5, 24, 26, 3b, 0d, 2c  ; ..$,.$&.,
C033  .BYTE c3, c5, c2, 3e, c7, 3d, c7, c7, c7, 3d  ; ...>.=...=
C03D  .BYTE c7, c7, c8, 52, c7, c7, 4f, 41, fe, 24  ; ...R..OA.$
C047  .BYTE c7, 48, c9, 45, 4e, c9, 4e, 44, c7, c9  ; .H.EN.ND..
C051  .BYTE c9, c9, c9, 4e, 44, c9, 4f, 50,   ; ...ND.OP
C059	.BYTE c9, "OUNT"
C051	.BYTE c9, c9
C053	.BYTE c9, "ND", 
C056	.BYTE c9, "OP"
C059	.BYTE c9, "OUNT"
C05E	.BYTE c9, "BS"
C061	.BYTE c9, "TR", 
C064	.BYTE cf, "XT"
C067	.BYTE cf, "ET"
C06A	.BYTE cf, "GET", 
C06E	.BYTE cf, "IN"
C071	.BYTE cf, "OUT"
C075	.BYTE cf, c3 
CO77	.BYTE c3, "RINT"
C07C  .BYTE c3, 4e, 4c, 55, 4e, 49, 47  ; .NLUNIG
C083  .BYTE 52, 46, 21, 3f, 24, 50, 44, 4c, 53, 42  ; RF!?$PDLSB
C08D  .BYTE 2a, 45, f0, 41, 56, 45, cf, 45, 57, c2  ; *E.AVE.EW.
C097  .BYTE 4f, cc, 45, 54, c3, 49, 4e, 4b, c3, 49  ; O.ET.INK.I
C0A1  .BYTE 53, 54, ca, 4f, 41, 44, ce, 4e, 54, 49  ; ST.OAD.NTI
C0AB  .BYTE 4c, cc, 45, 58, 54, ca, 46, c5, 4e, 50  ; L.EXT.F.NP
C0B5  .BYTE 55, 54, 
C0AB	.BYTE 4c, cc, 45, 58, 54, ca, 46, c5, 4e, 50, 55, 54, ; L.EXT.F.NPUT 
C0B7	.BYTE cc, "OSUB"
C0BC	.BYTE cb, "OT0"
C0C0	.BYTE cc, "ETURN"
C0C6	.BYTE cb, "EM"
C0C9	.BYTE c5, "UN"
C0CC	.BYTE f1, "OR"
C0CF	.BYTE cb, "ND"
C0D2	.BYTE cd, "GET"
C0D6	.BYTE cf, "PUT"
C0DA	.BYTE cf, "HUT"
C0DE	.BYTE cf, "PUT"
C0E2	.BYTE cf, "TR"
C0E5	.BYTE cf, "UT"
C0E8  .BYTE cf, c3, c4, cd, c4, 2c, fe, 36, 3b      ;   .....,.6;
C0F1  .BYTE 3c, c0, 3f, 06, dc, 50, 51, 52, 53, 54  ; <.?..PQRST
C0FB  .BYTE 57, 4a, 5a, 5f, 62, 65, 68, 6b, 6f, 2e  ; WJZ_behko.
C105  .BYTE 18, ac, 17, 81, 1c, be, 17, 17, 17, a2  ; ..........
C10F  .BYTE 22, 1b, 17, 17, 17, 1b, 29, 28, b6, bf  ; ".....)(..
C119  .BYTE b6, 2a, b7, 58, 76, 77, 34, 34, 7c, 3f  ; .*.Xvw44|?
C123  .BYTE 4a, 78, 38, 6d, 3a, 64, 74, 5b, 3e, 7b  ; Jx8m:dt[>{
C12D  .BYTE 82, c1, 45, 22, 31, 40, 4d, 4d, 42, 53  ; ..E"1@MMBS
C137  .BYTE 15, d2, 15, 15, bd, 45, 45, 14, 0a, 44  ; .....EE..D
C141  .BYTE 5f, 4c, 15, 15, 86, 15, 15, 73, 48, 15  ; _L.....sH.
C14B  .BYTE 15, 15, 7a, 15, 15, 02, 15, 15, 29, 15  ; ..z.....).
C155  .BYTE 15, 28, 15, 15, 66, 15, 15, 15, 5b, 72  ; .(..f...[r
C15F  .BYTE 15, a6, 15, 15, 15, a7, 90, 35, e3, 8f  ; .......5..
C169  .BYTE 8f, 8f, 34, 94, a0, a8, ad, b1, bd, c1  ; ..4.......
C173  .BYTE cd, e9, ea, eb, 78, 97, 99, d3, df, ec  ; ....x.....
C17D  .BYTE d0, 4b, 8f, 8f, 8f, 0a, 8f, ad, ad, 8f  ; .K........
C187  .BYTE f0, 9c, 8f, 25, 8f, 8f, 8f, b2, a4, 9c  ; ...%......
C191  .BYTE 8f, 51, 99, 8f, 8f, ed, 8f, 8f, 8f, 8f  ; .Q........
C19B  .BYTE d2, 8f, 8f, 8f, cd, b3, 66, 8f, 8f, 8f  ; ......f...
C1A5  .BYTE 8f, 81, 8f, 8f, 8f, 8f, d2, 8f, b8, 8f  ; ..........
C1AF  .BYTE 05, ca, c7, 8f, 8f, 8f, ec, 8f, 8f, 75  ; .........u
C1B9  .BYTE 8f, 8f, 41, 8f, 8f, 57, 8f, 8f, 98, d7  ; ..A..W....
C1C3  .BYTE 8f, 8f, e3, db, 8f, 8f, c5, 90, 8f, 8f  ; ..........
C1CD  .BYTE b6, 8f, 8f, 8f, 8f, e6, 8f, 47, 8f, 8f  ; .......G..
C1D7  .BYTE 95, ee, 06, 5c, 0f, 35, 2d, 2b, 7c, 3a  ; ...\.5-+|:
C1E1  .BYTE fe, 2a, 2f, 25, 21, 3f, 26, fe, 29, ff  ; .*/%!?&.).
C1EB  .BYTE 3d, ff, 21, 3f, 24, ff, 3d, 21, 3f, ff  ; =.!?$.=!?.
C1F5  .BYTE 27, 22, fe, b7, 9a, d3, ef, ef, 13, 5e  ; '".......^
C1FF  .BYTE 70, b3, 9c, 7b, 7b, 78, 78, 78, 78, ee  ; p..{{xxxx.
C209  .BYTE 06, 5c, 5c, e5, 75, 7b, 7b, 6f, 7a, c7  ; .\\.u{{oz.
C213  .BYTE c7, c7, c7, c7, c8, c8, c8, c8, c8, c8  ; ..........
C21D  .BYTE c8, c2, c2, c2, c2, c3, c4, cd, cd, c3  ; ..........
C227  .BYTE cd, cd, cd, c3, c3, 20, 3e, cf, 84, 0f  ; ..... >...
C231  .BYTE a2, ed                                  ; ..
C233  a4 03     ldy $03
C235  88        dey 
C236  c8        iny 
C237  b1 05     lda ($05),Y
C239  c9 20     cmp #$20
C23B  f0 f9     beq $C236
C23D  84 5e     sty $5E
C23F  85 52     sta $52
C241  e8        inx 
C242  bd ff bf  lda $BFFF,X
C245  30 24     bmi $C26B
C247  c5 52     cmp $52
C249  d0 f6     bne $C241
C24B  bd ee c0  lda $C0EE,X
C24E  aa        tax 
C24F  e8        inx 
C250  c8        iny 
C251  bd ff bf  lda $BFFF,X
C254  30 15     bmi $C26B
C256  d1 05     cmp ($05),Y
C258  f0 f5     beq $C24F
C25A  b1 05     lda ($05),Y
C25C  c9 2e     cmp #$2E
C25E  f0 04     beq $C264
C260  a4 5e     ldy $5E
C262  10 e7     bpl $C24B
C264  e8        inx 
C265  bd ff bf  lda $BFFF,X
C268  10 fa     bpl $C264
C26A  c8        iny 
C26B  c9 fe     cmp #$FE
C26D  b0 3b     bcs $C2AA
C26F  85 53     sta $53
C271  bd ee c0  lda $C0EE,X
C274  90 29     bcc $C29F
C276  a6 04     ldx $04
C278  60        rts		; the Kernel sets the SHUT vector to point here by default.

; Data at $C279 and $C27A
C279	.BYTE a2, 0e 
C27B  a4 03     ldy $03
C27D  88        dey 
C27E  c8        iny 
C27F  b1 05     lda ($05),Y
C281  c9 20     cmp #$20
C283  f0 f9     beq $C27E
C285  dd dd c1  cmp $C1DD,X
C288  f0 0c     beq $C296
C28A  85 52     sta $52
C28C  e8        inx 
C28D  bd dd c1  lda $C1DD,X
C290  30 16     bmi $C2A8
C292  c5 52     cmp $52
C294  d0 f6     bne $C28C
C296  bd 12 c2  lda $C212,X
C299  85 53     sta $53
C29B  bd f8 c1  lda $C1F8,X
C29E  c8        iny 
C29F  85 52     sta $52
C2A1  84 03     sty $03
C2A3  a6 04     ldx $04
C2A5  6c 52 00  jmp ($0052)

C2A8  c9 fe     cmp #$FE
C2AA  f0 ca     beq $C276
C2AC  00        brk 
; the Kernel sets the SHUT vector to point to C2AC by default.
C2AD  20 e4 c4  jsr $C4E4
C2B0  d0 04     bne $C2B6
C2B2  a9 29     lda #$29
C2B4  85 12     sta $12
C2B6  a9 0d     lda #$0D
C2B8  a4 12     ldy $12
C2BA  84 0e     sty $0E
C2BC  a0 00     ldy #$00
C2BE  84 0d     sty $0D
C2C0  91 0d     sta ($0D),Y
C2C2  a9 ff     lda #$FF
C2C4  c8        iny 
C2C5  91 0d     sta ($0D),Y
C2C7  c8        iny 
C2C8  84 0d     sty $0D
C2CA  a9 08     lda #$08
C2CC  8d 21 03  sta $0321
C2CF  a9 3e     lda #$3E
C2D1  d8        cld 
C2D2  20 0f cd  jsr $CD0F
C2D5  a2 01     ldx #$01
C2D7  86 06     stx $06
C2D9  ca        dex 
C2DA  86 05     stx $05
C2DC  86 01     stx $01
C2DE  86 02     stx $02
C2E0  a9 d8     lda #$D8
C2E2  8d 02 02  sta $0202
C2E5  a9 c9     lda #$C9
C2E7  8d 03 02  sta $0203
C2EA  a9 e7     lda #$E7
C2EC  85 10     sta $10
C2EE  a9 c9     lda #$C9
C2F0  85 11     sta $11

Atom magic book: C2F2 Entry point for BASIC interpreter;
locations 5 and 6 should point to the start of the BASIC program
C2F2  a2 ff     ldx #$FF
C2F4  9a        txs 
C2F5  a9 00     lda #$00
C2F7  85 04     sta $04
C2F9  85 03     sta $03
C2FB  85 15     sta $15
C2FD  85 13     sta $13
C2FF  85 14     sta $14
C301  a2 34     ldx #$34
C303  9d 8c 03  sta $038C,X
C306  ca        dex 
C307  d0 fa     bne $C303	; loop while x >0
C309  20 34 c4  jsr $C434
C30C  b0 21     bcs $C32F
C30E  20 6a c4  jsr $C46A
C311  90 03     bcc $C316
C313  4c c9 cd  jmp $CDC9

C316  a2 7d     ldx #$7D
C318  4c 33 c2  jmp $C233

C31B  20 34 c4  jsr $C434
C31E  b0 0f     bcs $C32F
C320  a2 7f     ldx #$7F
C322  4c 33 c2  jmp $C233

C325  20 34 c4  jsr $C434
C328  b0 05     bcs $C32F
C32A  a2 10     ldx #$10
C32C  4c 7b c2  jmp $C27B

C32F  a2 14     ldx #$14
C331  4c 7b c2  jmp $C27B

C334  38        sec 
C335  66 0f     ror $0F
C337  20 72 c3  jsr $C372
C33A  a2 2e     ldx #$2E
C33C  4c 33 c2  jmp $C233

C33F  20 8b c7  jsr $C78B
C342  20 cb c3  jsr $C3CB
C345  a5 0f     lda $0F
C347  30 21     bmi $C36A
C349  a2 00     ldx #$00
C34B  86 27     stx $27
C34D  a0 00     ldy #$00
C34F  b9 52 00  lda $0052,Y
C352  48        pha 
C353  29 0f     and #$0F
C355  95 45     sta $45,X
C357  68        pla 
C358  4a        lsr A
C359  4a        lsr A
C35A  4a        lsr A
C35B  4a        lsr A
C35C  e8        inx 
C35D  95 45     sta $45,X
C35F  e8        inx 
C360  c8        iny 
C361  c0 04     cpy #$04
C363  90 ea     bcc $C34F
C365  20 c8 c5  jsr $C5C8
C368  30 cd     bmi $C337
C36A  20 89 c5  jsr $C589
C36D  30 c8     bmi $C337
C36F  20 54 cd  jsr $CD54

C372  a2 18     ldx #$18
C374  4c 7b c2  jmp $C27B

C377  20 4c ca  jsr $CA4C
C37A  b1 05     lda ($05),Y
C37C  c8        iny 
C37D  c9 0d     cmp #LF
C37F  f0 1c     beq $C39D
C381  84 03     sty $03
C383  c9 22     cmp #$22
C385  d0 f0     bne $C377
C387  b1 05     lda ($05),Y
C389  c9 22     cmp #$22
C38B  d0 e5     bne $C372
C38D  c8        iny 
C38E  b0 e7     bcs $C377
C390  20 8b c7  jsr $C78B
C393  20 cb c3  jsr $C3CB
C396  05 54     ora $54
C398  05 53     ora $53
C39A  f0 0e     beq $C3AA
C39C  a0 00     ldy #$00
C39E  b1 52     lda ($52),Y
C3A0  c9 0d     cmp #LF
C3A2  f0 93     beq $C337
C3A4  20 4c ca  jsr $CA4C
C3A7  c8        iny 
C3A8  d0 f4     bne $C39E
C3AA  a5 52     lda $52
C3AC  20 4c ca  jsr $CA4C
C3AF  4c 37 c3  jmp $C337
C3B2  20 c8 c3  jsr $C3C8
C3B5  20 e4 c4  jsr $C4E4
C3B8  ad 22 03  lda $0322
C3BB  ae 39 03  ldx $0339
C3BE  ac 3a 03  ldy $033A
C3C1  20 a5 c2  jsr $C2A5
C3C4  d8        cld 
C3C5  4c 5b c5  jmp $C55B
C3C8  20 bc c8  jsr $C8BC
C3CB  a0 52     ldy #$52
C3CD  ca        dex 
C3CE  86 04     stx $04
C3D0  b5 16     lda $16,X
C3D2  99 00 00  sta $0000,Y
C3D5  b5 25     lda $25,X
C3D7  99 01 00  sta $0001,Y
C3DA  b5 34     lda $34,X
C3DC  99 02 00  sta $0002,Y
C3DF  b5 43     lda $43,X
C3E1  99 03 00  sta $0003,Y
C3E4  60        rts 
C3E5  20 e1 c4  jsr $C4E1
C3E8  20 2f ca  jsr $CA2F
C3EB  4c 5b c5  jmp $C55B
C3EE  20 bc c8  jsr $C8BC
C3F1  20 93 ce  jsr $CE93
C3F4  b5 26     lda $26,X
C3F6  c8        iny 
C3F7  91 52     sta ($52),Y
C3F9  c8        iny 
C3FA  b5 35     lda $35,X
C3FC  91 52     sta ($52),Y
C3FE  c8        iny 
C3FF  b5 44     lda $44,X
C401  91 52     sta ($52),Y
C403  4c 5b c5  jmp $C55B
C406  20 bc c8  jsr $C8BC
C409  20 93 ce  jsr $CE93
C40C  4c 5b c5  jmp $C55B
C40F  a2 00     ldx #$00
C411  b1 05     lda ($05),Y
C413  9d 00 01  sta $0100,X
C416  84 03     sty $03
C418  c8        iny 
C419  e8        inx 
C41A  c9 0d     cmp #LF
C41C  d0 f3     bne $C411
C41E  20 f7 ff  jsr $FFF7
C421  4c 58 c5  jmp $C558
C424  ad 00 d0  lda $D000
C427  c9 aa     cmp #$AA
C429  d0 38     bne $C463
C42B  4a        lsr A
C42C  cd 01 d0  cmp $D001
C42F  d0 32     bne $C463
C431  a4 5e     ldy $5E
C433  60        rts

C434  a4 03     ldy $03
C436  10 03     bpl $C43B
C438  c8        iny 
C439  84 03     sty $03
C43B  b1 05     lda ($05),Y
C43D  c9 20     cmp #$20
C43F  f0 f7     beq $C438
C441  c9 5b     cmp #$5B
C443  b0 1e     bcs $C463
C445  e9 3f     sbc #$3F
C447  90 1b     bcc $C464
C449  a6 04     ldx $04
C44B  95 16     sta $16,X
C44D  c8        iny 
C44E  b1 05     lda ($05),Y
C450  c9 2e     cmp #$2E
C452  f0 0f     beq $C463
C454  c9 5b     cmp #$5B
C456  b0 04     bcs $C45C
C458  c9 40     cmp #$40
C45A  b0 07     bcs $C463
C45C  e8        inx 
C45D  86 04     stx $04
C45F  38        sec 
C460  84 03     sty $03
C462  60        rts 
C463  18        clc 
C464  60        rts 

; Data from $C465 to $C469 (5 bytes)
C465  .BYTE 20, 34, c4, b0, bb                      ;  4...
C46A  a2 00     ldx #$00
C46C  a4 03     ldy $03
C46E  86 52     stx $52
C470  86 53     stx $53
C472  86 54     stx $54
C474  86 55     stx $55
C476  88        dey 
C477  c8        iny 
C478  b1 05     lda ($05),Y
C47A  38        sec 
C47B  e9 30     sbc #$30
C47D  30 54     bmi $C4D3
C47F  c9 0a     cmp #$0A
C481  b0 50     bcs $C4D3
C483  a6 53     ldx $53
C485  48        pha 
C486  a5 55     lda $55
C488  48        pha 
C489  a5 54     lda $54
C48B  48        pha 
C48C  a5 52     lda $52
C48E  0a        asl A
C48F  26 53     rol $53
C491  26 54     rol $54
C493  26 55     rol $55
C495  30 d4     bmi $C46B
C497  0a        asl A
C498  26 53     rol $53
C49A  26 54     rol $54
C49C  26 55     rol $55
C49E  30 cb     bmi $C46B
C4A0  65 52     adc $52
C4A2  85 52     sta $52
C4A4  8a        txa 
C4A5  65 53     adc $53
C4A7  85 53     sta $53
C4A9  68        pla 
C4AA  65 54     adc $54
C4AC  85 54     sta $54
C4AE  68        pla 
C4AF  65 55     adc $55
C4B1  06 52     asl $52
C4B3  26 53     rol $53
C4B5  26 54     rol $54
C4B7  2a        rol A
C4B8  30 b1     bmi $C46B
C4BA  85 55     sta $55
C4BC  68        pla 
C4BD  65 52     adc $52
C4BF  85 52     sta $52
C4C1  90 0c     bcc $C4CF
C4C3  e6 53     inc $53
C4C5  d0 08     bne $C4CF
C4C7  e6 54     inc $54
C4C9  d0 04     bne $C4CF
C4CB  e6 55     inc $55
C4CD  30 9c     bmi $C46B
C4CF  a2 ff     ldx #$FF
C4D1  d0 a4     bne $C477
C4D3  8a        txa 
C4D4  f0 8d     beq $C463
C4D6  38        sec 
C4D7  84 03     sty $03
C4D9  a0 52     ldy #$52
C4DB  4c 9f c9  jmp $C99F

; Data from $C4DE to $C4FF (34 bytes)
C4DE  20 79 c2  jsr $C279
C4E1  20 8b c7  jsr $C78B
C4E4  a4 03     ldy $03
C4E6  88        dey 
C4E7  c8        iny 
C4E8  b1 05     lda ($05),Y
C4EA  c9 20     cmp #SP
C4EC  f0 f9     beq $C4E7
C4EE  c9 3b     cmp #$3B
C4F0  f0 04     beq $C4F6
C4F2  c9 0d     cmp #CR
C4F4  d0 66     bne $C55C
C4F6  18        clc 
C4F7  98        tya 
C4F8  65 05     adc $05
C4FA  85 05     sta $05
C4FC  90 02     bcc $C500
C4FE  e6 06     inc $06
C500  a0 01     ldy #$01
C502  84 03     sty $03
C504  ad 01 b0  lda $B001
C507  29 20     and #$20
C509  f0 3c     beq $C547
C50B  60        rts 

C50C  20 e4 c4  jsr $C4E4
C50F  88        dey 
C510  b1 05     lda ($05),Y
C512  c9 3b     cmp #$3B
C514  f0 f5     beq $C50B
C516  a5 06     lda $06
C518  c9 01     cmp #$01
C51A  f0 7a     beq $C596
C51C  c8        iny 
C51D  b1 05     lda ($05),Y
C51F  30 3b     bmi $C55C
C521  85 02     sta $02
C523  c8        iny 
C524  b1 05     lda ($05),Y
C526  85 01     sta $01
C528  c8        iny 
C529  b1 05     lda ($05),Y
C52B  88        dey 
C52C  c9 61     cmp #$61
C52E  90 c7     bcc $C4F7
C530  e9 61     sbc #$61
C532  c9 1b     cmp #$1B
C534  b0 c0     bcs $C4F6
C536  c8        iny 
C537  0a        asl A
C538  aa        tax 
C539  20 f6 c4  jsr $C4F6
C53C  a5 05     lda $05
C53E  9d 8d 03  sta $038D,X
C541  a5 06     lda $06
C543  9d 8e 03  sta $038E,X
C546  60        rts 

C547  4c cf c2  jmp $C2CF

C54A  88        dey 
C54B  20 f6 c4  jsr $C4F6
C54E  d0 0b     bne $C55B
C550  20 24 c4  jsr $C424
C553  90 03     bcc $C558
C555  6c 02 d0  jmp ($D002)
C558  20 e4 c4  jsr $C4E4
C55B  a0 00     ldy #$00
C55D  b1 05     lda ($05),Y
C55F  c9 3b     cmp #$3B
C561  d0 1a     bne $C57D
C563  4c 1b c3  jmp $C31B
C566  20 0c c7  jsr $C70C
C569  ca        dex 
C56A  86 04     stx $04
C56C  b5 16     lda $16,X
C56E  f0 05     beq $C575
C570  a2 20     ldx #$20
C572  4c 33 c2  jmp $C233

C575  a9 0d     lda #$0D
C577  88        dey 
C578  c8        iny 
C579  d1 05     cmp ($05),Y
C57B  d0 fb     bne $C578
C57D  a5 06     lda $06
C57F  c9 01     cmp #$01
C581  f0 c4     beq $C547
C583  20 1c c5  jsr $C51C
C586  4c 1b c3  jmp $C31B

Print 4-byte binary integer from #16, #25, #34, #43 (MSB)

C589  a5 43     lda $43		; HH
C58B  85 27     sta $27
C58D  10 04     bpl $C593
C58F  e8        inx 
C590  20 c4 c8  jsr $C8C4
C593  a2 09     ldx #$09
C595  a9 00     lda #$00
C597  95 45     sta $45,X
C599  38        sec 
C59A  a5 16     lda $16
C59C  fd 08 c6  sbc $C608,X
C59F  48        pha 
C5A0  a5 25     lda $25
C5A2  fd 10 c6  sbc $C610,X
C5A5  48        pha 
C5A6  a5 34     lda $34		; HL
C5A8  fd 1a c6  sbc $C61A,X
C5AB  a8        tay 
C5AC  a5 43     lda $43
C5AE  fd 24 c6  sbc $C624,X
C5B1  90 0e     bcc $C5C1
C5B3  85 43     sta $43
C5B5  84 34     sty $34
C5B7  68        pla 
C5B8  85 25     sta $25
C5BA  68        pla 
C5BB  85 16     sta $16
C5BD  f6 45     inc $45,X
C5BF  d0 d8     bne $C599
C5C1  68        pla 
C5C2  68        pla 
C5C3  ca        dex 
C5C4  10 cf     bpl $C595
C5C6  a2 0a     ldx #$0A	; TEN
C5C8  ca        dex 
C5C9  f0 04     beq $C5CF
C5CB  b5 45     lda $45,X
C5CD  f0 f9     beq $C5C8
C5CF  86 52     stx $52
C5D1  24 27     bit $27
C5D3  10 02     bpl $C5D7
C5D5  e6 52     inc $52
C5D7  38        sec 
C5D8  ad 21 03  lda $0321
C5DB  f0 02     beq $C5DF
C5DD  e9 01     sbc #$01
C5DF  e5 52     sbc $52
C5E1  f0 0b     beq $C5EE
C5E3  90 09     bcc $C5EE
C5E5  a8        tay 
C5E6  a9 20     lda #SP
C5E8  20 4c ca  jsr $CA4C
C5EB  88        dey 
C5EC  d0 f8     bne $C5E6
C5EE  24 27     bit $27
C5F0  10 05     bpl $C5F7
C5F2  a9 2d     lda #$2D
C5F4  20 4c ca  jsr $CA4C
C5F7  b5 45     lda $45,X
C5F9  c9 0a     cmp #LF
C5FB  90 02     bcc $C5FF
C5FD  69 06     adc #$06
C5FF  69 30     adc #$30
C601  20 4c ca  jsr $CA4C
C604  ca        dex 
C605  10 f0     bpl $C5F7
C607  60        rts 

; not machine code?
;C608  01 0a     ora ($0A,X)
;C60A  64        ??? 
; Data from $C608 to $C62D (38 bytes)
C608  .BYTE 01, 0a, 64, e8, 10, a0, 40, 80, 00, 00  ; ..d...@...
C612  .BYTE 00, 03, 27, 86, 42, 96, e1, ca, 00, 00  ; ..'.B.....
C61C  .BYTE 00, 00, 00, 01, 0f, 98, f5, 9a, 00, 00  ; ..........
C626  .BYTE 00, 00, 00, 00, 00, 00, 05, 3b          ; .......;
C62E  c6 04     dec $04
C630  a6 04     ldx $04
C632  a0 00     ldy #$00
C634  84 58     sty $58
C636  a5 12     lda $12
C638  85 59     sta $59
C63A  88        dey 
C63B  a9 0d     lda #CR
C63D  c8        iny 
C63E  d1 58     cmp ($58),Y
C640  d0 fb     bne $C63D
C642  20 a1 ce  jsr $CEA1
C645  b1 58     lda ($58),Y
C647  c8        iny 
C648  d5 25     cmp $25,X
C64A  90 ef     bcc $C63B
C64C  d0 12     bne $C660
C64E  b1 58     lda ($58),Y
C650  d5 16     cmp $16,X
C652  90 e7     bcc $C63B
C654  d0 0a     bne $C660
C656  85 01     sta $01
C658  b5 25     lda $25,X
C65A  85 02     sta $02
C65C  20 a1 ce  jsr $CEA1
C65F  18        clc 
C660  60        rts 

C661  20 bc c8  jsr $C8BC
C664  b5 42     lda $42,X
C666  55 41     eor $41,X
C668  85 52     sta $52
C66A  20 05 c9  jsr $C905
C66D  a0 53     ldy #$53
C66F  20 cd c3  jsr $C3CD
C672  b5 42     lda $42,X
C674  95 43     sta $43,X
C676  20 07 c9  jsr $C907
C679  a0 57     ldy #$57
C67B  20 cd c3  jsr $C3CD
C67E  a0 00     ldy #$00
C680  84 5b     sty $5B
C682  84 5c     sty $5C
C684  84 5d     sty $5D
C686  84 5e     sty $5E
C688  60        rts 

C689  20 61 c6  jsr $C661
C68C  a5 54     lda $54
C68E  20 05 c7  jsr $C705
C691  f0 ec     beq $C67F
C693  a0 20     ldy #$20
C695  88        dey 
C696  f0 41     beq $C6D9
C698  06 57     asl $57
C69A  26 58     rol $58
C69C  26 59     rol $59
C69E  26 5a     rol $5A
C6A0  10 f3     bpl $C695
C6A2  26 57     rol $57
C6A4  26 58     rol $58
C6A6  26 59     rol $59
C6A8  26 5a     rol $5A
C6AA  26 5b     rol $5B
C6AC  26 5c     rol $5C
C6AE  26 5d     rol $5D
C6B0  26 5e     rol $5E
C6B2  38        sec 
C6B3  a5 5b     lda $5B
C6B5  e5 53     sbc $53
C6B7  48        pha 
C6B8  a5 5c     lda $5C
C6BA  e5 54     sbc $54
C6BC  48        pha 
C6BD  a5 5d     lda $5D
C6BF  e5 55     sbc $55
C6C1  aa        tax 
C6C2  a5 5e     lda $5E
C6C4  e5 56     sbc $56
C6C6  90 0c     bcc $C6D4
C6C8  85 5e     sta $5E
C6CA  86 5d     stx $5D
C6CC  68        pla 
C6CD  85 5c     sta $5C
C6CF  68        pla 
C6D0  85 5b     sta $5B
C6D2  b0 02     bcs $C6D6
C6D4  68        pla 
C6D5  68        pla 
C6D6  88        dey 
C6D7  d0 c9     bne $C6A2
C6D9  60        rts 
C6DA  20 8b c7  jsr $C78B
C6DD  ca        dex 
C6DE  86 04     stx $04
C6E0  b5 42     lda $42,X
C6E2  49 80     eor #$80
C6E4  85 52     sta $52
C6E6  b5 43     lda $43,X
C6E8  49 80     eor #$80
C6EA  85 54     sta $54
C6EC  a0 00     ldy #$00
C6EE  38        sec 
C6EF  b5 15     lda $15,X
C6F1  f5 16     sbc $16,X
C6F3  85 53     sta $53
C6F5  b5 24     lda $24,X
C6F7  f5 25     sbc $25,X
C6F9  85 55     sta $55
C6FB  b5 33     lda $33,X
C6FD  f5 34     sbc $34,X
C6FF  85 56     sta $56
C701  a5 52     lda $52
C703  e5 54     sbc $54
C705  05 53     ora $53
C707  05 55     ora $55
C709  05 56     ora $56
C70B  60        rts 
C70C  20 2c c7  jsr $C72C
C70F  a2 43     ldx #$43
C711  4c 33 c2  jmp $C233
C714  20 2c c7  jsr $C72C
C717  b5 14     lda $14,X
C719  35 15     and $15,X
C71B  95 14     sta $14,X
C71D  c6 04     dec $04
C71F  4c 0f c7  jmp $C70F
; Data from $C722 to $C72B (10 bytes)
C722  .BYTE 20, 2c, c7, b5, 14, 15, 15, 4c, 1b, c7  ;  ,.....L..
C72C  a2 46     ldx #$46
C72E  4c 33 c2  jmp $C233
C731  20 8b c7  jsr $C78B
C734  20 ae ce  jsr $CEAE
C737  b5 15     lda $15,X
C739  85 54     sta $54
C73B  b5 24     lda $24,X
C73D  85 55     sta $55
C73F  a0 ff     ldy #$FF
C741  c8        iny 
C742  b1 54     lda ($54),Y
C744  d1 52     cmp ($52),Y
C746  d0 07     bne $C74F
C748  49 0d     eor #$0D
C74A  d0 f5     bne $C741
C74C  a8        tay 
C74D  f0 11     beq $C760
C74F  a0 00     ldy #$00
C751  f0 0e     beq $C761
C753  20 8b c7  jsr $C78B
C756  a2 00     ldx #$00
C758  4c 33 c2  jmp $C233
; Data from $C75B to $C75F (5 bytes)
C75B  .BYTE 20, da, c6, d0, 01                      ;  ....
C760  c8        iny 
C761  94 15     sty $15,X
C763  60        rts 
; Data from $C764 to $C78A (39 bytes)
C764  .BYTE 20, da, c6, f0, f7, 90, f5, b0, f4, 20  ;  ........ 
C76E  .BYTE da, c6, d0, ee, f0, ed, 20, da, c6, 90  ; ...... ...
C778  .BYTE e7, b0, e6, 20, da, c6, b0, e0, 90, df  ; ... ......
C782  .BYTE 20, da, c6, f0, da, b0, d7, 90, d6      ;  ........
C78B  20 0b c8  jsr $C80B
C78E  4c 95 c7  jmp $C795
C791  95 41     sta $41,X
C793  c6 04     dec $04
C795  a2 00     ldx #$00
C797  4c 7b c2  jmp $C27B
C79A  20 0b c8  jsr $C80B
C79D  18        clc 
C79E  b5 14     lda $14,X
C7A0  75 15     adc $15,X
C7A2  95 14     sta $14,X
C7A4  b5 23     lda $23,X
C7A6  75 24     adc $24,X
C7A8  95 23     sta $23,X
C7AA  b5 32     lda $32,X
C7AC  75 33     adc $33,X
C7AE  95 32     sta $32,X
C7B0  b5 41     lda $41,X
C7B2  75 42     adc $42,X
C7B4  4c 91 c7  jmp $C791
C7B7  20 0b c8  jsr $C80B
C7BA  b5 14     lda $14,X
C7BC  f5 15     sbc $15,X
C7BE  95 14     sta $14,X
C7C0  b5 23     lda $23,X
C7C2  f5 24     sbc $24,X
C7C4  95 23     sta $23,X
C7C6  b5 32     lda $32,X
C7C8  f5 33     sbc $33,X
C7CA  95 32     sta $32,X
C7CC  b5 41     lda $41,X
C7CE  f5 42     sbc $42,X
C7D0  4c 91 c7  jmp $C791
; Data from $C7D3 to $C80A (56 bytes)
C7D3  .BYTE 20, 0b, c8, b5, 14, 15, 15, 95, 14, b5  ;  .........
C7DD  .BYTE 23, 15, 24, 95, 23, b5, 32, 15, 33, 95  ; #.$.#.2.3.
C7E7  .BYTE 32, b5, 41, 15, 42, 4c, 91, c7, 20, 0b  ; 2.A.BL.. .
C7F1  .BYTE c8, b5, 14, 55, 15, 95, 14, b5, 23, 55  ; ...U....#U
C7FB  .BYTE 24, 95, 23, b5, 32, 55, 33, 95, 32, b5  ; $.#.2U3.2.
C805  .BYTE 41, 55, 42, 4c, 91, c7                  ; AUBL..
C80B  20 bc c8  jsr $C8BC
C80E  a2 05     ldx #$05
C810  4c 7b c2  jmp $C27B