Browse Source

reindented BASIC_C64, KERNAL_C64 and DOS_1540 to approximate the LST output of the assembler

sed -e "s/^[ 	]//" | # remove leading spaces and tabs
sed -E -e "s/^(ADC|AND|ASL|BCC|BCS|BEQ|BIT|BMI|BNE|BPL|BRK|BVC|BVS|CLC|CLD|CLI|CLV|CMP|CPX|CPY|DEC|DEX|DEY|EOR|INC|INX|INY|JMP|JSR|LDA|LDX|LDY|LSR|NOP|ORA|PHA|PHP|PLA|PLP|ROL|ROR|RTI|RTS|SBC|SEC|SED|SEI|STA|STX|STY|TAX|TAY|TSX|TXA|TXS|TYA|\.[A-Z]*)[[:>:]]/	\1/" | # insert tab before mnemo
sed -E -e "s/^\*/	*/" | # insert tab before mnemo
sed -E -e "s/^([A-Z][A-Z0-9]*)  */\1	/" | # insert tab after label

sed -e "s/^\([A-Z0-9]*	[^;][^;][^;]\) ;/\1             ;/" |
sed -e "s/^\([A-Z0-9]*	[^;][^;][^;][^;]\) ;/\1            ;/" |
sed -e "s/^\([A-Z0-9]*	[^;][^;][^;][^;][^;]\) ;/\1           ;/" |
sed -e "s/^\([A-Z0-9]*	[^;][^;][^;][^;][^;][^;]\) ;/\1          ;/" |
sed -e "s/^\([A-Z0-9]*	[^;][^;][^;][^;][^;][^;][^;]\) ;/\1         ;/" |
sed -e "s/^\([A-Z0-9]*	[^;][^;][^;][^;][^;][^;][^;][^;]\) ;/\1        ;/" |
sed -e "s/^\([A-Z0-9]*	[^;][^;][^;][^;][^;][^;][^;][^;][^;]\) ;/\1       ;/" |
sed -e "s/^\([A-Z0-9]*	[^;][^;][^;][^;][^;][^;][^;][^;][^;][^;]\) ;/\1      ;/" |
sed -e "s/^\([A-Z0-9]*	[^;][^;][^;][^;][^;][^;][^;][^;][^;][^;][^;]\) ;/\1     ;/" |
sed -e "s/^\([A-Z0-9]*	[^;][^;][^;][^;][^;][^;][^;][^;][^;][^;][^;][^;]\) ;/\1    ;/" |
sed -e "s/^\([A-Z0-9]*	[^;][^;][^;][^;][^;][^;][^;][^;][^;][^;][^;][^;][^;]\) ;/\1   ;/" |
sed -e "s/^\([A-Z0-9]*	[^;][^;][^;][^;][^;][^;][^;][^;][^;][^;][^;][^;][^;][^;]\) ;/\1  ;/" |

sed -e "s/^	.PAG/.PAG/" |
sed -e "s/^	.SKI/.SKI/" |
sed -e "s/^	.END/.END/" |
sed -e "s/^	.LIB/.LIB/" |
sed -e "s/^	.FIL/.FIL/" |
sed -e "s/^	.OPT/.OPT/"
master
Michael Steil 2 years ago
parent
commit
cbb39a14f6
100 changed files with 7398 additions and 7398 deletions
  1. 160
    160
      BASIC_C64/code1
  2. 171
    171
      BASIC_C64/code10
  3. 167
    167
      BASIC_C64/code11
  4. 152
    152
      BASIC_C64/code12
  5. 151
    151
      BASIC_C64/code13
  6. 206
    206
      BASIC_C64/code14
  7. 156
    156
      BASIC_C64/code15
  8. 162
    162
      BASIC_C64/code16
  9. 159
    159
      BASIC_C64/code17
  10. 124
    124
      BASIC_C64/code18
  11. 211
    211
      BASIC_C64/code19
  12. 158
    158
      BASIC_C64/code2
  13. 142
    142
      BASIC_C64/code20
  14. 142
    142
      BASIC_C64/code21
  15. 148
    148
      BASIC_C64/code22
  16. 77
    77
      BASIC_C64/code23
  17. 19
    19
      BASIC_C64/code24
  18. 118
    118
      BASIC_C64/code25
  19. 190
    190
      BASIC_C64/code26
  20. 137
    137
      BASIC_C64/code3
  21. 141
    141
      BASIC_C64/code4
  22. 147
    147
      BASIC_C64/code5
  23. 144
    144
      BASIC_C64/code6
  24. 141
    141
      BASIC_C64/code7
  25. 144
    144
      BASIC_C64/code8
  26. 198
    198
      BASIC_C64/code9
  27. 114
    114
      BASIC_C64/declare
  28. 107
    107
      BASIC_C64/init
  29. 243
    243
      BASIC_C64/token2
  30. 125
    125
      BASIC_C64/tokens
  31. 100
    100
      BASIC_C64/trig
  32. 33
    33
      DOS_1540/addfil
  33. 58
    58
      DOS_1540/addrel
  34. 11
    11
      DOS_1540/allromcheck
  35. 15
    15
      DOS_1540/autoit
  36. 133
    133
      DOS_1540/block
  37. 3
    3
      DOS_1540/chksum
  38. 41
    41
      DOS_1540/close
  39. 11
    11
      DOS_1540/common
  40. 30
    30
      DOS_1540/copall
  41. 20
    20
      DOS_1540/copset
  42. 4
    4
      DOS_1540/dos
  43. 88
    88
      DOS_1540/dskint.sf
  44. 3
    3
      DOS_1540/duplct
  45. 1
    1
      DOS_1540/echksm
  46. 12
    12
      DOS_1540/equate
  47. 26
    26
      DOS_1540/equate.sf
  48. 2
    2
      DOS_1540/erom
  49. 78
    78
      DOS_1540/erproc
  50. 53
    53
      DOS_1540/fndrel
  51. 59
    59
      DOS_1540/frets
  52. 4
    4
      DOS_1540/getact
  53. 26
    26
      DOS_1540/i_odef
  54. 32
    32
      DOS_1540/i_odef.sf
  55. 21
    21
      DOS_1540/idle
  56. 37
    37
      DOS_1540/idle...sf
  57. 43
    43
      DOS_1540/ieee
  58. 54
    54
      DOS_1540/ieee...sf
  59. 81
    81
      DOS_1540/im
  60. 58
    58
      DOS_1540/init
  61. 8
    8
      DOS_1540/irq
  62. 80
    80
      DOS_1540/jobs
  63. 90
    90
      DOS_1540/jobs...sf
  64. 14
    14
      DOS_1540/lcc.bingcr
  65. 43
    43
      DOS_1540/lcc.cntrl
  66. 2
    2
      DOS_1540/lcc.conhdr
  67. 35
    35
      DOS_1540/lcc.end
  68. 71
    71
      DOS_1540/lcc.fmt1
  69. 47
    47
      DOS_1540/lcc.fmt2
  70. 26
    26
      DOS_1540/lcc.fmt3
  71. 26
    26
      DOS_1540/lcc.fmt4
  72. 81
    81
      DOS_1540/lcc.gcrbin
  73. 14
    14
      DOS_1540/lcc.i_o
  74. 13
    13
      DOS_1540/lcc.init
  75. 35
    35
      DOS_1540/lcc.read
  76. 48
    48
      DOS_1540/lcc.seek
  77. 15
    15
      DOS_1540/lcc.util
  78. 35
    35
      DOS_1540/lcc.var
  79. 58
    58
      DOS_1540/lcc.wrt
  80. 5
    5
      DOS_1540/leds
  81. 121
    121
      DOS_1540/lookup
  82. 18
    18
      DOS_1540/lstdir
  83. 77
    77
      DOS_1540/m.l.ieee
  84. 25
    25
      DOS_1540/map
  85. 57
    57
      DOS_1540/master
  86. 77
    77
      DOS_1540/master.gerry
  87. 75
    75
      DOS_1540/master.sf
  88. 15
    15
      DOS_1540/memrw
  89. 39
    39
      DOS_1540/new
  90. 28
    28
      DOS_1540/newss
  91. 8
    8
      DOS_1540/nulbuf
  92. 40
    40
      DOS_1540/opchnl
  93. 91
    91
      DOS_1540/open
  94. 74
    74
      DOS_1540/parsex
  95. 121
    121
      DOS_1540/ramvar
  96. 113
    113
      DOS_1540/ramvar.sf
  97. 32
    32
      DOS_1540/record
  98. 34
    34
      DOS_1540/rel1
  99. 16
    16
      DOS_1540/rel2
  100. 0
    0
      DOS_1540/rel3

+ 160
- 160
BASIC_C64/code1 View File

@@ -1,173 +1,173 @@
1 1
 .PAG 'CODE1'
2
-OMERR LDX #ERROM
3
-ERROR JMP (IERROR)
4
-NERROX TXA
5
-ASL A
6
-TAX
7
-LDA ERRTAB-2,X
8
-STA INDEX1
9
-LDA ERRTAB-1,X
10
-STA INDEX1+1
11
-JSR CLSCHN
12
-LDA #0
13
-STA CHANNL
14
-ERRCRD JSR CRDO
15
-JSR OUTQST
16
-LDY #0
17
-GETERR LDA (INDEX1)Y
18
-PHA
19
-AND #127
20
-JSR OUTDO
21
-INY
22
-PLA
23
-BPL GETERR
24
-JSR STKINI
25
-LDA #<ERR
26
-LDY #>ERR
27
-ERRFIN JSR STROUT
28
-LDY CURLIN+1
29
-INY
30
-BEQ READYX
31
-JSR INPRT
2
+OMERR	LDX #ERROM
3
+ERROR	JMP (IERROR)
4
+NERROX	TXA
5
+	ASL A
6
+	TAX
7
+	LDA ERRTAB-2,X
8
+	STA INDEX1
9
+	LDA ERRTAB-1,X
10
+	STA INDEX1+1
11
+	JSR CLSCHN
12
+	LDA #0
13
+	STA CHANNL
14
+ERRCRD	JSR CRDO
15
+	JSR OUTQST
16
+	LDY #0
17
+GETERR	LDA (INDEX1)Y
18
+	PHA
19
+	AND #127
20
+	JSR OUTDO
21
+	INY
22
+	PLA
23
+	BPL GETERR
24
+	JSR STKINI
25
+	LDA #<ERR
26
+	LDY #>ERR
27
+ERRFIN	JSR STROUT
28
+	LDY CURLIN+1
29
+	INY
30
+	BEQ READYX
31
+	JSR INPRT
32 32
 .SKI 5
33
-READYX LDA #<REDDY
34
-LDY #>REDDY
35
-JSR STROUT
36
-LDA #$80 ;DIRECT MESSAGES ON
37
-JSR SETMSG ;FROM KERNAL
33
+READYX	LDA #<REDDY
34
+	LDY #>REDDY
35
+	JSR STROUT
36
+	LDA #$80        ;DIRECT MESSAGES ON
37
+	JSR SETMSG      ;FROM KERNAL
38 38
 .SKI 5
39
-MAIN JMP (IMAIN)
40
-NMAIN JSR INLIN
41
-STX TXTPTR
42
-STY TXTPTR+1
43
-JSR CHRGET
44
-TAX
45
-BEQ MAIN
46
-LDX #255
47
-STX CURLIN+1
48
-BCC MAIN1
49
-JSR CRUNCH
50
-JMP GONE
51
-MAIN1 JSR LINGET
52
-JSR CRUNCH
53
-STY COUNT
54
-JSR FNDLIN
55
-BCC NODEL
56
-LDY #1
57
-LDA (LOWTR)Y
58
-STA INDEX1+1
59
-LDA VARTAB
60
-STA INDEX1
61
-LDA LOWTR+1
62
-STA INDEX2+1
63
-LDA LOWTR
64
-DEY
65
-SBC (LOWTR)Y 
66
-CLC
67
-ADC VARTAB
68
-STA VARTAB
69
-STA INDEX2
70
-LDA VARTAB+1
71
-ADC #255
72
-STA VARTAB+1
73
-SBC LOWTR+1
74
-TAX
75
-SEC
76
-LDA LOWTR
77
-SBC VARTAB
78
-TAY
79
-BCS QDECT1
80
-INX
81
-DEC INDEX2+1
82
-QDECT1 CLC
83
-ADC INDEX1
84
-BCC MLOOP
85
-DEC INDEX1+1
86
-CLC
87
-MLOOP LDA (INDEX1)Y
88
-STA (INDEX2)Y
89
-INY 
90
-BNE MLOOP
91
-INC INDEX1+1
92
-INC INDEX2+1
93
-DEX
94
-BNE MLOOP
95
-NODEL JSR RUNC
96
-JSR LNKPRG
97
-LDA BUF
98
-BEQ MAIN
99
-CLC
100
-LDA VARTAB
101
-STA HIGHTR 
102
-ADC COUNT
103
-STA HIGHDS
104
-LDY VARTAB+1
105
-STY HIGHTR+1
106
-BCC NODELC
107
-INY
108
-NODELC STY HIGHDS+1
109
-JSR BLTU
110
-LDA LINNUM
111
-LDY LINNUM+1
112
-STA BUF-2
113
-STY BUF-1
114
-LDA STREND
115
-LDY STREND+1
116
-STA VARTAB
117
-STY VARTAB+1
118
-LDY COUNT
119
-DEY
120
-STOLOP LDA BUF-4,Y
121
-STA (LOWTR)Y
122
-DEY
123
-BPL STOLOP
124
-FINI JSR RUNC
125
-JSR LNKPRG
126
-JMP MAIN
127
-LNKPRG LDA TXTTAB
128
-LDY TXTTAB+1
129
-STA INDEX
130
-STY INDEX+1
131
-CLC 
132
-CHEAD LDY #1
133
-LDA (INDEX)Y
134
-BEQ LNKRTS
135
-LDY #4
136
-CZLOOP INY
137
-LDA (INDEX)Y
138
-BNE CZLOOP
139
-INY
140
-TYA
141
-ADC INDEX
142
-TAX
143
-LDY #0
144
-STA (INDEX)Y
145
-LDA INDEX+1
146
-ADC #0
147
-INY
148
-STA (INDEX)Y
149
-STX INDEX
150
-STA INDEX+1
151
-BCC CHEAD
152
-LNKRTS RTS
39
+MAIN	JMP (IMAIN)
40
+NMAIN	JSR INLIN
41
+	STX TXTPTR
42
+	STY TXTPTR+1
43
+	JSR CHRGET
44
+	TAX
45
+	BEQ MAIN
46
+	LDX #255
47
+	STX CURLIN+1
48
+	BCC MAIN1
49
+	JSR CRUNCH
50
+	JMP GONE
51
+MAIN1	JSR LINGET
52
+	JSR CRUNCH
53
+	STY COUNT
54
+	JSR FNDLIN
55
+	BCC NODEL
56
+	LDY #1
57
+	LDA (LOWTR)Y
58
+	STA INDEX1+1
59
+	LDA VARTAB
60
+	STA INDEX1
61
+	LDA LOWTR+1
62
+	STA INDEX2+1
63
+	LDA LOWTR
64
+	DEY
65
+	SBC (LOWTR)Y 
66
+	CLC
67
+	ADC VARTAB
68
+	STA VARTAB
69
+	STA INDEX2
70
+	LDA VARTAB+1
71
+	ADC #255
72
+	STA VARTAB+1
73
+	SBC LOWTR+1
74
+	TAX
75
+	SEC
76
+	LDA LOWTR
77
+	SBC VARTAB
78
+	TAY
79
+	BCS QDECT1
80
+	INX
81
+	DEC INDEX2+1
82
+QDECT1	CLC
83
+	ADC INDEX1
84
+	BCC MLOOP
85
+	DEC INDEX1+1
86
+	CLC
87
+MLOOP	LDA (INDEX1)Y
88
+	STA (INDEX2)Y
89
+	INY 
90
+	BNE MLOOP
91
+	INC INDEX1+1
92
+	INC INDEX2+1
93
+	DEX
94
+	BNE MLOOP
95
+NODEL	JSR RUNC
96
+	JSR LNKPRG
97
+	LDA BUF
98
+	BEQ MAIN
99
+	CLC
100
+	LDA VARTAB
101
+	STA HIGHTR 
102
+	ADC COUNT
103
+	STA HIGHDS
104
+	LDY VARTAB+1
105
+	STY HIGHTR+1
106
+	BCC NODELC
107
+	INY
108
+NODELC	STY HIGHDS+1
109
+	JSR BLTU
110
+	LDA LINNUM
111
+	LDY LINNUM+1
112
+	STA BUF-2
113
+	STY BUF-1
114
+	LDA STREND
115
+	LDY STREND+1
116
+	STA VARTAB
117
+	STY VARTAB+1
118
+	LDY COUNT
119
+	DEY
120
+STOLOP	LDA BUF-4,Y
121
+	STA (LOWTR)Y
122
+	DEY
123
+	BPL STOLOP
124
+FINI	JSR RUNC
125
+	JSR LNKPRG
126
+	JMP MAIN
127
+LNKPRG	LDA TXTTAB
128
+	LDY TXTTAB+1
129
+	STA INDEX
130
+	STY INDEX+1
131
+	CLC 
132
+CHEAD	LDY #1
133
+	LDA (INDEX)Y
134
+	BEQ LNKRTS
135
+	LDY #4
136
+CZLOOP	INY
137
+	LDA (INDEX)Y
138
+	BNE CZLOOP
139
+	INY
140
+	TYA
141
+	ADC INDEX
142
+	TAX
143
+	LDY #0
144
+	STA (INDEX)Y
145
+	LDA INDEX+1
146
+	ADC #0
147
+	INY
148
+	STA (INDEX)Y
149
+	STX INDEX
150
+	STA INDEX+1
151
+	BCC CHEAD
152
+LNKRTS	RTS
153 153
 .SKI 5
154 154
 ;FUNCTION TO GET A LINE ONE CHARACTER AT
155 155
 ;A TIME FROM THE INPUT CHANNEL AND
156 156
 ;BUILD IT IN THE INPUT BUFFER.
157 157
 ;
158
-INLIN LDX #0
158
+INLIN	LDX #0
159 159
 ;
160
-INLINC JSR INCHR
161
-CMP #13 ;A CARRIAGE RETURN?
162
-BEQ FININ1 ;YES...DONE BUILD
160
+INLINC	JSR INCHR
161
+	CMP #13         ;A CARRIAGE RETURN?
162
+	BEQ FININ1      ;YES...DONE BUILD
163 163
 ;
164
-STA BUF,X ;PUT IT AWAY
165
-INX
166
-CPX #BUFLEN ;MAX CHARACTER LINE?
167
-BCC INLINC ;NO...O.K.
164
+	STA BUF,X       ;PUT IT AWAY
165
+	INX
166
+	CPX #BUFLEN     ;MAX CHARACTER LINE?
167
+	BCC INLINC      ;NO...O.K.
168 168
 ;
169
-LDX #ERRLS ;STRING TOO LONG ERROR
170
-JMP ERROR
169
+	LDX #ERRLS      ;STRING TOO LONG ERROR
170
+	JMP ERROR
171 171
 ;
172
-FININ1 JMP FININL
172
+FININ1	JMP FININL
173 173
 .END

+ 171
- 171
BASIC_C64/code10 View File

@@ -1,181 +1,181 @@
1
- .PAG 'CODE10'
1
+.PAG 'CODE10'
2 2
 ;TEST POINTER TO VARIABLE TO SEE
3 3
 ;IF CONSTANT IS CONTAINED IN BASIC.
4 4
 ;ARRAY VARIABLES HAVE ZEROES PLACED
5 5
 ;IN RAM. UNDEFINED SIMPLE VARIABLES
6 6
 ;HAVE POINTER T ZERO IN BASIC.
7 7
 ;
8
-TSTROM SEC
9
-LDA FACMO
10
-SBC #<ROMLOC
11
-LDA FACLO
12
-SBC #>ROMLOC
13
-BCC TSTR10
8
+TSTROM	SEC
9
+	LDA FACMO
10
+	SBC #<ROMLOC
11
+	LDA FACLO
12
+	SBC #>ROMLOC
13
+	BCC TSTR10
14 14
 ;
15
-LDA #<INITAT
16
-SBC FACMO
17
-LDA #>INITAT
18
-SBC FACLO
15
+	LDA #<INITAT
16
+	SBC FACMO
17
+	LDA #>INITAT
18
+	SBC FACLO
19 19
 ;
20
-TSTR10 RTS
20
+TSTR10	RTS
21 21
 .SKI 5
22
- ISVAR JSR PTRGET
23
- ISVRET STA FACMO
24
- STY FACMO+1
25
- LDX VARNAM
26
- LDY VARNAM+1
27
- LDA VALTYP
28
- BEQ GOOO
29
- LDA #0
30
- STA FACOV
31
- JSR TSTROM ;SEE IF AN ARRAY
32
-BCC STRRTS ;DON'T TEST ST(I),TI(I)
33
-CPX #'T
34
-BNE STRRTS
35
-CPY #$C9
36
-BNE STRRTS
37
-JSR GETTIM
38
-STY TENEXP
39
-DEY
40
-STY FBUFPT
41
-LDY #6
42
-STY DECCNT
43
-LDY #FDCEND-FOUTBL
44
-JSR FOUTIM
45
-JMP TIMSTR
46
-STRRTS RTS
47
-GOOO BIT INTFLG
48
-BPL GOOOOO
49
-LDY #0
50
-LDA (FACMO)Y
51
-TAX
52
-INY
53
-LDA (FACMO)Y
54
-TAY
55
-TXA
56
-JMP GIVAYF
57
-GOOOOO JSR TSTROM ;SEE IF ARRAY
58
-BCC GOMOVF ;DON'T TEST ST(I),TI(I)
59
-CPX #'T
60
-BNE QSTATV
61
-CPY #'I
62
-BNE GOMOVF
63
-JSR GETTIM
64
-TYA
65
-LDX #160
66
-JMP FLOATB
67
-GETTIM JSR RDTIM
68
-STX FACMO
69
-STY FACMOH
70
-STA FACLO
71
-LDY #0
72
-STY FACHO
73
-RTS
74
-QSTATV CPX #'S
75
-BNE GOMOVF
76
-CPY #'T
77
-BNE GOMOVF
78
-JSR READST
79
-JMP FLOAT
80
-GOMOVF LDA FACMO
81
-LDY FACMO+1
82
-JMP MOVFM
83
-ISFUN ASL A
84
-PHA
85
-TAX
86
-JSR CHRGET
87
-CPX #LASNUM+LASNUM-255
88
-BCC OKNORM
89
-JSR CHKOPN
90
-JSR FRMEVL
91
-JSR CHKCOM
92
-JSR CHKSTR
93
-PLA
94
-TAX
95
-LDA FACMO+1
96
-PHA
97
-LDA FACMO
98
-PHA
99
-TXA
100
-PHA
101
-JSR GETBYT
102
-PLA
103
-TAY
104
-TXA
105
-PHA
106
-JMP FINGO
107
-OKNORM JSR PARCHK
108
-PLA
109
-TAY
110
-FINGO LDA FUNDSP-ONEFUN-ONEFUN+256,Y
111
-STA JMPER+1
112
-LDA FUNDSP-ONEFUN-ONEFUN+257,Y
113
-STA JMPER+2
114
-JSR JMPER
115
-JMP CHKNUM
116
-OROP LDY #255
117
-.BYT $2C
118
-ANDOP LDY #0
119
-STY COUNT
120
-JSR AYINT
121
-LDA FACMO
122
-EOR COUNT
123
-STA INTEGR
124
-LDA FACLO
125
-EOR COUNT
126
-STA INTEGR+1
127
-JSR MOVFA
128
-JSR AYINT
129
-LDA FACLO
130
-EOR COUNT
131
-AND INTEGR+1
132
-EOR COUNT
133
-TAY
134
-LDA FACMO
135
-EOR COUNT
136
-AND INTEGR
137
-EOR COUNT
138
-JMP GIVAYF
139
-DOREL JSR CHKVAL
140
-BCS STRCMP
141
-LDA ARGSGN
142
-ORA #127
143
-AND ARGHO
144
-STA ARGHO
145
-LDA #<ARGEXP
146
-LDY #>ARGEXP
147
-JSR FCOMP
148
-TAX
149
-JMP QCOMP
150
-STRCMP LDA #0
151
-STA VALTYP
152
-DEC OPMASK
153
-JSR FREFAC
154
-STA DSCTMP
155
-STX DSCTMP+1
156
-STY DSCTMP+2
157
-LDA ARGMO
158
-LDY ARGMO+1
159
-JSR FRETMP
160
-STX ARGMO
161
-STY ARGMO+1
162
-TAX
163
-SEC
164
-SBC DSCTMP
165
-BEQ STASGN
166
-LDA #1
167
-BCC STASGN
168
-LDX DSCTMP
169
-LDA #$FF
170
-STASGN STA FACSGN
171
-LDY #255
172
-INX
173
-NXTCMP INY
174
-DEX
175
-BNE GETCMP
176
-LDX FACSGN
177
-QCOMP BMI DOCMP
178
-CLC
179
-BCC DOCMP
180
-GETCMP LDA (ARGMO)Y
22
+ISVAR	JSR PTRGET
23
+ISVRET	STA FACMO
24
+	STY FACMO+1
25
+	LDX VARNAM
26
+	LDY VARNAM+1
27
+	LDA VALTYP
28
+	BEQ GOOO
29
+	LDA #0
30
+	STA FACOV
31
+	JSR TSTROM      ;SEE IF AN ARRAY
32
+	BCC STRRTS      ;DON'T TEST ST(I),TI(I)
33
+	CPX #'T
34
+	BNE STRRTS
35
+	CPY #$C9
36
+	BNE STRRTS
37
+	JSR GETTIM
38
+	STY TENEXP
39
+	DEY
40
+	STY FBUFPT
41
+	LDY #6
42
+	STY DECCNT
43
+	LDY #FDCEND-FOUTBL
44
+	JSR FOUTIM
45
+	JMP TIMSTR
46
+STRRTS	RTS
47
+GOOO	BIT INTFLG
48
+	BPL GOOOOO
49
+	LDY #0
50
+	LDA (FACMO)Y
51
+	TAX
52
+	INY
53
+	LDA (FACMO)Y
54
+	TAY
55
+	TXA
56
+	JMP GIVAYF
57
+GOOOOO	JSR TSTROM      ;SEE IF ARRAY
58
+	BCC GOMOVF      ;DON'T TEST ST(I),TI(I)
59
+	CPX #'T
60
+	BNE QSTATV
61
+	CPY #'I
62
+	BNE GOMOVF
63
+	JSR GETTIM
64
+	TYA
65
+	LDX #160
66
+	JMP FLOATB
67
+GETTIM	JSR RDTIM
68
+	STX FACMO
69
+	STY FACMOH
70
+	STA FACLO
71
+	LDY #0
72
+	STY FACHO
73
+	RTS
74
+QSTATV	CPX #'S
75
+	BNE GOMOVF
76
+	CPY #'T
77
+	BNE GOMOVF
78
+	JSR READST
79
+	JMP FLOAT
80
+GOMOVF	LDA FACMO
81
+	LDY FACMO+1
82
+	JMP MOVFM
83
+ISFUN	ASL A
84
+	PHA
85
+	TAX
86
+	JSR CHRGET
87
+	CPX #LASNUM+LASNUM-255
88
+	BCC OKNORM
89
+	JSR CHKOPN
90
+	JSR FRMEVL
91
+	JSR CHKCOM
92
+	JSR CHKSTR
93
+	PLA
94
+	TAX
95
+	LDA FACMO+1
96
+	PHA
97
+	LDA FACMO
98
+	PHA
99
+	TXA
100
+	PHA
101
+	JSR GETBYT
102
+	PLA
103
+	TAY
104
+	TXA
105
+	PHA
106
+	JMP FINGO
107
+OKNORM	JSR PARCHK
108
+	PLA
109
+	TAY
110
+FINGO	LDA FUNDSP-ONEFUN-ONEFUN+256,Y
111
+	STA JMPER+1
112
+	LDA FUNDSP-ONEFUN-ONEFUN+257,Y
113
+	STA JMPER+2
114
+	JSR JMPER
115
+	JMP CHKNUM
116
+OROP	LDY #255
117
+	.BYT $2C
118
+ANDOP	LDY #0
119
+	STY COUNT
120
+	JSR AYINT
121
+	LDA FACMO
122
+	EOR COUNT
123
+	STA INTEGR
124
+	LDA FACLO
125
+	EOR COUNT
126
+	STA INTEGR+1
127
+	JSR MOVFA
128
+	JSR AYINT
129
+	LDA FACLO
130
+	EOR COUNT
131
+	AND INTEGR+1
132
+	EOR COUNT
133
+	TAY
134
+	LDA FACMO
135
+	EOR COUNT
136
+	AND INTEGR
137
+	EOR COUNT
138
+	JMP GIVAYF
139
+DOREL	JSR CHKVAL
140
+	BCS STRCMP
141
+	LDA ARGSGN
142
+	ORA #127
143
+	AND ARGHO
144
+	STA ARGHO
145
+	LDA #<ARGEXP
146
+	LDY #>ARGEXP
147
+	JSR FCOMP
148
+	TAX
149
+	JMP QCOMP
150
+STRCMP	LDA #0
151
+	STA VALTYP
152
+	DEC OPMASK
153
+	JSR FREFAC
154
+	STA DSCTMP
155
+	STX DSCTMP+1
156
+	STY DSCTMP+2
157
+	LDA ARGMO
158
+	LDY ARGMO+1
159
+	JSR FRETMP
160
+	STX ARGMO
161
+	STY ARGMO+1
162
+	TAX
163
+	SEC
164
+	SBC DSCTMP
165
+	BEQ STASGN
166
+	LDA #1
167
+	BCC STASGN
168
+	LDX DSCTMP
169
+	LDA #$FF
170
+STASGN	STA FACSGN
171
+	LDY #255
172
+	INX
173
+NXTCMP	INY
174
+	DEX
175
+	BNE GETCMP
176
+	LDX FACSGN
177
+QCOMP	BMI DOCMP
178
+	CLC
179
+	BCC DOCMP
180
+GETCMP	LDA (ARGMO)Y
181 181
 .END

+ 167
- 167
BASIC_C64/code11 View File

@@ -1,171 +1,171 @@
1 1
 .PAG 'CODE11'
2
-CMP (DSCTMP+1)Y
3
-BEQ NXTCMP
4
-LDX #$FF
5
-BCS DOCMP
6
-LDX #1
7
-DOCMP INX
8
-TXA
9
-ROL A
10
-AND DOMASK
11
-BEQ GOFLOT
12
-LDA #$FF
13
-GOFLOT JMP FLOAT
14
-DIM3 JSR CHKCOM
15
-DIM TAX
16
-JSR PTRGT1
17
-JSR CHRGOT
18
-BNE DIM3
19
-RTS
20
-PTRGET LDX #0
21
-JSR CHRGOT
22
-PTRGT1 STX DIMFLG
23
-PTRGT2 STA VARNAM
24
-JSR CHRGOT
25
-JSR ISLETC
26
-BCS PTRGT3
27
-INTERR JMP SNERR
28
-PTRGT3 LDX #0
29
-STX VALTYP
30
-STX INTFLG
31
-JSR CHRGET
32
-BCC ISSEC
33
-JSR ISLETC
34
-BCC NOSEC
35
-ISSEC TAX
36
-EATEM JSR CHRGET
37
-BCC EATEM
38
-JSR ISLETC
39
-BCS EATEM
40
-NOSEC CMP #'$
41
-BNE NOTSTR
42
-LDA #$FF
43
-STA VALTYP
44
-BNE TURNON
45
-NOTSTR CMP #'%
46
-BNE STRNAM
47
-LDA SUBFLG
48
-BNE INTERR
49
-LDA #128
50
-STA INTFLG
51
-ORA VARNAM
52
-STA VARNAM
53
-TURNON TXA
54
-ORA #128
55
-TAX
56
-JSR CHRGET
57
-STRNAM STX VARNAM+1
58
-SEC
59
-ORA SUBFLG
60
-SBC #40
61
-BNE *+5
62
-JMP ISARY
63
-LDY #0
64
-STY SUBFLG
65
-LDA VARTAB
66
-LDX VARTAB+1
67
-STXFND STX LOWTR+1
68
-LOPFND STA LOWTR
69
-CPX ARYTAB+1
70
-BNE LOPFN
71
-CMP ARYTAB
72
-BEQ NOTFNS
73
-LOPFN LDA VARNAM
74
-CMP (LOWTR)Y
75
-BNE NOTIT
76
-LDA VARNAM+1
77
-INY
78
-CMP (LOWTR)Y
79
-BEQ FINPTR
80
-DEY
81
-NOTIT CLC
82
-LDA LOWTR
83
-ADC #6+ADDPRC
84
-BCC LOPFND
85
-INX
86
-BNE STXFND
87
-ISLETC CMP #'A
88
-BCC ISLRTS
89
-SBC #$5B
90
-SEC
91
-SBC #@245
92
-ISLRTS RTS
93
-NOTFNS PLA
94
-PHA
2
+	CMP (DSCTMP+1)Y
3
+	BEQ NXTCMP
4
+	LDX #$FF
5
+	BCS DOCMP
6
+	LDX #1
7
+DOCMP	INX
8
+	TXA
9
+	ROL A
10
+	AND DOMASK
11
+	BEQ GOFLOT
12
+	LDA #$FF
13
+GOFLOT	JMP FLOAT
14
+DIM3	JSR CHKCOM
15
+DIM	TAX
16
+	JSR PTRGT1
17
+	JSR CHRGOT
18
+	BNE DIM3
19
+	RTS
20
+PTRGET	LDX #0
21
+	JSR CHRGOT
22
+PTRGT1	STX DIMFLG
23
+PTRGT2	STA VARNAM
24
+	JSR CHRGOT
25
+	JSR ISLETC
26
+	BCS PTRGT3
27
+INTERR	JMP SNERR
28
+PTRGT3	LDX #0
29
+	STX VALTYP
30
+	STX INTFLG
31
+	JSR CHRGET
32
+	BCC ISSEC
33
+	JSR ISLETC
34
+	BCC NOSEC
35
+ISSEC	TAX
36
+EATEM	JSR CHRGET
37
+	BCC EATEM
38
+	JSR ISLETC
39
+	BCS EATEM
40
+NOSEC	CMP #'$
41
+	BNE NOTSTR
42
+	LDA #$FF
43
+	STA VALTYP
44
+	BNE TURNON
45
+NOTSTR	CMP #'%
46
+	BNE STRNAM
47
+	LDA SUBFLG
48
+	BNE INTERR
49
+	LDA #128
50
+	STA INTFLG
51
+	ORA VARNAM
52
+	STA VARNAM
53
+TURNON	TXA
54
+	ORA #128
55
+	TAX
56
+	JSR CHRGET
57
+STRNAM	STX VARNAM+1
58
+	SEC
59
+	ORA SUBFLG
60
+	SBC #40
61
+	BNE *+5
62
+	JMP ISARY
63
+	LDY #0
64
+	STY SUBFLG
65
+	LDA VARTAB
66
+	LDX VARTAB+1
67
+STXFND	STX LOWTR+1
68
+LOPFND	STA LOWTR
69
+	CPX ARYTAB+1
70
+	BNE LOPFN
71
+	CMP ARYTAB
72
+	BEQ NOTFNS
73
+LOPFN	LDA VARNAM
74
+	CMP (LOWTR)Y
75
+	BNE NOTIT
76
+	LDA VARNAM+1
77
+	INY
78
+	CMP (LOWTR)Y
79
+	BEQ FINPTR
80
+	DEY
81
+NOTIT	CLC
82
+	LDA LOWTR
83
+	ADC #6+ADDPRC
84
+	BCC LOPFND
85
+	INX
86
+	BNE STXFND
87
+ISLETC	CMP #'A
88
+	BCC ISLRTS
89
+	SBC #$5B
90
+	SEC
91
+	SBC #@245
92
+ISLRTS	RTS
93
+NOTFNS	PLA
94
+	PHA
95 95
 ZZ6=ISVRET-1
96
-CMP #<ZZ6 
97
-BNE NOTEVL
98
-LDZR LDA #<ZERO
99
-LDY #>ZERO
100
-RTS
101
-NOTEVL LDA VARNAM
102
-LDY VARNAM+1
103
-CMP #'T
104
-BNE QSTAVR
105
-CPY #@311
106
-BEQ LDZR
107
-CPY #@111
108
-BNE QSTAVR
109
-GOBADV JMP SNERR
96
+	CMP #<ZZ6 
97
+	BNE NOTEVL
98
+LDZR	LDA #<ZERO
99
+	LDY #>ZERO
100
+	RTS
101
+NOTEVL	LDA VARNAM
102
+	LDY VARNAM+1
103
+	CMP #'T
104
+	BNE QSTAVR
105
+	CPY #@311
106
+	BEQ LDZR
107
+	CPY #@111
108
+	BNE QSTAVR
109
+GOBADV	JMP SNERR
110 110
 QSTAVR
111
-CMP #'S
112
-BNE VAROK
113
-CPY #'T
114
-BEQ GOBADV
115
-VAROK LDA ARYTAB
116
-LDY ARYTAB+1
117
-STA LOWTR
118
-STY LOWTR+1
119
-LDA STREND
120
-LDY STREND+1
121
-STA HIGHTR
122
-STY HIGHTR+1
123
-CLC
124
-ADC #6+ADDPRC
125
-BCC NOTEVE
126
-INY
127
-NOTEVE STA HIGHDS
128
-STY HIGHDS+1
129
-JSR BLTU
130
-LDA HIGHDS
131
-LDY HIGHDS+1
132
-INY
133
-STA ARYTAB
134
-STY ARYTAB+1
135
-LDY #0
136
-LDA VARNAM
137
-STA (LOWTR)Y
138
-INY
139
-LDA VARNAM+1
140
-STA (LOWTR)Y
141
-LDA #0
142
-INY
143
-STA (LOWTR)Y
144
-INY
145
-STA (LOWTR)Y
146
-INY
147
-STA (LOWTR)Y
148
-INY
149
-STA (LOWTR)Y
150
-INY
151
-STA (LOWTR)Y
152
-FINPTR LDA LOWTR
153
-CLC
154
-ADC #2
155
-LDY LOWTR+1
156
-BCC FINNOW
157
-INY
158
-FINNOW STA VARPNT
159
-STY VARPNT+1
160
-RTS
161
-FMAPTR LDA COUNT
162
-ASL A
163
-ADC #5
164
-ADC LOWTR
165
-LDY LOWTR+1
166
-BCC JSRGM
167
-INY
168
-JSRGM STA ARYPNT
169
-STY ARYPNT+1
170
-RTS
111
+	CMP #'S
112
+	BNE VAROK
113
+	CPY #'T
114
+	BEQ GOBADV
115
+VAROK	LDA ARYTAB
116
+	LDY ARYTAB+1
117
+	STA LOWTR
118
+	STY LOWTR+1
119
+	LDA STREND
120
+	LDY STREND+1
121
+	STA HIGHTR
122
+	STY HIGHTR+1
123
+	CLC
124
+	ADC #6+ADDPRC
125
+	BCC NOTEVE
126
+	INY
127
+NOTEVE	STA HIGHDS
128
+	STY HIGHDS+1
129
+	JSR BLTU
130
+	LDA HIGHDS
131
+	LDY HIGHDS+1
132
+	INY
133
+	STA ARYTAB
134
+	STY ARYTAB+1
135
+	LDY #0
136
+	LDA VARNAM
137
+	STA (LOWTR)Y
138
+	INY
139
+	LDA VARNAM+1
140
+	STA (LOWTR)Y
141
+	LDA #0
142
+	INY
143
+	STA (LOWTR)Y
144
+	INY
145
+	STA (LOWTR)Y
146
+	INY
147
+	STA (LOWTR)Y
148
+	INY
149
+	STA (LOWTR)Y
150
+	INY
151
+	STA (LOWTR)Y
152
+FINPTR	LDA LOWTR
153
+	CLC
154
+	ADC #2
155
+	LDY LOWTR+1
156
+	BCC FINNOW
157
+	INY
158
+FINNOW	STA VARPNT
159
+	STY VARPNT+1
160
+	RTS
161
+FMAPTR	LDA COUNT
162
+	ASL A
163
+	ADC #5
164
+	ADC LOWTR
165
+	LDY LOWTR+1
166
+	BCC JSRGM
167
+	INY
168
+JSRGM	STA ARYPNT
169
+	STY ARYPNT+1
170
+	RTS
171 171
 .END

+ 152
- 152
BASIC_C64/code12 View File

@@ -1,154 +1,154 @@
1 1
 .PAG 'CODE12'
2
-N32768 .BYT 144,128,0,0,0
3
-FLPINT JSR AYINT
4
-LDA FACMO
5
-LDY  FACLO
6
-RTS
7
-INTIDX JSR CHRGET
8
-JSR FRMEVL
9
-POSINT JSR CHKNUM
10
-LDA FACSGN
11
-BMI NONONO
12
-AYINT LDA FACEXP
13
-CMP #144
14
-BCC QINTGO
15
-LDA #<N32768
16
-LDY #>N32768
17
-JSR FCOMP
18
-NONONO BNE FCERR
19
-QINTGO JMP QINT
20
-ISARY LDA DIMFLG
21
-ORA INTFLG
22
-PHA
23
-LDA VALTYP
24
-PHA
25
-LDY #0
26
-INDLOP TYA
27
-PHA
28
-LDA VARNAM+1
29
-PHA
30
-LDA VARNAM
31
-PHA
32
-JSR INTIDX
33
-PLA
34
-STA VARNAM
35
-PLA
36
-STA VARNAM+1
37
-PLA
38
-TAY
39
-TSX
40
-LDA 258,X
41
-PHA
42
-LDA 257,X
43
-PHA
44
-LDA INDICE
45
-STA 258,X
46
-LDA INDICE+1
47
-STA 257,X
48
-INY
49
-JSR CHRGOT
50
-CMP #44
51
-BEQ INDLOP
52
-STY COUNT
53
-JSR CHKCLS
54
-PLA
55
-STA VALTYP
56
-PLA
57
-STA INTFLG
58
-AND #127
59
-STA DIMFLG
60
-LDX ARYTAB
61
-LDA ARYTAB+1
62
-LOPFDA STX LOWTR
63
-STA LOWTR+1
64
-CMP STREND+1
65
-BNE LOPFDV
66
-CPX STREND
67
-BEQ NOTFDD
68
-LOPFDV LDY #0
69
-LDA (LOWTR)Y
70
-INY
71
-CMP VARNAM
72
-BNE NMARY1
73
-LDA VARNAM+1
74
-CMP (LOWTR)Y
75
-BEQ GOTARY
76
-NMARY1 INY
77
-LDA (LOWTR)Y
78
-CLC
79
-ADC LOWTR
80
-TAX
81
-INY
82
-LDA (LOWTR)Y
83
-ADC LOWTR+1
84
-BCC LOPFDA
85
-BSERR LDX #ERRBS
86
-.BYT $2C
87
-FCERR LDX #ERRFC
88
-ERRGO3 JMP ERROR
89
-GOTARY LDX #ERRDD
90
-LDA DIMFLG
91
-BNE ERRGO3
92
-JSR FMAPTR
93
-LDA COUNT
94
-LDY #4
95
-CMP (LOWTR)Y
96
-BNE BSERR
97
-JMP GETDEF
98
-NOTFDD JSR FMAPTR
99
-JSR REASON
100
-LDY #0
101
-STY CURTOL+1
102
-LDX #5
103
-LDA VARNAM
104
-STA (LOWTR)Y
105
-BPL NOTFLT
106
-DEX
107
-NOTFLT INY
108
-LDA VARNAM+1
109
-STA (LOWTR)Y
110
-BPL STOMLT
111
-DEX
112
-DEX
113
-STOMLT STX CURTOL
114
-LDA COUNT
115
-INY
116
-INY
117
-INY
118
-STA (LOWTR)Y
119
-LOPPTA LDX #11
120
-LDA #0
121
-BIT DIMFLG
122
-BVC NOTDIM
123
-PLA
124
-CLC
125
-ADC #1
126
-TAX
127
-PLA
128
-ADC #0
129
-NOTDIM INY
130
-STA (LOWTR)Y
131
-INY
132
-TXA
133
-STA (LOWTR)Y
134
-JSR UMULT
135
-STX CURTOL
136
-STA CURTOL+1
137
-LDY INDEX
138
-DEC COUNT
139
-BNE LOPPTA
140
-ADC ARYPNT+1
141
-BCS OMERR1
142
-STA ARYPNT+1
143
-TAY
144
-TXA
145
-ADC ARYPNT
146
-BCC GREASE
147
-INY
148
-BEQ OMERR1
149
-GREASE JSR REASON
150
-STA STREND
151
-STY STREND+1
152
-LDA #0
153
-INC CURTOL+1
2
+N32768	.BYT 144,128,0,0,0
3
+FLPINT	JSR AYINT
4
+	LDA FACMO
5
+	LDY  FACLO
6
+	RTS
7
+INTIDX	JSR CHRGET
8
+	JSR FRMEVL
9
+POSINT	JSR CHKNUM
10
+	LDA FACSGN
11
+	BMI NONONO
12
+AYINT	LDA FACEXP
13
+	CMP #144
14
+	BCC QINTGO
15
+	LDA #<N32768
16
+	LDY #>N32768
17
+	JSR FCOMP
18
+NONONO	BNE FCERR
19
+QINTGO	JMP QINT
20
+ISARY	LDA DIMFLG
21
+	ORA INTFLG
22
+	PHA
23
+	LDA VALTYP
24
+	PHA
25
+	LDY #0
26
+INDLOP	TYA
27
+	PHA
28
+	LDA VARNAM+1
29
+	PHA
30
+	LDA VARNAM
31
+	PHA
32
+	JSR INTIDX
33
+	PLA
34
+	STA VARNAM
35
+	PLA
36
+	STA VARNAM+1
37
+	PLA
38
+	TAY
39
+	TSX
40
+	LDA 258,X
41
+	PHA
42
+	LDA 257,X
43
+	PHA
44
+	LDA INDICE
45
+	STA 258,X
46
+	LDA INDICE+1
47
+	STA 257,X
48
+	INY
49
+	JSR CHRGOT
50
+	CMP #44
51
+	BEQ INDLOP
52
+	STY COUNT
53
+	JSR CHKCLS
54
+	PLA
55
+	STA VALTYP
56
+	PLA
57
+	STA INTFLG
58
+	AND #127
59
+	STA DIMFLG
60
+	LDX ARYTAB
61
+	LDA ARYTAB+1
62
+LOPFDA	STX LOWTR
63
+	STA LOWTR+1
64
+	CMP STREND+1
65
+	BNE LOPFDV
66
+	CPX STREND
67
+	BEQ NOTFDD
68
+LOPFDV	LDY #0
69
+	LDA (LOWTR)Y
70
+	INY
71
+	CMP VARNAM
72
+	BNE NMARY1
73
+	LDA VARNAM+1
74
+	CMP (LOWTR)Y
75
+	BEQ GOTARY
76
+NMARY1	INY
77
+	LDA (LOWTR)Y
78
+	CLC
79
+	ADC LOWTR
80
+	TAX
81
+	INY
82
+	LDA (LOWTR)Y
83
+	ADC LOWTR+1
84
+	BCC LOPFDA
85
+BSERR	LDX #ERRBS
86
+	.BYT $2C
87
+FCERR	LDX #ERRFC
88
+ERRGO3	JMP ERROR
89
+GOTARY	LDX #ERRDD
90
+	LDA DIMFLG
91
+	BNE ERRGO3
92
+	JSR FMAPTR
93
+	LDA COUNT
94
+	LDY #4
95
+	CMP (LOWTR)Y
96
+	BNE BSERR
97
+	JMP GETDEF
98
+NOTFDD	JSR FMAPTR
99
+	JSR REASON
100
+	LDY #0
101
+	STY CURTOL+1
102
+	LDX #5
103
+	LDA VARNAM
104
+	STA (LOWTR)Y
105
+	BPL NOTFLT
106
+	DEX
107
+NOTFLT	INY
108
+	LDA VARNAM+1
109
+	STA (LOWTR)Y
110
+	BPL STOMLT
111
+	DEX
112
+	DEX
113
+STOMLT	STX CURTOL
114
+	LDA COUNT
115
+	INY
116
+	INY
117
+	INY
118
+	STA (LOWTR)Y
119
+LOPPTA	LDX #11
120
+	LDA #0
121
+	BIT DIMFLG
122
+	BVC NOTDIM
123
+	PLA
124
+	CLC
125
+	ADC #1
126
+	TAX
127
+	PLA
128
+	ADC #0
129
+NOTDIM	INY
130
+	STA (LOWTR)Y
131
+	INY
132
+	TXA
133
+	STA (LOWTR)Y
134
+	JSR UMULT
135
+	STX CURTOL
136
+	STA CURTOL+1
137
+	LDY INDEX
138
+	DEC COUNT
139
+	BNE LOPPTA
140
+	ADC ARYPNT+1
141
+	BCS OMERR1
142
+	STA ARYPNT+1
143
+	TAY
144
+	TXA
145
+	ADC ARYPNT
146
+	BCC GREASE
147
+	INY
148
+	BEQ OMERR1
149
+GREASE	JSR REASON
150
+	STA STREND
151
+	STY STREND+1
152
+	LDA #0
153
+	INC CURTOL+1
154 154
 .END

+ 151
- 151
BASIC_C64/code13 View File

@@ -1,153 +1,153 @@
1 1
 .PAG 'CODE13'
2
-LDY CURTOL
3
-BEQ DECCUR
4
-ZERITA DEY
5
-STA (ARYPNT)Y
6
-BNE ZERITA
7
-DECCUR DEC ARYPNT+1
8
-DEC CURTOL+1
9
-BNE ZERITA
10
-INC ARYPNT+1
11
-SEC
12
-LDA STREND
13
-SBC LOWTR
14
-LDY #2
15
-STA (LOWTR)Y
16
-LDA STREND+1
17
-INY
18
-SBC LOWTR+1
19
-STA (LOWTR)Y
20
-LDA DIMFLG
21
-BNE DIMRTS
22
-INY
23
-GETDEF LDA (LOWTR)Y
24
-STA COUNT
25
-LDA #0
26
-STA CURTOL
27
-INLPNM STA CURTOL+1
28
-INY
29
-PLA
30
-TAX
31
-STA INDICE
32
-PLA
33
-STA INDICE+1
34
-CMP (LOWTR)Y
35
-BCC INLPN2
36
-BNE BSERR7
37
-INY
38
-TXA
39
-CMP (LOWTR)Y
40
-BCC INLPN1
41
-BSERR7 JMP BSERR
42
-OMERR1 JMP OMERR
43
-INLPN2 INY
44
-INLPN1 LDA CURTOL+1
45
-ORA CURTOL
46
-CLC
47
-BEQ ADDIND
48
-JSR UMULT
49
-TXA
50
-ADC INDICE
51
-TAX
52
-TYA
53
-LDY INDEX1
54
-ADDIND ADC INDICE+1
55
-STX CURTOL
56
-DEC COUNT
57
-BNE INLPNM
58
-STA CURTOL+1
59
-LDX #5
60
-LDA VARNAM
61
-BPL NOTFL1
62
-DEX
63
-NOTFL1 LDA VARNAM+1
64
-BPL STOML1
65
-DEX
66
-DEX
67
-STOML1 STX ADDEND
68
-LDA #0
69
-JSR UMULTD
70
-TXA
71
-ADC ARYPNT
72
-STA VARPNT
73
-TYA
74
-ADC ARYPNT+1
75
-STA VARPNT+1
76
-TAY
77
-LDA VARPNT
78
-DIMRTS RTS
79
-UMULT STY INDEX
80
-LDA (LOWTR)Y
81
-STA ADDEND
82
-DEY
83
-LDA (LOWTR)Y
84
-UMULTD STA ADDEND+1
85
-LDA #16
86
-STA DECCNT
87
-LDX #0
88
-LDY #0
89
-UMULTC TXA
90
-ASL A
91
-TAX
92
-TYA
93
-ROL A
94
-TAY
95
-BCS OMERR1
96
-ASL CURTOL
97
-ROL CURTOL+1
98
-BCC UMLCNT
99
-CLC
100
-TXA
101
-ADC ADDEND
102
-TAX
103
-TYA
104
-ADC ADDEND+1
105
-TAY
106
-BCS OMERR1
107
-UMLCNT DEC DECCNT
108
-BNE UMULTC
109
-UMLRTS RTS
110
-FRE LDA VALTYP
111
-BEQ NOFREF
112
-JSR FREFAC
113
-NOFREF JSR GARBA2
114
-SEC
115
-LDA FRETOP
116
-SBC STREND
117
-TAY
118
-LDA FRETOP+1
119
-SBC STREND+1
120
-GIVAYF LDX #0
121
-STX VALTYP
122
-STA FACHO
123
-STY FACHO+1
124
-LDX #144
125
-JMP FLOATS
126
-POS SEC
127
-JSR PLOT ;GET TAB POS IN .Y
128
-SNGFLT LDA #0
129
-BEQ GIVAYF
130
-ERRDIR LDX CURLIN+1
131
-INX
132
-BNE DIMRTS
133
-LDX #ERRID
134
-.BYT $2C
135
-ERRGUF LDX #ERRUF
136
-JMP ERROR
137
-DEF JSR GETFNM
138
-JSR ERRDIR
139
-JSR CHKOPN
140
-LDA #128
141
-STA SUBFLG
142
-JSR PTRGET
143
-JSR CHKNUM
144
-JSR CHKCLS
145
-LDA #$B2
146
-JSR SYNCHR
147
-PHA
148
-LDA VARPNT+1
149
-PHA
150
-LDA VARPNT
151
-PHA
152
-LDA TXTPTR+1
2
+	LDY CURTOL
3
+	BEQ DECCUR
4
+ZERITA	DEY
5
+	STA (ARYPNT)Y
6
+	BNE ZERITA
7
+DECCUR	DEC ARYPNT+1
8
+	DEC CURTOL+1
9
+	BNE ZERITA
10
+	INC ARYPNT+1
11
+	SEC
12
+	LDA STREND
13
+	SBC LOWTR
14
+	LDY #2
15
+	STA (LOWTR)Y
16
+	LDA STREND+1
17
+	INY
18
+	SBC LOWTR+1
19
+	STA (LOWTR)Y
20
+	LDA DIMFLG
21
+	BNE DIMRTS
22
+	INY
23
+GETDEF	LDA (LOWTR)Y
24
+	STA COUNT
25
+	LDA #0
26
+	STA CURTOL
27
+INLPNM	STA CURTOL+1
28
+	INY
29
+	PLA
30
+	TAX
31
+	STA INDICE
32
+	PLA
33
+	STA INDICE+1
34
+	CMP (LOWTR)Y
35
+	BCC INLPN2
36
+	BNE BSERR7
37
+	INY
38
+	TXA
39
+	CMP (LOWTR)Y
40
+	BCC INLPN1
41
+BSERR7	JMP BSERR
42
+OMERR1	JMP OMERR
43
+INLPN2	INY
44
+INLPN1	LDA CURTOL+1
45
+	ORA CURTOL
46
+	CLC
47
+	BEQ ADDIND
48
+	JSR UMULT
49
+	TXA
50
+	ADC INDICE
51
+	TAX
52
+	TYA
53
+	LDY INDEX1
54
+ADDIND	ADC INDICE+1
55
+	STX CURTOL
56
+	DEC COUNT
57
+	BNE INLPNM
58
+	STA CURTOL+1
59
+	LDX #5
60
+	LDA VARNAM
61
+	BPL NOTFL1
62
+	DEX
63
+NOTFL1	LDA VARNAM+1
64
+	BPL STOML1
65
+	DEX
66
+	DEX
67
+STOML1	STX ADDEND
68
+	LDA #0
69
+	JSR UMULTD
70
+	TXA
71
+	ADC ARYPNT
72
+	STA VARPNT
73
+	TYA
74
+	ADC ARYPNT+1
75
+	STA VARPNT+1
76
+	TAY
77
+	LDA VARPNT
78
+DIMRTS	RTS
79
+UMULT	STY INDEX
80
+	LDA (LOWTR)Y
81
+	STA ADDEND
82
+	DEY
83
+	LDA (LOWTR)Y
84
+UMULTD	STA ADDEND+1
85
+	LDA #16
86
+	STA DECCNT
87
+	LDX #0
88
+	LDY #0
89
+UMULTC	TXA
90
+	ASL A
91
+	TAX
92
+	TYA
93
+	ROL A
94
+	TAY
95
+	BCS OMERR1
96
+	ASL CURTOL
97
+	ROL CURTOL+1
98
+	BCC UMLCNT
99
+	CLC
100
+	TXA
101
+	ADC ADDEND
102
+	TAX
103
+	TYA
104
+	ADC ADDEND+1
105
+	TAY
106
+	BCS OMERR1
107
+UMLCNT	DEC DECCNT
108
+	BNE UMULTC
109
+UMLRTS	RTS
110
+FRE	LDA VALTYP
111
+	BEQ NOFREF
112
+	JSR FREFAC
113
+NOFREF	JSR GARBA2
114
+	SEC
115
+	LDA FRETOP
116
+	SBC STREND
117
+	TAY
118
+	LDA FRETOP+1
119
+	SBC STREND+1
120
+GIVAYF	LDX #0
121
+	STX VALTYP
122
+	STA FACHO
123
+	STY FACHO+1
124
+	LDX #144
125
+	JMP FLOATS
126
+POS	SEC
127
+	JSR PLOT        ;GET TAB POS IN .Y
128
+SNGFLT	LDA #0
129
+	BEQ GIVAYF
130
+ERRDIR	LDX CURLIN+1
131
+	INX
132
+	BNE DIMRTS
133
+	LDX #ERRID
134
+	.BYT $2C
135
+ERRGUF	LDX #ERRUF
136
+	JMP ERROR
137
+DEF	JSR GETFNM
138
+	JSR ERRDIR
139
+	JSR CHKOPN
140
+	LDA #128
141
+	STA SUBFLG
142
+	JSR PTRGET
143
+	JSR CHKNUM
144
+	JSR CHKCLS
145
+	LDA #$B2
146
+	JSR SYNCHR
147
+	PHA
148
+	LDA VARPNT+1
149
+	PHA
150
+	LDA VARPNT
151
+	PHA
152
+	LDA TXTPTR+1
153 153
 .END

+ 206
- 206
BASIC_C64/code14 View File

@@ -1,208 +1,208 @@
1 1
 .PAG 'CODE14'
2
-PHA
3
-LDA TXTPTR
4
-PHA
5
-JSR DATA
6
-JMP DEFFIN
7
-GETFNM LDA #FNTK
8
-JSR SYNCHR
9
-ORA #128
10
-STA SUBFLG
11
-JSR PTRGT2
12
-STA DEFPNT
13
-STY DEFPNT+1
14
-JMP CHKNUM
15
-FNDOER JSR GETFNM
16
-LDA DEFPNT+1
17
-PHA
18
-LDA DEFPNT
19
-PHA
20
-JSR PARCHK
21
-JSR CHKNUM
22
-PLA
23
-STA DEFPNT
24
-PLA
25
-STA DEFPNT+1
26
-LDY #2
27
-LDA (DEFPNT)Y
28
-STA VARPNT
29
-TAX
30
-INY
31
-LDA (DEFPNT)Y
32
-BEQ ERRGUF
33
-STA VARPNT+1
34
-INY
35
-DEFSTF LDA (VARPNT)Y
36
-PHA
37
-DEY
38
-BPL DEFSTF
39
-LDY VARPNT+1
40
-JSR MOVMF
41
-LDA TXTPTR+1
42
-PHA
43
-LDA TXTPTR
44
-PHA
45
-LDA (DEFPNT)Y
46
-STA TXTPTR
47
-INY
48
-LDA (DEFPNT)Y
49
-STA TXTPTR+1
50
-LDA VARPNT+1
51
-PHA
52
-LDA VARPNT
53
-PHA
54
-JSR FRMNUM
55
-PLA
56
-STA DEFPNT
57
-PLA
58
-STA DEFPNT+1
59
-JSR CHRGOT
60
-BEQ *+5
61
-JMP SNERR
62
-PLA
63
-STA TXTPTR
64
-PLA
65
-STA TXTPTR+1
66
-DEFFIN LDY #0
67
-PLA
68
-STA (DEFPNT)Y
69
-PLA
70
-INY
71
-STA (DEFPNT)Y
72
-PLA
73
-INY
74
-STA (DEFPNT)Y
75
-PLA
76
-INY
77
-STA (DEFPNT)Y
78
-PLA
79
-INY
80
-STA (DEFPNT)Y
81
-RTS
82
-STRD JSR CHKNUM
83
-LDY #0
84
-JSR FOUTC
85
-PLA
86
-PLA
87
-TIMSTR LDA #<LOFBUF
88
-LDY #>LOFBUF
89
-BEQ STRLIT
90
-STRINI LDX FACMO
91
-LDY FACMO+1
92
-STX DSCPNT
93
-STY DSCPNT+1
94
-STRSPA JSR GETSPA
95
-STX DSCTMP+1
96
-STY DSCTMP+2
97
-STA DSCTMP
98
-RTS
99
-STRLIT LDX #34
100
-STX CHARAC
101
-STX ENDCHR
102
-STRLT2 STA STRNG1
103
-STY STRNG1+1
104
-STA DSCTMP+1
105
-STY DSCTMP+2
106
-LDY #255
107
-STRGET INY
108
-LDA (STRNG1)Y
109
-BEQ STRFI1
110
-CMP CHARAC
111
-BEQ STRFIN
112
-CMP ENDCHR
113
-BNE STRGET
114
-STRFIN CMP #34
115
-BEQ STRFI2
116
-STRFI1 CLC
117
-STRFI2 STY DSCTMP
118
-TYA
119
-ADC STRNG1
120
-STA STRNG2
121
-LDX STRNG1+1
122
-BCC STRST2
123
-INX
124
-STRST2 STX STRNG2+1
125
-LDA STRNG1+1
126
-BEQ STRCP
127
-CMP #BUFPAG
128
-BNE PUTNEW
129
-STRCP TYA
130
-JSR STRINI
131
-LDX STRNG1
132
-LDY STRNG1+1
133
-JSR MOVSTR
134
-PUTNEW LDX TEMPPT
135
-CPX #TEMPST+STRSIZ+STRSIZ+STRSIZ
136
-BNE PUTNW1
137
-LDX #ERRST
138
-ERRGO2 JMP ERROR
139
-PUTNW1 LDA DSCTMP
140
-STA 0,X
141
-LDA DSCTMP+1
142
-STA 1,X
143
-LDA DSCTMP+2
144
-STA 2,X
145
-LDY #0
146
-STX FACMO
147
-STY FACMO+1
148
-STY FACOV
149
-DEY
150
-STY VALTYP
151
-STX LASTPT
152
-INX
153
-INX
154
-INX
155
-STX TEMPPT
156
-RTS
157
-GETSPA LSR GARBFL
158
-TRYAG2 PHA
159
-EOR #255
160
-SEC
161
-ADC FRETOP
162
-LDY FRETOP+1
163
-BCS TRYAG3
164
-DEY
165
-TRYAG3 CPY STREND+1
166
-BCC GARBAG
167
-BNE STRFRE
168
-CMP STREND
169
-BCC GARBAG
170
-STRFRE STA FRETOP
171
-STY FRETOP+1
172
-STA FRESPC
173
-STY FRESPC+1
174
-TAX
175
-PLA
176
-RTS
177
-GARBAG LDX #ERROM
178
-LDA GARBFL
179
-BMI ERRGO2
180
-JSR GARBA2
181
-LDA #128
182
-STA GARBFL
183
-PLA
184
-BNE TRYAG2
185
-GARBA2 LDX MEMSIZ
186
-LDA MEMSIZ+1
187
-FNDVAR STX FRETOP
188
-STA FRETOP+1
189
-LDY #0
190
-STY GRBPNT+1
191
-STY GRBPNT
192
-LDA STREND
193
-LDX STREND+1
194
-STA GRBTOP
195
-STX GRBTOP+1
196
-LDA #<TEMPST
197
-LDX #>TEMPST
198
-STA INDEX1
199
-STX INDEX1+1
200
-TVAR CMP TEMPPT
201
-BEQ SVARS
202
-JSR DVAR
203
-BEQ TVAR
204
-SVARS LDA #6+ADDPRC
205
-STA FOUR6
206
-LDA VARTAB
207
-LDX VARTAB+1
2
+	PHA
3
+	LDA TXTPTR
4
+	PHA
5
+	JSR DATA
6
+	JMP DEFFIN
7
+GETFNM	LDA #FNTK
8
+	JSR SYNCHR
9
+	ORA #128
10
+	STA SUBFLG
11
+	JSR PTRGT2
12
+	STA DEFPNT
13
+	STY DEFPNT+1
14
+	JMP CHKNUM
15
+FNDOER	JSR GETFNM
16
+	LDA DEFPNT+1
17
+	PHA
18
+	LDA DEFPNT
19
+	PHA
20
+	JSR PARCHK
21
+	JSR CHKNUM
22
+	PLA
23
+	STA DEFPNT
24
+	PLA
25
+	STA DEFPNT+1
26
+	LDY #2
27
+	LDA (DEFPNT)Y
28
+	STA VARPNT
29
+	TAX
30
+	INY
31
+	LDA (DEFPNT)Y
32
+	BEQ ERRGUF
33
+	STA VARPNT+1
34
+	INY
35
+DEFSTF	LDA (VARPNT)Y
36
+	PHA
37
+	DEY
38
+	BPL DEFSTF
39
+	LDY VARPNT+1
40
+	JSR MOVMF
41
+	LDA TXTPTR+1
42
+	PHA
43
+	LDA TXTPTR
44
+	PHA
45
+	LDA (DEFPNT)Y
46
+	STA TXTPTR
47
+	INY
48
+	LDA (DEFPNT)Y
49
+	STA TXTPTR+1
50
+	LDA VARPNT+1
51
+	PHA
52
+	LDA VARPNT
53
+	PHA
54
+	JSR FRMNUM
55
+	PLA
56
+	STA DEFPNT
57
+	PLA
58
+	STA DEFPNT+1
59
+	JSR CHRGOT
60
+	BEQ *+5
61
+	JMP SNERR
62
+	PLA
63
+	STA TXTPTR
64
+	PLA
65
+	STA TXTPTR+1
66
+DEFFIN	LDY #0
67
+	PLA
68
+	STA (DEFPNT)Y
69
+	PLA
70
+	INY
71
+	STA (DEFPNT)Y
72
+	PLA
73
+	INY
74
+	STA (DEFPNT)Y
75
+	PLA
76
+	INY
77
+	STA (DEFPNT)Y
78
+	PLA
79
+	INY
80
+	STA (DEFPNT)Y
81
+	RTS
82
+STRD	JSR CHKNUM
83
+	LDY #0
84
+	JSR FOUTC
85
+	PLA
86
+	PLA
87
+TIMSTR	LDA #<LOFBUF
88
+	LDY #>LOFBUF
89
+	BEQ STRLIT
90
+STRINI	LDX FACMO
91
+	LDY FACMO+1
92
+	STX DSCPNT
93
+	STY DSCPNT+1
94
+STRSPA	JSR GETSPA
95
+	STX DSCTMP+1
96
+	STY DSCTMP+2
97
+	STA DSCTMP
98
+	RTS
99
+STRLIT	LDX #34
100
+	STX CHARAC
101
+	STX ENDCHR
102
+STRLT2	STA STRNG1
103
+	STY STRNG1+1
104
+	STA DSCTMP+1
105
+	STY DSCTMP+2
106
+	LDY #255
107
+STRGET	INY
108
+	LDA (STRNG1)Y
109
+	BEQ STRFI1
110
+	CMP CHARAC
111
+	BEQ STRFIN
112
+	CMP ENDCHR
113
+	BNE STRGET
114
+STRFIN	CMP #34
115
+	BEQ STRFI2
116
+STRFI1	CLC
117
+STRFI2	STY DSCTMP
118
+	TYA
119
+	ADC STRNG1
120
+	STA STRNG2
121
+	LDX STRNG1+1
122
+	BCC STRST2
123
+	INX
124
+STRST2	STX STRNG2+1
125
+	LDA STRNG1+1
126
+	BEQ STRCP
127
+	CMP #BUFPAG
128
+	BNE PUTNEW
129
+STRCP	TYA
130
+	JSR STRINI
131
+	LDX STRNG1
132
+	LDY STRNG1+1
133
+	JSR MOVSTR
134
+PUTNEW	LDX TEMPPT
135
+	CPX #TEMPST+STRSIZ+STRSIZ+STRSIZ
136
+	BNE PUTNW1
137
+	LDX #ERRST
138
+ERRGO2	JMP ERROR
139
+PUTNW1	LDA DSCTMP
140
+	STA 0,X
141
+	LDA DSCTMP+1
142
+	STA 1,X
143
+	LDA DSCTMP+2
144
+	STA 2,X
145
+	LDY #0
146
+	STX FACMO
147
+	STY FACMO+1
148
+	STY FACOV
149
+	DEY
150
+	STY VALTYP
151
+	STX LASTPT
152
+	INX
153
+	INX
154
+	INX
155
+	STX TEMPPT
156
+	RTS
157
+GETSPA	LSR GARBFL
158
+TRYAG2	PHA
159
+	EOR #255
160
+	SEC
161
+	ADC FRETOP
162
+	LDY FRETOP+1
163
+	BCS TRYAG3
164
+	DEY
165
+TRYAG3	CPY STREND+1
166
+	BCC GARBAG
167
+	BNE STRFRE
168
+	CMP STREND
169
+	BCC GARBAG
170
+STRFRE	STA FRETOP
171
+	STY FRETOP+1
172
+	STA FRESPC
173
+	STY FRESPC+1
174
+	TAX
175
+	PLA
176
+	RTS
177
+GARBAG	LDX #ERROM
178
+	LDA GARBFL
179
+	BMI ERRGO2
180
+	JSR GARBA2
181
+	LDA #128
182
+	STA GARBFL
183
+	PLA
184
+	BNE TRYAG2
185
+GARBA2	LDX MEMSIZ
186
+	LDA MEMSIZ+1
187
+FNDVAR	STX FRETOP
188
+	STA FRETOP+1
189
+	LDY #0
190
+	STY GRBPNT+1
191
+	STY GRBPNT
192
+	LDA STREND
193
+	LDX STREND+1
194
+	STA GRBTOP
195
+	STX GRBTOP+1
196
+	LDA #<TEMPST
197
+	LDX #>TEMPST
198
+	STA INDEX1
199
+	STX INDEX1+1
200
+TVAR	CMP TEMPPT
201
+	BEQ SVARS
202
+	JSR DVAR
203
+	BEQ TVAR
204
+SVARS	LDA #6+ADDPRC
205
+	STA FOUR6
206
+	LDA VARTAB
207
+	LDX VARTAB+1
208 208
 .END

+ 156
- 156
BASIC_C64/code15 View File

@@ -1,158 +1,158 @@
1 1
 .PAG 'CODE15'
2
-STA INDEX1
3
-STX INDEX1+1
4
-SVAR CPX ARYTAB+1
5
-BNE SVARGO
6
-CMP ARYTAB
7
-BEQ ARYVAR
8
-SVARGO JSR DVARS
9
-BEQ SVAR
10
-ARYVAR STA ARYPNT
11
-STX ARYPNT+1
12
-LDA #STRSIZ
13
-STA FOUR6
14
-ARYVA2 LDA ARYPNT
15
-LDX ARYPNT+1
16
-ARYVA3 CPX STREND+1
17
-BNE ARYVGO
18
-CMP STREND
19
-BNE *+5
20
-JMP GRBPAS
21
-ARYVGO STA INDEX1
22
-STX INDEX1+1
23
-LDY #1-ADDPRC
24
-LDA (INDEX1)Y
25
-TAX
26
-INY
27
-LDA (INDEX1)Y
28
-PHP
29
-INY
30
-LDA (INDEX1)Y
31
-ADC ARYPNT
32
-STA ARYPNT
33
-INY
34
-LDA (INDEX1)Y
35
-ADC ARYPNT+1
36
-STA ARYPNT+1
37
-PLP
38
-BPL ARYVA2
39
-TXA
40
-BMI ARYVA2
41
-INY
42
-LDA (INDEX1)Y
43
-LDY #0
44
-ASL A
45
-ADC #5
46
-ADC INDEX1
47
-STA INDEX1
48
-BCC ARYGET
49
-INC INDEX1+1
50
-ARYGET LDX INDEX1+1
51
-ARYSTR CPX ARYPNT+1
52
-BNE GOGO
53
-CMP ARYPNT
54
-BEQ ARYVA3
55
-GOGO JSR DVAR
56
-BEQ ARYSTR
57
-DVARS LDA (INDEX1)Y
58
-BMI DVARTS
59
-INY
60
-LDA (INDEX1)Y
61
-BPL DVARTS
62
-INY
63
-DVAR LDA (INDEX1)Y
64
-BEQ DVARTS
65
-INY
66
-LDA (INDEX1)Y
67
-TAX
68
-INY
69
-LDA (INDEX1)Y
70
-CMP FRETOP+1
71
-BCC DVAR2
72
-BNE DVARTS
73
-CPX FRETOP
74
-BCS DVARTS
75
-DVAR2 CMP GRBTOP+1
76
-BCC DVARTS
77
-BNE DVAR3
78
-CPX GRBTOP
79
-BCC DVARTS
80
-DVAR3 STX GRBTOP
81
-STA GRBTOP+1
82
-LDA INDEX1
83
-LDX INDEX1+1
84
-STA GRBPNT
85
-STX GRBPNT+1
86
-LDA FOUR6
87
-STA SIZE
88
-DVARTS LDA FOUR6
89
-CLC
90
-ADC INDEX1
91
-STA INDEX1
92
-BCC GRBRTS
93
-INC INDEX1+1
94
-GRBRTS LDX INDEX1+1
95
-LDY #0
96
-RTS
97
-GRBPAS LDA GRBPNT+1
98
-ORA GRBPNT
99
-BEQ GRBRTS
100
-LDA SIZE
101
-AND #4
102
-LSR A
103
-TAY
104
-STA SIZE
105
-LDA (GRBPNT)Y
106
-ADC LOWTR
107
-STA HIGHTR
108
-LDA LOWTR+1
109
-ADC #0
110
-STA HIGHTR+1
111
-LDA FRETOP
112
-LDX FRETOP+1
113
-STA HIGHDS
114
-STX HIGHDS+1
115
-JSR BLTUC
116
-LDY SIZE
117
-INY
118
-LDA HIGHDS
119
-STA (GRBPNT)Y
120
-TAX
121
-INC HIGHDS+1
122
-LDA HIGHDS+1
123
-INY
124
-STA (GRBPNT)Y
125
-JMP FNDVAR
126
-CAT LDA FACLO
127
-PHA
128
-LDA FACMO
129
-PHA
130
-JSR EVAL
131
-JSR CHKSTR
132
-PLA
133
-STA STRNG1
134
-PLA
135
-STA STRNG1+1
136
-LDY #0
137
-LDA (STRNG1)Y
138
-CLC
139
-ADC (FACMO)Y
140
-BCC SIZEOK
141
-LDX #ERRLS
142
-JMP ERROR
143
-SIZEOK JSR STRINI
144
-JSR MOVINS
145
-LDA DSCPNT
146
-LDY DSCPNT+1
147
-JSR FRETMP
148
-JSR MOVDO
149
-LDA STRNG1
150
-LDY STRNG1+1
151
-JSR FRETMP
152
-JSR PUTNEW
153
-JMP TSTOP
154
-MOVINS LDY #0
155
-LDA (STRNG1)Y
156
-PHA
157
-INY
2
+	STA INDEX1
3
+	STX INDEX1+1
4
+SVAR	CPX ARYTAB+1
5
+	BNE SVARGO
6
+	CMP ARYTAB
7
+	BEQ ARYVAR
8
+SVARGO	JSR DVARS
9
+	BEQ SVAR
10
+ARYVAR	STA ARYPNT
11
+	STX ARYPNT+1
12
+	LDA #STRSIZ
13
+	STA FOUR6
14
+ARYVA2	LDA ARYPNT
15
+	LDX ARYPNT+1
16
+ARYVA3	CPX STREND+1
17
+	BNE ARYVGO
18
+	CMP STREND
19
+	BNE *+5
20
+	JMP GRBPAS
21
+ARYVGO	STA INDEX1
22
+	STX INDEX1+1
23
+	LDY #1-ADDPRC
24
+	LDA (INDEX1)Y
25
+	TAX
26
+	INY
27
+	LDA (INDEX1)Y
28
+	PHP
29
+	INY
30
+	LDA (INDEX1)Y
31
+	ADC ARYPNT
32
+	STA ARYPNT
33
+	INY
34
+	LDA (INDEX1)Y
35
+	ADC ARYPNT+1
36
+	STA ARYPNT+1
37
+	PLP
38
+	BPL ARYVA2
39
+	TXA
40
+	BMI ARYVA2
41
+	INY
42
+	LDA (INDEX1)Y
43
+	LDY #0
44
+	ASL A
45
+	ADC #5
46
+	ADC INDEX1
47
+	STA INDEX1
48
+	BCC ARYGET
49
+	INC INDEX1+1
50
+ARYGET	LDX INDEX1+1
51
+ARYSTR	CPX ARYPNT+1
52
+	BNE GOGO
53
+	CMP ARYPNT
54
+	BEQ ARYVA3
55
+GOGO	JSR DVAR
56
+	BEQ ARYSTR
57
+DVARS	LDA (INDEX1)Y
58
+	BMI DVARTS
59
+	INY
60
+	LDA (INDEX1)Y
61
+	BPL DVARTS
62
+	INY
63
+DVAR	LDA (INDEX1)Y
64
+	BEQ DVARTS
65
+	INY
66
+	LDA (INDEX1)Y
67
+	TAX
68
+	INY
69
+	LDA (INDEX1)Y
70
+	CMP FRETOP+1
71
+	BCC DVAR2
72
+	BNE DVARTS
73
+	CPX FRETOP
74
+	BCS DVARTS
75
+DVAR2	CMP GRBTOP+1
76
+	BCC DVARTS
77
+	BNE DVAR3
78
+	CPX GRBTOP
79
+	BCC DVARTS
80
+DVAR3	STX GRBTOP
81
+	STA GRBTOP+1
82
+	LDA INDEX1
83
+	LDX INDEX1+1
84
+	STA GRBPNT
85
+	STX GRBPNT+1
86
+	LDA FOUR6
87
+	STA SIZE
88
+DVARTS	LDA FOUR6
89
+	CLC
90
+	ADC INDEX1
91
+	STA INDEX1
92
+	BCC GRBRTS
93
+	INC INDEX1+1
94
+GRBRTS	LDX INDEX1+1
95
+	LDY #0
96
+	RTS
97
+GRBPAS	LDA GRBPNT+1
98
+	ORA GRBPNT
99
+	BEQ GRBRTS
100
+	LDA SIZE
101
+	AND #4
102
+	LSR A
103
+	TAY
104
+	STA SIZE
105
+	LDA (GRBPNT)Y
106
+	ADC LOWTR
107
+	STA HIGHTR
108
+	LDA LOWTR+1
109
+	ADC #0
110
+	STA HIGHTR+1
111
+	LDA FRETOP
112
+	LDX FRETOP+1
113
+	STA HIGHDS
114
+	STX HIGHDS+1
115
+	JSR BLTUC
116
+	LDY SIZE
117
+	INY
118
+	LDA HIGHDS
119
+	STA (GRBPNT)Y
120
+	TAX
121
+	INC HIGHDS+1
122
+	LDA HIGHDS+1
123
+	INY
124
+	STA (GRBPNT)Y
125
+	JMP FNDVAR
126
+CAT	LDA FACLO
127
+	PHA
128
+	LDA FACMO
129
+	PHA
130
+	JSR EVAL
131
+	JSR CHKSTR
132
+	PLA
133
+	STA STRNG1
134
+	PLA
135
+	STA STRNG1+1
136
+	LDY #0
137
+	LDA (STRNG1)Y
138
+	CLC
139
+	ADC (FACMO)Y
140
+	BCC SIZEOK
141
+	LDX #ERRLS
142
+	JMP ERROR
143
+SIZEOK	JSR STRINI
144
+	JSR MOVINS
145
+	LDA DSCPNT
146
+	LDY DSCPNT+1
147
+	JSR FRETMP
148
+	JSR MOVDO
149
+	LDA STRNG1
150
+	LDY STRNG1+1
151
+	JSR FRETMP
152
+	JSR PUTNEW
153
+	JMP TSTOP
154
+MOVINS	LDY #0
155
+	LDA (STRNG1)Y
156
+	PHA
157
+	INY
158 158
 .END

+ 162
- 162
BASIC_C64/code16 View File

@@ -1,164 +1,164 @@
1 1
 .PAG 'CODE16'
2
-LDA (STRNG1)Y
3
-TAX
4
-INY
5
-LDA (STRNG1)Y
6
-TAY
7
-PLA
8
-MOVSTR STX INDEX
9
-STY INDEX+1
10
-MOVDO TAY
11
-BEQ MVDONE
12
-PHA
13
-MOVLP DEY
14
-LDA (INDEX)Y
15
-STA (FRESPC)Y
16
-TYA
17
-BNE MOVLP
18
-PLA
19
-MVDONE CLC
20
-ADC FRESPC
21
-STA FRESPC
22
-BCC MVSTRT
23
-INC FRESPC+1
24
-MVSTRT RTS
25
-FRESTR JSR CHKSTR
26
-FREFAC LDA FACMO
27
-LDY FACMO+1
28
-FRETMP STA INDEX
29
-STY INDEX+1
30
-JSR FRETMS
31
-PHP
32
-LDY #0
33
-LDA (INDEX)Y
34
-PHA
35
-INY
36
-LDA (INDEX)Y
37
-TAX
38
-INY
39
-LDA (INDEX)Y
40
-TAY
41
-PLA
42
-PLP
43
-BNE FRETRT
44
-CPY FRETOP+1
45
-BNE FRETRT
46
-CPX FRETOP
47
-BNE FRETRT
48
-PHA
49
-CLC
50
-ADC FRETOP
51
-STA FRETOP
52
-BCC FREPLA
53
-INC FRETOP+1
54
-FREPLA PLA
55
-FRETRT STX INDEX
56
-STY INDEX+1
57
-RTS
58
-FRETMS CPY LASTPT+1
59
-BNE FRERTS
60
-CMP LASTPT
61
-BNE FRERTS
62
-STA TEMPPT
63
-SBC #STRSIZ
64
-STA LASTPT
65
-LDY #0
66
-FRERTS RTS
67
-CHRD JSR CONINT
68
-TXA
69
-PHA
70
-LDA #1
71
-JSR STRSPA
72
-PLA
73
-LDY #0
74
-STA (DSCTMP+1)Y
75
-PLA
76
-PLA
77
-JMP PUTNEW
78
-LEFTD JSR PREAM
79
-CMP (DSCPNT)Y
80
-TYA
81
-RLEFT BCC RLEFT1
82
-LDA (DSCPNT)Y
83
-TAX
84
-TYA
85
-RLEFT1 PHA
86
-RLEFT2 TXA
87
-RLEFT3 PHA
88
-JSR STRSPA
89
-LDA DSCPNT
90
-LDY DSCPNT+1
91
-JSR FRETMP
92
-PLA
93
-TAY
94
-PLA
95
-CLC
96
-ADC INDEX
97
-STA INDEX
98
-BCC PULMOR
99
-INC INDEX+1
100
-PULMOR TYA
101
-JSR MOVDO
102
-JMP PUTNEW
103
-RIGHTD JSR PREAM
104
-CLC
105
-SBC (DSCPNT)Y
106
-EOR #255
107
-JMP RLEFT
108
-MIDD LDA #255
109
-STA FACLO
110
-JSR CHRGOT
111
-CMP #41
112
-BEQ MID2
113
-JSR CHKCOM
114
-JSR GETBYT
115
-MID2 JSR PREAM
116
-BEQ GOFUC
117
-DEX
118
-TXA
119
-PHA
120
-CLC
121
-LDX #0
122
-SBC (DSCPNT)Y
123
-BCS RLEFT2
124
-EOR #255
125
-CMP FACLO
126
-BCC RLEFT3
127
-LDA FACLO
128
-BCS RLEFT3
129
-PREAM JSR CHKCLS
130
-PLA
131
-TAY
132
-PLA
133
-STA JMPER+1
134
-PLA
135
-PLA
136
-PLA
137
-TAX
138
-PLA
139