Browse Source

reindented BASIC_CBM2_[AB], KERNAL_CBM2_[AB] and EDITOR_CBM2 to approximate the LST output of the assembler

master
Michael Steil 2 years ago
parent
commit
2ee5a84192
100 changed files with 22048 additions and 22048 deletions
  1. 7
    7
      BASIC_CBM2_A/basdoc
  2. 56
    56
      BASIC_CBM2_A/basic
  3. 203
    203
      BASIC_CBM2_A/bdefine
  4. 382
    382
      BASIC_CBM2_A/butes1
  5. 380
    380
      BASIC_CBM2_A/butes2
  6. 654
    654
      BASIC_CBM2_A/bverbs1
  7. 520
    520
      BASIC_CBM2_A/bverbs2
  8. 321
    321
      BASIC_CBM2_A/bverbs3
  9. 4
    4
      BASIC_CBM2_A/cbm128
  10. 4
    4
      BASIC_CBM2_A/cbm256
  11. 630
    630
      BASIC_CBM2_A/contrl
  12. 70
    70
      BASIC_CBM2_A/delete
  13. 183
    183
      BASIC_CBM2_A/init
  14. 734
    734
      BASIC_CBM2_A/math1
  15. 702
    702
      BASIC_CBM2_A/math2
  16. 354
    354
      BASIC_CBM2_A/math3
  17. 611
    611
      BASIC_CBM2_A/math4
  18. 305
    305
      BASIC_CBM2_A/renumber
  19. 389
    389
      BASIC_CBM2_A/strng1
  20. 800
    800
      BASIC_CBM2_A/strng2
  21. 41
    41
      BASIC_CBM2_A/syscal
  22. 43
    43
      BASIC_CBM2_A/sysvec
  23. 391
    391
      BASIC_CBM2_A/tokens
  24. 544
    544
      BASIC_CBM2_A/using
  25. 7
    7
      BASIC_CBM2_B/basdoc
  26. 56
    56
      BASIC_CBM2_B/basic
  27. 203
    203
      BASIC_CBM2_B/bdefine
  28. 382
    382
      BASIC_CBM2_B/butes1
  29. 380
    380
      BASIC_CBM2_B/butes2
  30. 654
    654
      BASIC_CBM2_B/bverbs1
  31. 520
    520
      BASIC_CBM2_B/bverbs2
  32. 321
    321
      BASIC_CBM2_B/bverbs3
  33. 4
    4
      BASIC_CBM2_B/cbm128
  34. 4
    4
      BASIC_CBM2_B/cbm128no
  35. 4
    4
      BASIC_CBM2_B/cbm192
  36. 4
    4
      BASIC_CBM2_B/cbm192no
  37. 4
    4
      BASIC_CBM2_B/cbm256
  38. 4
    4
      BASIC_CBM2_B/cbm256no
  39. 4
    4
      BASIC_CBM2_B/cbm64
  40. 4
    4
      BASIC_CBM2_B/cbm64no
  41. 630
    630
      BASIC_CBM2_B/contrl
  42. 70
    70
      BASIC_CBM2_B/delete
  43. 356
    356
      BASIC_CBM2_B/indir
  44. 183
    183
      BASIC_CBM2_B/init
  45. 734
    734
      BASIC_CBM2_B/math1
  46. 702
    702
      BASIC_CBM2_B/math2
  47. 354
    354
      BASIC_CBM2_B/math3
  48. 611
    611
      BASIC_CBM2_B/math4
  49. 20
    20
      BASIC_CBM2_B/patches
  50. 4
    4
      BASIC_CBM2_B/pet128
  51. 4
    4
      BASIC_CBM2_B/pet192
  52. 4
    4
      BASIC_CBM2_B/pet192no
  53. 4
    4
      BASIC_CBM2_B/pet256
  54. 4
    4
      BASIC_CBM2_B/pet256no
  55. 4
    4
      BASIC_CBM2_B/pet64
  56. 4
    4
      BASIC_CBM2_B/pet64no
  57. 305
    305
      BASIC_CBM2_B/renumber
  58. 388
    388
      BASIC_CBM2_B/strng1
  59. 787
    787
      BASIC_CBM2_B/strng2
  60. 41
    41
      BASIC_CBM2_B/syscal
  61. 43
    43
      BASIC_CBM2_B/sysvec
  62. 391
    391
      BASIC_CBM2_B/tokens
  63. 545
    545
      BASIC_CBM2_B/using
  64. 71
    71
      EDITOR_CBM2/bwdisp
  65. 313
    313
      EDITOR_CBM2/bwfun1
  66. 271
    271
      EDITOR_CBM2/bwfun2
  67. 270
    270
      EDITOR_CBM2/bwinit
  68. 142
    142
      EDITOR_CBM2/bwkybd
  69. 176
    176
      EDITOR_CBM2/bwsubs
  70. 168
    168
      EDITOR_CBM2/bwsubs.old
  71. 217
    217
      EDITOR_CBM2/bwtabs
  72. 88
    88
      EDITOR_CBM2/declare
  73. 95
    95
      EDITOR_CBM2/equate
  74. 106
    106
      EDITOR_CBM2/escape
  75. 193
    193
      KERNAL_CBM2_A/channelio
  76. 29
    29
      KERNAL_CBM2_A/clall
  77. 97
    97
      KERNAL_CBM2_A/close
  78. 187
    187
      KERNAL_CBM2_A/declare
  79. 101
    101
      KERNAL_CBM2_A/equate
  80. 52
    52
      KERNAL_CBM2_A/errorhandler
  81. 174
    174
      KERNAL_CBM2_A/ieee
  82. 283
    283
      KERNAL_CBM2_A/init
  83. 197
    197
      KERNAL_CBM2_A/ipcom
  84. 104
    104
      KERNAL_CBM2_A/irq
  85. 7
    7
      KERNAL_CBM2_A/kernal
  86. 47
    47
      KERNAL_CBM2_A/ktemp
  87. 190
    190
      KERNAL_CBM2_A/load
  88. 22
    22
      KERNAL_CBM2_A/messages
  89. 487
    487
      KERNAL_CBM2_A/monitor
  90. 94
    94
      KERNAL_CBM2_A/open
  91. 85
    85
      KERNAL_CBM2_A/openchannel
  92. 94
    94
      KERNAL_CBM2_A/rs232
  93. 89
    89
      KERNAL_CBM2_A/save
  94. 49
    49
      KERNAL_CBM2_A/time
  95. 107
    107
      KERNAL_CBM2_A/transx
  96. 53
    53
      KERNAL_CBM2_A/vectors
  97. 193
    193
      KERNAL_CBM2_B/channelio
  98. 29
    29
      KERNAL_CBM2_B/clall
  99. 97
    97
      KERNAL_CBM2_B/close
  100. 0
    0
      KERNAL_CBM2_B/crossover

+ 7
- 7
BASIC_CBM2_A/basdoc View File

@@ -1,4 +1,4 @@
1
- .PAGE   'DEFINTION OF BASIC AND PARAMETERS'
1
+.PAGE   'DEFINTION OF BASIC AND PARAMETERS'
2 2
 ; PAGE ZERO ----------------------
3 3
 ;       STARTUP:
4 4
 ;      INITIALLY A JMP TO INITIALIZATION CODE BUT CHANGED TO
@@ -21,10 +21,10 @@
21 21
 ;       SUBROUTINE.  IT IS HERE SO [TXTPTR] CAN BE THE
22 22
 ;       EXTENDED ADDRESS OF A LOAD INSTRUCTION.
23 23
 ;       THIS SAVES HAVING TO BOTHER ANY REGISTERS.
24
- .SKIP 4
24
+.SKIP 4
25 25
 ; PAGE ONE -----------------------
26 26
 ;       THE STACK
27
- .PAGE
27
+.PAGE
28 28
 ; STORAGE, PAGE TWO AND ON--------
29 29
 ;       IN RAM VERSIONS THESE DATA STRUCTURES COME AT THE END
30 30
 ;       OF BASIC.  IN ROM VERSION THEY ARE AT RAMLOC WHICH CAN
@@ -59,7 +59,7 @@
59 59
 ; MEMSIZ:
60 60
 ;       HIGHEST MACHINE LOCATION.  UNUSED EXCEPT BY THE VAL
61 61
 ;       FUNCTION.
62
- .PAGE
62
+.PAGE
63 63
 ;       ROM CONSTANTS AND CODE.
64 64
 ; FUNCTION DISPATCH ADDRESSES (AT ROMLOC)
65 65
 ;       FUNSP CONTAINS THE ADDRESSES OF THE FUNCTION ROUTINES
@@ -268,7 +268,7 @@
268 268
 ;       PARENTESIS FOR A SUBSCRIPTED VAR WILL NOT BE SCANNED
269 269
 ;       BY PTRGET, AND PTRGET WILL RETURN WITH A TEXT POINTER
270 270
 ;       TO THE '(', IF THERE WAS ONE.
271
- .SKIP 4
271
+.SKIP 4
272 272
 ; STRINGS
273 273
 ;       IN THE VARIABLE TABLES STRINGS ARE STORED JUST LIKE
274 274
 ;       NUMERIC VARIABLES.  SIMPLE STRINGS HAVE THREE VALUE BYTES
@@ -297,14 +297,14 @@
297 297
 ;       VALUE IS COPIED INTO STRING SPACE SING BUF IS
298 298
 ;       ALWAYS CHANGING.
299 299
 ;       ---MORE---
300
- .SKIP 4
300
+.SKIP 4
301 301
 ; MATH PACKAGE
302 302
 ;       THE MATH PACKAGE CONTAINS FLOATING INPUT FIN, OUTPUT
303 303
 ;       FOUT, COMPARE FCOMP...AND ALL THE NUMERIC OPERATORS
304 304
 ;       AND FUNCTIONS.  THE FORMATS, CONVENTIONS AND ENTRY
305 305
 ;       POINTS ARE ALL DESCRIBED IN THE MATH PACKAGE ITSELF.
306 306
 ;       (HA,HA...)
307
- .SKIP 4
307
+.SKIP 4
308 308
 ; INIT - THE INITIALIZATION ROUTINE.
309 309
 ;       THE AMOUNT OF MEMORY, THE TERMINAL WIDTH, AND WHICH
310 310
 ;       FUNCTIONS TO BE RETAINED ARE ASCERTAINED FROM THE

+ 56
- 56
BASIC_CBM2_A/basic View File

@@ -64,74 +64,74 @@
64 64
 ;      VERSION 4.75 - JANUARY 7,1982
65 65
 ;       1) EXTENSIONS FOR 64K,128K,192K,256K
66 66
 .PAG
67
-CODFWA =$8000 ;SAVE CODE FIRST WORD ADDRESS
68
-FALSE =0
69
-TRUE =255
70
-ROMLOC =$8000 ;START OF ROM
71
-ROMC =TRUE
72
-DEBUG =TRUE
73
-GDEBUG =FALSE ;GARBAGE DEBUG
74
-NKRNL =TRUE ;USING NEW KERNEL
67
+CODFWA	=$8000          ;SAVE CODE FIRST WORD ADDRESS
68
+FALSE	=0
69
+TRUE	=255
70
+ROMLOC	=$8000          ;START OF ROM
71
+ROMC	=TRUE
72
+DEBUG	=TRUE
73
+GDEBUG	=FALSE          ;GARBAGE DEBUG
74
+NKRNL	=TRUE           ;USING NEW KERNEL
75 75
 .PAG
76 76
 ;       ASSEMBLY CONSTANTS AND PARAMETERS
77 77
 ;
78
-PGMKEY =$FF75 ;PROGRAM FUNCTION KEYS
79
-VECORG =$FF7B ;JUMP VECTOR
78
+PGMKEY	=$FF75          ;PROGRAM FUNCTION KEYS
79
+VECORG	=$FF7B          ;JUMP VECTOR
80 80
 .SKI 4
81
-CR =$D ;CARRIAGE RETURN
82
-LF =$A ;LINE FEED
83
-CLRSCR =147 ;CLEAR PET SCREEN
84
-HOME =197 ;HOME PET SCREEN
85
-EOM =$80 ;INDICATE END OF MESSAGE
81
+CR	=$D             ;CARRIAGE RETURN
82
+LF	=$A             ;LINE FEED
83
+CLRSCR	=147            ;CLEAR PET SCREEN
84
+HOME	=197            ;HOME PET SCREEN
85
+EOM	=$80            ;INDICATE END OF MESSAGE
86 86
 .SKI 4
87
-FORSIZ =19
88
-NUMLEV =26 ;MAXIMUM NUMBER OF CALLS TO GETSTK
89
-BUFSIZ =161
90
-ADDPRC =1
91
-ADDPR2 =ADDPRC+ADDPRC
92
-ADDPR4 =ADDPR2+ADDPR2
93
-ADDPR8 =ADDPR4+ADDPR4
94
-STKEND =$1FB ;FIRST BYTE USED FOR STACK
95
-CLMWID =10
96
-PI =$FF
97
-STRSIZ =4 ;# OF LOCS PER STR DESCRIPTOR
98
-PTRSIZ =3 ;# OF LOCS PER POINTER
99
-NUMTMP =3 ;# OF STRING TEMPORARIES
87
+FORSIZ	=19
88
+NUMLEV	=26             ;MAXIMUM NUMBER OF CALLS TO GETSTK
89
+BUFSIZ	=161
90
+ADDPRC	=1
91
+ADDPR2	=ADDPRC+ADDPRC
92
+ADDPR4	=ADDPR2+ADDPR2
93
+ADDPR8	=ADDPR4+ADDPR4
94
+STKEND	=$1FB           ;FIRST BYTE USED FOR STACK
95
+CLMWID	=10
96
+PI	=$FF
97
+STRSIZ	=4 ;# OF LOCS PER STR DESCRIPTOR
98
+PTRSIZ	=3 ;# OF LOCS PER POINTER
99
+NUMTMP	=3 ;# OF STRING TEMPORARIES
100 100
 .SKI 3
101 101
 ;          BANK EQUATES
102
-SYSBNK =$0F ;SYSTEM BANK#
103
-MXBANK =SYSBNK+1 ;1ST BANK OUT OF RANGE
104
-.IFN CC1 <
105
-TXTBNK =0+BF           ;TEXT BANK       *ONE*
106
-VARBNK =0+BF           ;SIMPLE VARIABLE BANK
107
-ARYBNK =0+BF           ;ARRAY BANK
108
-STRBNK =0+BF           ;STRING BANK
102
+SYSBNK	=$0F            ;SYSTEM BANK#
103
+MXBANK	=SYSBNK+1       ;1ST BANK OUT OF RANGE
104
+	.IFN CC1 <
105
+TXTBNK	=0+BF           ;TEXT BANK       *ONE*
106
+VARBNK	=0+BF           ;SIMPLE VARIABLE BANK
107
+ARYBNK	=0+BF           ;ARRAY BANK
108
+STRBNK	=0+BF           ;STRING BANK
109 109
 >
110
-.IFN   CC2 <
111
-TXTBNK =0+BF           ;TEXT BANK       *TWO*
112
-VARBNK =1+BF           ;SIMPLE VARIABLE BANK
113
-ARYBNK =1+BF           ;ARRAY BANK
114
-STRBNK =1+BF           ;STRING BANK
110
+	.IFN   CC2 <
111
+TXTBNK	=0+BF           ;TEXT BANK       *TWO*
112
+VARBNK	=1+BF           ;SIMPLE VARIABLE BANK
113
+ARYBNK	=1+BF           ;ARRAY BANK
114
+STRBNK	=1+BF           ;STRING BANK
115 115
 >
116
-.IFN   CC3 <
117
-TXTBNK =0+BF           ;TEXT BANK       *THREE*
118
-VARBNK =2+BF+BF        ;SIMPLE VARIABLE BANK
119
-ARYBNK =1+BF           ;ARRAY BANK
120
-STRBNK =2+BF+BF        ;STRING BANK
116
+	.IFN   CC3 <
117
+TXTBNK	=0+BF           ;TEXT BANK       *THREE*
118
+VARBNK	=2+BF+BF        ;SIMPLE VARIABLE BANK
119
+ARYBNK	=1+BF           ;ARRAY BANK
120
+STRBNK	=2+BF+BF        ;STRING BANK
121 121
 >
122
-.IFN   CC4 <
123
-TXTBNK =0+BF           ;TEXT BANK        *FOUR*
124
-VARBNK =3              ;SIMPLE VARIABLE BANK
125
-ARYBNK =1+BF           ;ARRAY BANK
126
-STRBNK =2+BF+BF        ;STRING BANK
122
+	.IFN   CC4 <
123
+TXTBNK	=0+BF           ;TEXT BANK        *FOUR*
124
+VARBNK	=3              ;SIMPLE VARIABLE BANK
125
+ARYBNK	=1+BF           ;ARRAY BANK
126
+STRBNK	=2+BF+BF        ;STRING BANK
127 127
 >
128 128
 .SKI 4
129 129
 ;       DOS INTERFACE EQUATES.
130
-DOSFNL =16+2 ;FILENAME LENGTH
131
-DOSDSK =8 ;DISK DEVICE #
132
-DOSLFN =14 ;DOS INTERNAL LOGICAL FILE NUMBER
133
-DOSCTL =21 ;DOS DIRECTORY LINES BEFORE PROMPT
134
-DOSLST =DOSFNL+DOSFNL+DOSFNL+16 ;(DOSFNL+2)*3+10 --TRANSMIT BUFFER LENGTH
130
+DOSFNL	=16+2           ;FILENAME LENGTH
131
+DOSDSK	=8 ;DISK DEVICE #
132
+DOSLFN	=14             ;DOS INTERNAL LOGICAL FILE NUMBER
133
+DOSCTL	=21             ;DOS DIRECTORY LINES BEFORE PROMPT
134
+DOSLST	=DOSFNL+DOSFNL+DOSFNL+16 ;(DOSFNL+2)*3+10 --TRANSMIT BUFFER LENGTH
135 135
 ;.LIB BASDOC
136 136
 .LIB BDEFINE
137 137
 .LIB TOKENS
@@ -147,7 +147,7 @@ DOSLST =DOSFNL+DOSFNL+DOSFNL+16 ;(DOSFNL+2)*3+10 --TRANSMIT BUFFER LENGTH
147 147
 .LIB STRNG2
148 148
 ;.LIB RENUMBER
149 149
 .LIB DELETE
150
-.IFN CC2+CC3+CC4 <
150
+	.IFN CC2+CC3+CC4 <
151 151
 .LIB USING
152 152
 >
153 153
 .LIB BUTES1

+ 203
- 203
BASIC_CBM2_A/bdefine View File

@@ -1,70 +1,70 @@
1 1
 .PAG 'BDEFINE'
2 2
 ;       PAGE ZERO STORAGE DEFINITIONS
3
-  *=0
3
+ *=0
4 4
 ;
5
-E6509 *=*+1 ;EXECUTION BANK
6
-I6509 *=*+1 ;INDIRECTION BANK
5
+E6509	*=*+1           ;EXECUTION BANK
6
+I6509	*=*+1           ;INDIRECTION BANK
7 7
 ;
8
-USRPOK *=*+3 ;SET UP ORGIN BY INIT
9
-TMHOUR *=*+1 ;FOR TI$ CALCULATIONS
10
-TMMIN *=*+1
11
-TMSEC *=*+1
12
-TMTEN *=*+1
8
+USRPOK	*=*+3           ;SET UP ORGIN BY INIT
9
+TMHOUR	*=*+1           ;FOR TI$ CALCULATIONS
10
+TMMIN	*=*+1
11
+TMSEC	*=*+1
12
+TMTEN	*=*+1
13 13
 ;
14
-FORM *=*+PTRSIZ ;FORMAT POINTER
14
+FORM	*=*+PTRSIZ      ;FORMAT POINTER
15 15
 ;
16
-INTEGR ;ONE-BYTE INTEGER FROM QINT
17
-CHARAC *=*+1 ;A DELIMITING CHAR
18
-ENDCHR *=*+1 ;OTHER DELIMITING CHAR
19
-COUNT *=*+1 ;GENERAL COUNTER
20
-XCNT *=*+1 ;DOS LOOP COUNTER
16
+INTEGR	;ONE-BYTE INTEGER FROM QINT
17
+CHARAC	*=*+1           ;A DELIMITING CHAR
18
+ENDCHR	*=*+1           ;OTHER DELIMITING CHAR
19
+COUNT	*=*+1           ;GENERAL COUNTER
20
+XCNT	*=*+1           ;DOS LOOP COUNTER
21 21
 .SKI 4
22 22
 ;       FLAGS
23 23
 ;       DIMFLG, VALTYP AND INTFLG MUST BE
24 24
 ;       CONSECUTIVE LOCATIONS.
25
-DIMFLG *=*+1 ;IN GETTING A POINTER TO A VARIABLE
25
+DIMFLG	*=*+1           ;IN GETTING A POINTER TO A VARIABLE
26 26
 ;       IT IS IMPORTANT TO REMEMBER WHETHER
27 27
 ;       IT IS BEING DONE FOR DIM OR NOT.
28
-VALTYP *=*+1 ;THE TYPE INDICATOR 0=NUMERIC, 1=STRING
29
-INTFLG *=*+1 ;TELLS IF INTEGER
28
+VALTYP	*=*+1           ;THE TYPE INDICATOR 0=NUMERIC, 1=STRING
29
+INTFLG	*=*+1           ;TELLS IF INTEGER
30 30
 ;
31
-GARBFL ;WHETHER TO DO GARBAGE COLLECTION
32
-DORES *=*+1 ;WHETHER CAN OR CAN'T CRUNCH RES'D WORD.
31
+GARBFL	;WHETHER TO DO GARBAGE COLLECTION
32
+DORES	*=*+1           ;WHETHER CAN OR CAN'T CRUNCH RES'D WORD.
33 33
 ;       TURNED ON WHEN DATA BEING SCANNED BY
34 34
 ;       CRUNCH SO UNQUOTED STRS WON'T BE CRUNCHED.
35 35
 ;
36
-SUBFLG *=*+1 ;FLAG WHETHER SUB'D VARIABLE ALLOWED.
36
+SUBFLG	*=*+1           ;FLAG WHETHER SUB'D VARIABLE ALLOWED.
37 37
 ;       FOR AND USER-DEFINED FUNCTION POINTER
38 38
 ;       FETCHING TURN THIS ON BEFORE CALLING
39 39
 ;       PTRGET SO ARRAYS WON'T BE DETECTED.
40 40
 ;       STKINI AND PTRGET CLEAR IT.
41 41
 ;       ALSO DISALLOWS INTEGERS THERE.
42 42
 ;
43
-INPFLG *=*+1 ;FLAGS WHETHER WE ARE DOING INPUT OR READ.
43
+INPFLG	*=*+1           ;FLAGS WHETHER WE ARE DOING INPUT OR READ.
44 44
 ;
45
-DSDESC *=*+STRSIZ ;DISK STATUS STRING
46
-CHANNL *=*+1 ;HOLDS CHANNEL NUMBER
45
+DSDESC	*=*+STRSIZ      ;DISK STATUS STRING
46
+CHANNL	*=*+1           ;HOLDS CHANNEL NUMBER
47 47
 POKER
48
-LINNUM *=*+2 ;LOCATION TO STORE LINE #
48
+LINNUM	*=*+2           ;LOCATION TO STORE LINE #
49 49
 .SKI 4
50 50
 ;       POINTERS TO TEMPORARY STRING DESCRIPTORS.
51 51
 ;       TEMP DESCRIPTORS ARE LOCATED IN THE STRING BANK
52 52
 ;       HENCE, BANK OF STRBNK IS ASSUMED FOR TEMPPT,LASTPT
53
-TEMPPT *=*+1 ;TEMPPST RELATIVE OFFSET TO 1ST FREE TEMP DESCR
54
-LASTPT *=*+2 ;POINTER TO LAST-USED STR TEMPORARY
55
-TEMPST *=*+2 ;POINTER TO STORAGE FOR 3 TEMPORARY DESCRIPTORS.
53
+TEMPPT	*=*+1           ;TEMPPST RELATIVE OFFSET TO 1ST FREE TEMP DESCR
54
+LASTPT	*=*+2           ;POINTER TO LAST-USED STR TEMPORARY
55
+TEMPST	*=*+2           ;POINTER TO STORAGE FOR 3 TEMPORARY DESCRIPTORS.
56 56
 ;
57 57
 INDEX
58
-INDEX1 *=*+PTRSIZ ;DIRECT CELLS FOR 1ST INDEXING USAGE
59
-INDEX2 *=*+PTRSIZ ;DIRECT CELLS FOR 2ND INDEXING USAGE
58
+INDEX1	*=*+PTRSIZ      ;DIRECT CELLS FOR 1ST INDEXING USAGE
59
+INDEX2	*=*+PTRSIZ      ;DIRECT CELLS FOR 2ND INDEXING USAGE
60 60
 ;
61 61
 ;
62
-RESHO *=*+1 ;RESULT OF MULTIPLIER AND DIVIDER
63
-RESMOH *=*+1
64
-ADDEND ;TEMP USED BY UMULT
65
-RESMO *=*+1
66
-RESLO *=*+1
67
- *=*+1 ;OVERFLOW PREVIOUS CELLS
62
+RESHO	*=*+1           ;RESULT OF MULTIPLIER AND DIVIDER
63
+RESMOH	*=*+1
64
+ADDEND	;TEMP USED BY UMULT
65
+RESMO	*=*+1
66
+RESLO	*=*+1
67
+	*=*+1           ;OVERFLOW PREVIOUS CELLS
68 68
 .SKI 4
69 69
 ;       POINTERS INTO DYNAMIC DATA STRUCTURES
70 70
 ;       ALL ARE 2-BYTE OFFSETS INTO FIXED BANKS
@@ -97,68 +97,68 @@ RESLO *=*+1
97 97
 ;                  HIGHST (ARRAYS)
98 98
 ;                  MEMTOP (STRS)
99 99
 ;
100
-TXTTAB *=*+2 ;POINTER TO BEGINNING OF TEXT AND
100
+TXTTAB	*=*+2           ;POINTER TO BEGINNING OF TEXT AND
101 101
 ;       DOESN'T CHANGE AFTER BEING SETUP
102 102
 ;       BY INIT
103 103
 ;
104
-TXTEND *=*+2 ;POINTER TO END OF TEXT (EXCEPT 64K)
104
+TXTEND	*=*+2           ;POINTER TO END OF TEXT (EXCEPT 64K)
105 105
 ;
106
-VARTAB *=*+2 ;POINTER TO START OF SIMPLE VARIABLE SPACE.
106
+VARTAB	*=*+2           ;POINTER TO START OF SIMPLE VARIABLE SPACE.
107 107
 ;
108
-VAREND *=*+2 ;POINTER TO END OF SIMPLE VARS (256K ONLY)
108
+VAREND	*=*+2           ;POINTER TO END OF SIMPLE VARS (256K ONLY)
109 109
 ;
110
-ARYTAB *=*+2 ;POINTER TO START OF ARRAY TABLE
110
+ARYTAB	*=*+2           ;POINTER TO START OF ARRAY TABLE
111 111
 ;
112
-ARYEND *=*+2 ;POINTER END OF ARRAYS (192K, 256K ONLY)
112
+ARYEND	*=*+2           ;POINTER END OF ARRAYS (192K, 256K ONLY)
113 113
 ;
114
-STREND *=*+2 ;END OF STORAGE IN USE.
114
+STREND	*=*+2           ;END OF STORAGE IN USE.
115 115
 ;
116
-FRETOP *=*+2 ;TOP OF STR FREE SPACE
117
-FRESPC *=*+2 ;POINTER TO NEW STR
118
-MEMTOP *=*+PTRSIZ ;HIGHEST LOCATION IN MEMORY
116
+FRETOP	*=*+2           ;TOP OF STR FREE SPACE
117
+FRESPC	*=*+2           ;POINTER TO NEW STR
118
+MEMTOP	*=*+PTRSIZ      ;HIGHEST LOCATION IN MEMORY
119 119
 .SKI 4
120 120
 ;       LINE NUMBERS AND TEXTUAL POINTERS
121
-CURLIN *=*+2 ;CURRENT LINE NUMBER
122
-OLDLIN *=*+2 ;OLD LINE NUMBER (SETUP BY STOP OR
121
+CURLIN	*=*+2           ;CURRENT LINE NUMBER
122
+OLDLIN	*=*+2           ;OLD LINE NUMBER (SETUP BY STOP OR
123 123
 ;       END IN A PROGRAM)
124
-OLDTXT *=*+PTRSIZ ;OLD TEXT POINTER
124
+OLDTXT	*=*+PTRSIZ      ;OLD TEXT POINTER
125 125
 ;
126
-DATLIN *=*+2 ;DATA LINE NUMBER
127
-DATPTR *=*+2 ;POINTER TO DATA. INITIALIZED TO POINT
126
+DATLIN	*=*+2           ;DATA LINE NUMBER
127
+DATPTR	*=*+2           ;POINTER TO DATA. INITIALIZED TO POINT
128 128
 ;       AT THE ZERO INFRONT OF (TXTTAB) BY
129 129
 ;       CLR COMMAND.
130 130
 ;       UPDATED BY EXECUTION OF A READ.
131
-INPPTR *=*+2 ;REMEMBERS WHERE INPUT IS COMING FROM.
131
+INPPTR	*=*+2           ;REMEMBERS WHERE INPUT IS COMING FROM.
132 132
 .SKI 4
133 133
 ;       STUFF USED IN EVALUATIONS
134 134
 ;
135
-VARNAM *=*+2 ;VARIABLE'S NAME
135
+VARNAM	*=*+2           ;VARIABLE'S NAME
136 136
 ;
137
-FDECPT ;POINTER INTO POWER OF TENS TABLE.
138
-VARPNT *=*+PTRSIZ ;POINTER TO VARIABLE IN MEMORY
137
+FDECPT	;POINTER INTO POWER OF TENS TABLE.
138
+VARPNT	*=*+PTRSIZ      ;POINTER TO VARIABLE IN MEMORY
139 139
 ;
140
-FORPNT ;A VARIABLE'S POINTER FOR FOR LOOPS
140
+FORPNT	;A VARIABLE'S POINTER FOR FOR LOOPS
141 141
 ;       AND LET STATEMENTS (3 BYTES).
142
-LSTPNT *=*+PTRSIZ ;POINTER TO LIST STRING (3 BYTES).
142
+LSTPNT	*=*+PTRSIZ      ;POINTER TO LIST STRING (3 BYTES).
143 143
 ;
144
-VARTXT ;SAVE CURRENT TXTPTR ON READ.
145
-OPPTR *=*+PTRSIZ ;POINTER TO CURRENT OP'S ENTRY IN OPTAB.
144
+VARTXT	;SAVE CURRENT TXTPTR ON READ.
145
+OPPTR	*=*+PTRSIZ      ;POINTER TO CURRENT OP'S ENTRY IN OPTAB.
146 146
 ;
147
-OPMASK *=*+1 ;MASK CREATED BY CURRENT OPERATION.
147
+OPMASK	*=*+1           ;MASK CREATED BY CURRENT OPERATION.
148 148
 .SKIP 2
149 149
 ;       TEMPORARY FLOATING RESULT REGISTERS (5BYTES EACH):
150 150
 ;            TEMPF1,TEMPF2,TEMPF3
151 151
 ;
152
-TEMPF3 ;TEMP FLOAT REG
153
-GRBPNT ;POINTER USED IN GARBAGE COLLECTION.
154
-DEFPNT *=*+PTRSIZ ;POINTER USED IN FUNCTION DEFINITION.
152
+TEMPF3	;TEMP FLOAT REG
153
+GRBPNT	;POINTER USED IN GARBAGE COLLECTION.
154
+DEFPNT	*=*+PTRSIZ      ;POINTER USED IN FUNCTION DEFINITION.
155 155
 ;
156
-DSCPNT *=*+PTRSIZ ;POINTER TO A STRING DESCRIPTOR.
156
+DSCPNT	*=*+PTRSIZ      ;POINTER TO A STRING DESCRIPTOR.
157 157
 ;
158
-JMPER *=*+2 ;THREE BYTES LONG
159
-OLDOV *=*+1 ;THE OLD OVERFLOW.
158
+JMPER	*=*+2           ;THREE BYTES LONG
159
+OLDOV	*=*+1           ;THE OLD OVERFLOW.
160 160
 ;
161
-TEMPF1 ;TEMP FLOAT REG
161
+TEMPF1	;TEMP FLOAT REG
162 162
 PTARG1=TEMPF1  ;MULTIPLY DEF'D FOR USE BY INSTR$
163 163
 PTARG2=TEMPF1+3
164 164
 STR1=TEMPF1+6
@@ -166,34 +166,34 @@ STR2=TEMPF1+10
166 166
 TMPPOS=TEMPF1+14
167 167
 POSITN=TEMPF1+15
168 168
 MATCH=TEMPF1+16
169
-ARYPNT ;POINTER USED IN ARRAY BUILDING.
170
-HIGHDS *=*+PTRSIZ ;DESTINATION OF HIGHEST ELEMENT IN BLT.
171
-HIGHTR *=*+PTRSIZ ;SOURCE OF HIGHEST ELEMENT TO MOVE.
172
-;
173
-TEMPF2 ;TEMP FLOAT REG (5BYTES)
174
-LOWDS *=*+1 ;LOCATION OF LAST BYTE TRANSFERED (3 BYTES).
175
-DECCNT *=*+1 ;NUMBER OF PLACES BEFORE DECIMAL POINT.
176
-TENEXP *=*+1 ;BASE TEN EXPONENT
177
-;
178
-GRBTOP ;POINTER USED IN GARBAGE COLLECTION.(3 BYTES)
179
-LOWTR *=*+1 ;LAST THING TO MOVE IN BLT (3 BYTES).
180
-DPTFLG *=*+1 ;HAS A DPT BEEN INPUT
181
-EXPSGN *=*+1 ;SIGN OF EXPONENT
169
+ARYPNT	;POINTER USED IN ARRAY BUILDING.
170
+HIGHDS	*=*+PTRSIZ      ;DESTINATION OF HIGHEST ELEMENT IN BLT.
171
+HIGHTR	*=*+PTRSIZ      ;SOURCE OF HIGHEST ELEMENT TO MOVE.
172
+;
173
+TEMPF2	;TEMP FLOAT REG (5BYTES)
174
+LOWDS	*=*+1           ;LOCATION OF LAST BYTE TRANSFERED (3 BYTES).
175
+DECCNT	*=*+1           ;NUMBER OF PLACES BEFORE DECIMAL POINT.
176
+TENEXP	*=*+1           ;BASE TEN EXPONENT
177
+;
178
+GRBTOP	;POINTER USED IN GARBAGE COLLECTION.(3 BYTES)
179
+LOWTR	*=*+1           ;LAST THING TO MOVE IN BLT (3 BYTES).
180
+DPTFLG	*=*+1           ;HAS A DPT BEEN INPUT
181
+EXPSGN	*=*+1           ;SIGN OF EXPONENT
182 182
 .SKI 4
183 183
 ;       THE FLOATING ACCUMULATOR
184
-DSCTMP *=*+1 ;TEMPORARY DESCRIPTORS ARE BUILT HERE.
185
-       ;DSCTMP OVERLAPS UP TO FACMOH.
184
+DSCTMP	*=*+1           ;TEMPORARY DESCRIPTORS ARE BUILT HERE.
185
+      ;DSCTMP OVERLAPS UP TO FACMOH.
186 186
 FAC
187
-FACEXP *=*+1
188
-FACHO *=*+1 ;MOST SIGNIFICANT BYTE OF MANTISSA.
189
-FACMOH *=*+1
190
-INDICE ;USED BY QINT.
191
-FACMO *=*+1
192
-FACLO *=*+1
193
-FACSGN *=*+1
194
-DEGREE ;COUNT USED BY POLYNOMIALS.
195
-SGNFLG *=*+1
196
-BITS *=*+1 ;CELL FOR SHIFTR TO USE.
187
+FACEXP	*=*+1
188
+FACHO	*=*+1           ;MOST SIGNIFICANT BYTE OF MANTISSA.
189
+FACMOH	*=*+1
190
+INDICE	;USED BY QINT.
191
+FACMO	*=*+1
192
+FACLO	*=*+1
193
+FACSGN	*=*+1
194
+DEGREE	;COUNT USED BY POLYNOMIALS.
195
+SGNFLG	*=*+1
196
+BITS	*=*+1           ;CELL FOR SHIFTR TO USE.
197 197
 .SKI 4
198 198
 ;       THE FLOATING ARGUMENT (UNPACKED)
199 199
 T1=* ;TEMPORARIES --USES FP BUFFER
@@ -201,31 +201,31 @@ T2=T1+1
201 201
 T3=T1+2
202 202
 T4=T1+3
203 203
 ;
204
-ARGEXP *=*+1
205
-ARGHO *=*+1
206
-ARGMOH *=*+1
207
-ARGMO *=*+1
208
-ARGLO *=*+1
209
-ARGSGN *=*+1
204
+ARGEXP	*=*+1
205
+ARGHO	*=*+1
206
+ARGMOH	*=*+1
207
+ARGMO	*=*+1
208
+ARGLO	*=*+1
209
+ARGSGN	*=*+1
210 210
 STRNG1
211
-ARISGN *=*+1 ;A SIGN REFLECTING THE RESULT
212
-FACOV *=*+1 ;OVERFLOW BYTE OF THE FAC
213
-*=*+1
211
+ARISGN	*=*+1           ;A SIGN REFLECTING THE RESULT
212
+FACOV	*=*+1           ;OVERFLOW BYTE OF THE FAC
213
+	*=*+1
214 214
 .SKI 4
215
-STRNG2 ;-> TO STR OR DESC
216
-POLYPT ;-> TO POLYNOMIAL COEFFICIENTS
217
-CURTOL ;ABSOLUTE LINEAR INDEX IS FORMED HERE
218
-FBUFPT *=*+PTRSIZ ;-> INTO FBUFFR USED BY FOUT
219
-TXTPTR *=*+PTRSIZ ;POINTER TO CURRENT TERM
220
-BUFFPT *=*+PTRSIZ ;^INPUT BUFFER
221
-;
222
-NOZE ;USING'S LEADING ZERO COUNTER
223
-PARSTS *=*+1 ;DOS STD PARSER WORD
224
-POINT ;USING'S POINTER TO DECIMAL POINT
225
-PARSTX *=*+1 ;DOS AUX PARSER WORD
226
-;
227
-SEEDPT *=*+2
228
-ERRNUM *=*+1
215
+STRNG2	;-> TO STR OR DESC
216
+POLYPT	;-> TO POLYNOMIAL COEFFICIENTS
217
+CURTOL	;ABSOLUTE LINEAR INDEX IS FORMED HERE
218
+FBUFPT	*=*+PTRSIZ      ;-> INTO FBUFFR USED BY FOUT
219
+TXTPTR	*=*+PTRSIZ      ;POINTER TO CURRENT TERM
220
+BUFFPT	*=*+PTRSIZ      ;^INPUT BUFFER
221
+;
222
+NOZE	;USING'S LEADING ZERO COUNTER
223
+PARSTS	*=*+1           ;DOS STD PARSER WORD
224
+POINT	;USING'S POINTER TO DECIMAL POINT
225
+PARSTX	*=*+1           ;DOS AUX PARSER WORD
226
+;
227
+SEEDPT	*=*+2
228
+ERRNUM	*=*+1
229 229
 .PAG
230 230
 ;       STRING AREA AVAILABLE FOR COPY.  THIS AREA IS USED
231 231
 ;       BY FOUT AS A BUFFER AND MUST HAVE DOSSPC CONTIGUOUS
@@ -235,113 +235,113 @@ ERRNUM *=*+1
235 235
 ;       USED BY THE DOS INTERFACE ROUTINES. NOTE, DECLARATION
236 236
 ;       ORDER OF LOCATIONS DOSOFL-DOSSA MUST BE PRESERVED.
237 237
 ;
238
-* =$200
238
+	* =$200
239 239
 FBUFFR
240
-VSPBUF ;BUFFER USED TO INTERFACE WITH VSP
241
- *=*+16 ;RESERVE 16 BYTES FOR FILENAME 1
242
-DOSF1L *=*+1 ;DOS FILE NAME 1 LENGTH
243
-DOSDS1 *=*+1 ;DOS DISK DRIVE 1
244
-DOSF1A *=*+2 ;DOS FILE NAME 1 ADDRESS
245
-DOSF1B *=*+1 ;DOS FILE NAME 1 BANK
246
-;
247
-DOSF2L *=*+1 ;DOS FILE NAME 2 LENGTH
248
-DOSDS2 *=*+1 ;DOS DISK DRIVE 2
249
-DOSF2A *=*+2 ;DOS FILE NAME 2 ADDRESS
250
-DOSF2B *=*+1 ;DOS FILE NAME 2 BANK
251
-;
252
-DOSBNK *=*+1 ;DOS BANK NUMBER
253
-DOSOFL *=*+2 ;DOS LOW OFFSET  (BSAVE,BLOAD)
254
-DOSOFH *=*+2 ;DOS HIGH OFFSET (BSAVE)
255
-;
256
-DOSLA *=*+1 ;DOS LOGICAL ADDRESS
257
-DOSFA *=*+1 ;DOS PHYSICAL ADDRESS
258
-DOSSA *=*+1 ;DOS SECONDARY ADDRESS
259
-DOSRCL *=*+1 ;DOS RECORD LENGTH
260
-;
261
-DOSDID *=*+2 ;DOS DISK IDENTIFIER (2 CHARS)
262
-DIDCHK *=*+1 ;DOS DID FLAG
263
-;
264
-DOSSTR *=*+1 ;DOS OUTPUT STRING BUFFER
240
+VSPBUF	;BUFFER USED TO INTERFACE WITH VSP
241
+	*=*+16          ;RESERVE 16 BYTES FOR FILENAME 1
242
+DOSF1L	*=*+1           ;DOS FILE NAME 1 LENGTH
243
+DOSDS1	*=*+1           ;DOS DISK DRIVE 1
244
+DOSF1A	*=*+2           ;DOS FILE NAME 1 ADDRESS
245
+DOSF1B	*=*+1           ;DOS FILE NAME 1 BANK
246
+;
247
+DOSF2L	*=*+1           ;DOS FILE NAME 2 LENGTH
248
+DOSDS2	*=*+1           ;DOS DISK DRIVE 2
249
+DOSF2A	*=*+2           ;DOS FILE NAME 2 ADDRESS
250
+DOSF2B	*=*+1           ;DOS FILE NAME 2 BANK
251
+;
252
+DOSBNK	*=*+1           ;DOS BANK NUMBER
253
+DOSOFL	*=*+2           ;DOS LOW OFFSET  (BSAVE,BLOAD)
254
+DOSOFH	*=*+2           ;DOS HIGH OFFSET (BSAVE)
255
+;
256
+DOSLA	*=*+1           ;DOS LOGICAL ADDRESS
257
+DOSFA	*=*+1           ;DOS PHYSICAL ADDRESS
258
+DOSSA	*=*+1           ;DOS SECONDARY ADDRESS
259
+DOSRCL	*=*+1           ;DOS RECORD LENGTH
260
+;
261
+DOSDID	*=*+2           ;DOS DISK IDENTIFIER (2 CHARS)
262
+DIDCHK	*=*+1           ;DOS DID FLAG
263
+;
264
+DOSSTR	*=*+1           ;DOS OUTPUT STRING BUFFER
265 265
 DOSSPC=*-FBUFFR ;SPACED USED BY DOS ROUTINES
266 266
 .SKI 4
267
-* =*+46
267
+	* =*+46
268 268
 ;
269 269
 ;
270
-TRMPOS ;CURSOR COLUMN ON CRT
271
-ANDMSK *=*+1 ;MASK USED BY WAIT
272
-EORMSK *=*+1 ;MASK USED BY WAIT
270
+TRMPOS	;CURSOR COLUMN ON CRT
271
+ANDMSK	*=*+1           ;MASK USED BY WAIT
272
+EORMSK	*=*+1           ;MASK USED BY WAIT
273 273
 ;
274
-DFBANK *=*+1 ;DEFAULT BANK NUMBER
275
-DOLU   *=*+1 ;DEFAULT OUTPUT LU (0=> NOT STD OUTPUT) KEEPS DS + DIR OK
274
+DFBANK	*=*+1           ;DEFAULT BANK NUMBER
275
+DOLU	*=*+1           ;DEFAULT OUTPUT LU (0=> NOT STD OUTPUT) KEEPS DS + DIR OK
276 276
 ;
277 277
 DOMASK
278
-TANSGN *=*+1 ;USED IN DETERMINING SIGN OF TAN
278
+TANSGN	*=*+1           ;USED IN DETERMINING SIGN OF TAN
279 279
 ;
280
-LDAABS *=*+1 ;LDA ABS ROUTINE (SEE INITAT)
281
-TTTEMP ;TEMPORARY STORE
282
-LDAADR *=*+2 ;MODIFIABLE ADDRESS
283
-*=*+1 ;RETURN OPCODE
280
+LDAABS	*=*+1           ;LDA ABS ROUTINE (SEE INITAT)
281
+TTTEMP	;TEMPORARY STORE
282
+LDAADR	*=*+2           ;MODIFIABLE ADDRESS
283
+	*=*+1           ;RETURN OPCODE
284 284
 .SKI 3
285 285
 ;
286 286
 ;DECLARATIONS FOR PRINT USING
287 287
 ;
288
-HULP *=*+1 ;COUNTER
289
-BNR *=*+1 ;POINTER TO BEGIN NO
290
-ENR *=*+1 ;POINTER TO END NO
291
-DOLR *=*+1 ;DOLLAR FLAG
292
-FLAG *=*+1 ;COMMA FLAG
293
-SWE *=*+1 ;COUNTER
294
-USGN *=*+1 ;SIGN EXPONENT
295
-UEXP *=*+1 ;POINTER TO EXPONENT
296
-VN *=*+1 ;# DIGITS BEFORE DECIMAL POINT
297
-CHSN *=*+1 ;JUSTIFY FLAG
298
-VF *=*+1 ;# POS BEFORE DEC POINT (FIELD)
299
-NF *=*+1 ;# POS AFTER DEC POINT (FIELD)
300
-POSP *=*+1 ;+/- FLAG (FIELD)
301
-FESP *=*+1 ;EXPONENT FLAG (FIELD)
302
-ETOF *=*+1 ;SWITCH
303
-CFORM *=*+1 ;CHAR COUNTER (FIELD)
304
-SNO *=*+1 ;SIGN NO
305
-BLFD *=*+1 ;BLANK/STAR FLAG
306
-BEGFD *=*+1 ;POINTER TO BEGIN OF FIELD
307
-LFOR *=*+1 ;LENGTH OF FOR]AT
308
-ENDFD *=*+1 ;POINTER TO END OF FIELD
288
+HULP	*=*+1           ;COUNTER
289
+BNR	*=*+1           ;POINTER TO BEGIN NO
290
+ENR	*=*+1           ;POINTER TO END NO
291
+DOLR	*=*+1           ;DOLLAR FLAG
292
+FLAG	*=*+1           ;COMMA FLAG
293
+SWE	*=*+1           ;COUNTER
294
+USGN	*=*+1           ;SIGN EXPONENT
295
+UEXP	*=*+1           ;POINTER TO EXPONENT
296
+VN	*=*+1           ;# DIGITS BEFORE DECIMAL POINT
297
+CHSN	*=*+1           ;JUSTIFY FLAG
298
+VF	*=*+1           ;# POS BEFORE DEC POINT (FIELD)
299
+NF	*=*+1           ;# POS AFTER DEC POINT (FIELD)
300
+POSP	*=*+1           ;+/- FLAG (FIELD)
301
+FESP	*=*+1           ;EXPONENT FLAG (FIELD)
302
+ETOF	*=*+1           ;SWITCH
303
+CFORM	*=*+1           ;CHAR COUNTER (FIELD)
304
+SNO	*=*+1           ;SIGN NO
305
+BLFD	*=*+1           ;BLANK/STAR FLAG
306
+BEGFD	*=*+1           ;POINTER TO BEGIN OF FIELD
307
+LFOR	*=*+1           ;LENGTH OF FOR]AT
308
+ENDFD	*=*+1           ;POINTER TO END OF FIELD
309 309
 PUCHRS
310
-PUFILL *=*+1 ;PRINT USING FILL SYMBOL
311
-PUCOMA *=*+1 ;PRINT USING COMMA SYMBOL
312
-PUDOT *=*+1 ;PRINT USING DECIMAL POINT SYMBOL
313
-PUMONY *=*+1 ;PRINT USING MONETARY SYMBOL
314
-*=$280
310
+PUFILL	*=*+1           ;PRINT USING FILL SYMBOL
311
+PUCOMA	*=*+1           ;PRINT USING COMMA SYMBOL
312
+PUDOT	*=*+1           ;PRINT USING DECIMAL POINT SYMBOL
313
+PUMONY	*=*+1           ;PRINT USING MONETARY SYMBOL
314
+	*=$280
315 315
 ;          BASIC INDIRECTS
316 316
 ;
317
-IERROR *=*+2 ;ERROR ROUTINE, OUTPUT ERR IN .X
318
-IMAIN *=*+2 ;INTERPRETER MAIN LOOP
319
-ICRNCH *=*+2 ;TOKENIZATION ROUTINE
320
-IQPLOP *=*+2 ;TOKEN OUTPUT EXPANDER ROUTINE
321
-IGONE *=*+2 ;DISPATCHER
322
-IEVAL *=*+2 ;EVAL ROUTINE
323
-IFRMEV *=*+2 ;FRMEVL ROUTINE
324
-ICHRGO *=*+2 ;CHRGOT ROUTINE
325
-ICHRGE *=*+2 ;CHRGET ROUTINE
326
-ADRAY1 *=*+2 ;CONVERT FLOAT -> INTEGER
327
-ADRAY2 *=*+2 ;CONVERT INTEGER -> FLOAT
317
+IERROR	*=*+2           ;ERROR ROUTINE, OUTPUT ERR IN .X
318
+IMAIN	*=*+2           ;INTERPRETER MAIN LOOP
319
+ICRNCH	*=*+2           ;TOKENIZATION ROUTINE
320
+IQPLOP	*=*+2           ;TOKEN OUTPUT EXPANDER ROUTINE
321
+IGONE	*=*+2           ;DISPATCHER
322
+IEVAL	*=*+2           ;EVAL ROUTINE
323
+IFRMEV	*=*+2           ;FRMEVL ROUTINE
324
+ICHRGO	*=*+2           ;CHRGOT ROUTINE
325
+ICHRGE	*=*+2           ;CHRGET ROUTINE
326
+ADRAY1	*=*+2           ;CONVERT FLOAT -> INTEGER
327
+ADRAY2	*=*+2           ;CONVERT INTEGER -> FLOAT
328 328
 .SKI 2
329 329
 ;          ERROR TRAPPING DECLARATIONS
330 330
 ;
331
-TRAPNO *=*+2 ;ERROR TRAP VECTOR
332
-ERRLIN *=*+2 ;HOLDS LINE # OF LAST ERROR
333
-ERRTXT *=*+2 ;TEXT POINTER AT TIME OF ERROR
334
-OLDSTK *=*+1 ;STACK POINTER BEFORE EXECUTION OF LAST INSTRUCTION
335
-TMPTRP *=*+1 ;USED TO SAVE HI BYTE OF TRAP LINE >TRAP & <RESUME
336
-DSPTMP *=*+1 ;TEMPORARY FOR DISPOSE
337
-OLDTOK *=*+1 ;    "      "     "
338
-TMPDES *=*+6 ;TEMPORARY FOR INSTR$
339
-;
340
-HIGHST *=*+2 ;MAX OFFSET FOR ANY USER BANK
341
- ;
342
- ;
343
-MSIISM *=*+1 ;USED TO SAVE LENGTH OF STRING TO BE ADDED IN GARB COLLECT
344
- NEWSYS= $FF6C
345
- ;
331
+TRAPNO	*=*+2           ;ERROR TRAP VECTOR
332
+ERRLIN	*=*+2           ;HOLDS LINE # OF LAST ERROR
333
+ERRTXT	*=*+2           ;TEXT POINTER AT TIME OF ERROR
334
+OLDSTK	*=*+1           ;STACK POINTER BEFORE EXECUTION OF LAST INSTRUCTION
335
+TMPTRP	*=*+1           ;USED TO SAVE HI BYTE OF TRAP LINE >TRAP & <RESUME
336
+DSPTMP	*=*+1           ;TEMPORARY FOR DISPOSE
337
+OLDTOK	*=*+1           ;    "      "     "
338
+TMPDES	*=*+6           ;TEMPORARY FOR INSTR$
339
+;
340
+HIGHST	*=*+2           ;MAX OFFSET FOR ANY USER BANK
341
+;
342
+;
343
+MSIISM	*=*+1           ;USED TO SAVE LENGTH OF STRING TO BE ADDED IN GARB COLLECT
344
+NEWSYS= $FF6C
345
+;
346 346
 .SKI 4
347 347
 .END

+ 382
- 382
BASIC_CBM2_A/butes1 View File

@@ -1,91 +1,91 @@
1 1
 .PAGE    'BASIC UTILITY ROUTINES'
2
-STXTPT LDA #TXTBNK
3
- STA TXTPTR+2
4
- CLC
5
- LDA TXTTAB
6
- ADC #255
7
- STA TXTPTR
8
- LDA TXTTAB+1
9
- ADC #255
10
- STA TXTPTR+1
11
- RTS
12
- .SKIP 4
13
-GETNUM JSR     GETPIN ;GET POSITIVE INTEGER
14
-COMBYT JSR     CHKCOM
15
- JMP     GETBYT
16
-;
17
-GTBYTC JSR     CHRGET
18
-GETBYT JSR     FRMNUM
19
-CONINT JSR     POSINT
20
- LDX     FACMO
21
- BNE     FCER1
22
- LDX     FACLO
23
- JMP     CHRGOT
24
- .SKIP 4
25
-GETPIN JSR     FRMNUM ;EVALUATE THE FORMULA
26
-GETADR LDA     FACSGN
27
- BMI     FCER1
28
- LDA     FACEXP
29
- CMP     #145
30
- BCS     FCER1
31
- JSR     QINT
32
- LDA     FACMO
33
- LDY     FACMO+1
34
- STY     POKER
35
- STA     POKER+1
36
- RTS
37
-;
38
-BJMPS   ;REFERENCED IN INITIALIZATION ROUTINE
39
-FCER1 JMP     FCERR
40
- .SKIP 4
2
+STXTPT	LDA #TXTBNK
3
+	STA TXTPTR+2
4
+	CLC
5
+	LDA TXTTAB
6
+	ADC #255
7
+	STA TXTPTR
8
+	LDA TXTTAB+1
9
+	ADC #255
10
+	STA TXTPTR+1
11
+	RTS
12
+.SKIP 4
13
+GETNUM	JSR     GETPIN  ;GET POSITIVE INTEGER
14
+COMBYT	JSR     CHKCOM
15
+	JMP     GETBYT
16
+;
17
+GTBYTC	JSR     CHRGET
18
+GETBYT	JSR     FRMNUM
19
+CONINT	JSR     POSINT
20
+	LDX     FACMO
21
+	BNE     FCER1
22
+	LDX     FACLO
23
+	JMP     CHRGOT
24
+.SKIP 4
25
+GETPIN	JSR     FRMNUM  ;EVALUATE THE FORMULA
26
+GETADR	LDA     FACSGN
27
+	BMI     FCER1
28
+	LDA     FACEXP
29
+	CMP     #145
30
+	BCS     FCER1
31
+	JSR     QINT
32
+	LDA     FACMO
33
+	LDY     FACMO+1
34
+	STY     POKER
35
+	STA     POKER+1
36
+	RTS
37
+;
38
+BJMPS	;REFERENCED IN INITIALIZATION ROUTINE
39
+FCER1	JMP     FCERR
40
+.SKIP 4
41 41
 ;       THESE ROUTINES CHECK FOR CERTAIN 'VALTYP'
42 42
 ;       (C) IS NOT PRESERVED.
43
-FRMNUM JSR     FRMEVL
44
-CHKNUM CLC
45
- .BYTE      $24
46
-CHKSTR SEC
47
-CHKVAL BIT     VALTYP
48
- BMI     DOCSTR
49
- BCS     CHKERR
50
-CHKOK RTS
51
-;
52
-DOCSTR BCS     CHKOK
53
-CHKERR LDX     #ERRTM
54
- JMP     ERROR
55
- .SKIP 4
43
+FRMNUM	JSR     FRMEVL
44
+CHKNUM	CLC
45
+	.BYTE      $24
46
+CHKSTR	SEC
47
+CHKVAL	BIT     VALTYP
48
+	BMI     DOCSTR
49
+	BCS     CHKERR
50
+CHKOK	RTS
51
+;
52
+DOCSTR	BCS     CHKOK
53
+CHKERR	LDX     #ERRTM
54
+	JMP     ERROR
55
+.SKIP 4
56 56
 ;
57 57
 ;       PRINT THE STR WHOSE DESCRIPTOR IS -> BY FACMO
58 58
 STRPRT
59
- JSR     FREFAC ;RETURN TEMP ->
60
- TAX ;PUT COUNT INTO COUNTER
61
- LDY     #0
62
- INX
63
- JSR     MAPINX
59
+	JSR     FREFAC  ;RETURN TEMP ->
60
+	TAX             ;PUT COUNT INTO COUNTER
61
+	LDY     #0
62
+	INX
63
+	JSR     MAPINX
64 64
 ;
65 65
 ;       OUTPUT X CHARACTERS TO DEVICE
66
-STRP2 DEX
67
- BEQ     STRP3
68
- LDA (INDEX)Y
69
- JSR     OCHR ;OUTPUT ONE CHAR
70
- INY
71
- JMP     STRP2 ;NEXT
72
-STRP3 JMP     MAPTXT
66
+STRP2	DEX
67
+	BEQ     STRP3
68
+	LDA (INDEX)Y
69
+	JSR     OCHR    ;OUTPUT ONE CHAR
70
+	INY
71
+	JMP     STRP2   ;NEXT
72
+STRP3	JMP     MAPTXT
73 73
 ;
74 74
 ;       OUTPUT SPACE
75 75
 OSPC
76
- LDA     CHANNL
77
- BEQ     CRTSKP
78
- LDA     #' '
79
- .BYTE $2C ;EAT NEXT TWO BYTES
80
-CRTSKP LDA     #29
81
- .BYTE $2C ;EAT NEXT TWO BYTES
82
-OUTQST LDA     #'?'
76
+	LDA     CHANNL
77
+	BEQ     CRTSKP
78
+	LDA     #' '
79
+	.BYTE $2C       ;EAT NEXT TWO BYTES
80
+CRTSKP	LDA     #29
81
+	.BYTE $2C       ;EAT NEXT TWO BYTES
82
+OUTQST	LDA     #'?'
83 83
 ;
84 84
 ;       OUTPUT ONE CHARACTER TO DEVICE
85
-OCHR JSR     BSOUT ;OUTPUT CHARACTER
86
- AND     #$FF
87
- RTS
88
- .PAGE   'DOS UTILITY ROUTINES.'
85
+OCHR	JSR     BSOUT   ;OUTPUT CHARACTER
86
+	AND     #$FF
87
+	RTS
88
+.PAGE   'DOS UTILITY ROUTINES.'
89 89
 ;              -MGM 7/23/79-
90 90
 ;
91 91
 ;       THIS IS THE DOS PARSER ROUTINE WHICH LOOKS AT LINES
@@ -176,369 +176,369 @@ OCHR JSR     BSOUT ;OUTPUT CHARACTER
176 176
 ;          "1" BITS ARE REQUIRED TO BE SET.
177 177
 ;          "*" BITS ARE OPTIONAL PARAMETERS.
178 178
 .SKIP 2
179
-DOSTBL .BYTE $FF,$FF,$FF,$FF,DOSLFN,DOSDSK,$6F
179
+DOSTBL	.BYTE $FF,$FF,$FF,$FF,DOSLFN,DOSDSK,$6F
180 180
 .SKIP 2
181 181
 DOSPAR
182
- LDA     #0
183
-;
184
-DOSPRS ;SPECIAL ERROR FLAG ENTRY
185
- LDX    #$FF ;NO AUX OPTIONS!
186
-DOSPRX ;SPEC AUX ERROR FLAG ENTRY
187
- PHA ;SAVE ERROR FLAGS
188
- TXA
189
- PHA
190
- LDA     #0
191
- STA     PARSTS
192
- STA     PARSTX
182
+	LDA     #0
183
+;
184
+DOSPRS	;SPECIAL ERROR FLAG ENTRY
185
+	LDX    #$FF     ;NO AUX OPTIONS!
186
+DOSPRX	;SPEC AUX ERROR FLAG ENTRY
187
+	PHA             ;SAVE ERROR FLAGS
188
+	TXA
189
+	PHA
190
+	LDA     #0
191
+	STA     PARSTS
192
+	STA     PARSTX
193 193
 .SKI 1
194
- LDX     #DOSSPC-1 ;CLEAR DOS SCRATCH AREA
195
-DOS01 STA     FBUFFR,X
196
- DEX
197
- BNE     DOS01
198
- LDX     #DOSSA-DOSOFL ;SET SOME DEFAULTS FROM TABLE
199
-DOS02 LDA     DOSTBL,X
200
- STA     DOSOFL,X
201
- DEX
202
- BPL     DOS02
203
- LDX     DFBANK
204
- STX     DOSBNK
205
-;
206
- JSR     CHRGOT ;GET CURRENT CHR
207
- BNE     PARSE1 ;IF NOT END OF STATEMENT
194
+	LDX     #DOSSPC-1 ;CLEAR DOS SCRATCH AREA
195
+DOS01	STA     FBUFFR,X
196
+	DEX
197
+	BNE     DOS01
198
+	LDX     #DOSSA-DOSOFL ;SET SOME DEFAULTS FROM TABLE
199
+DOS02	LDA     DOSTBL,X
200
+	STA     DOSOFL,X
201
+	DEX
202
+	BPL     DOS02
203
+	LDX     DFBANK
204
+	STX     DOSBNK
205
+;
206
+	JSR     CHRGOT  ;GET CURRENT CHR
207
+	BNE     PARSE1  ;IF NOT END OF STATEMENT
208 208
 ;
209 209
 DONE
210
- PLA ;GET AUX ERROR FLAG
211
- AND     PARSTX ; REPEATED,ILLEGAL PARAMS?
212
- BNE     DN20
213
- PLA ;GET ERROR FLAGS
214
- JSR     PRMRPT
215
- LDA     PARSTS
216
- LDX    PARSTX
217
- RTS
218
-;
219
-PARSE1 CMP     #'#'
220
- BEQ     LOGADR ;IF LOGICAL FILE NUMBER
221
- CMP     #'W'
222
- BEQ     RECLEN ;IF RECORD LENGTH
223
- CMP     #'L'
224
- BEQ     RECLEN ;IF RECORD LENGTH
225
- CMP     #'R'
226
- BNE     DOS5 ;IF NOT ????
227
- JSR     CHRGET ;MOVE ON
228
- JMP     DELIM1
229
-;
230
-ON1 JSR     ON
231
-SAV60  JMP     DEL1
232
-;
233
-UNIT1 JSR     UNIT ;DO UNIT# PARSING
234
- BNE     SAV60     ;ALWAYS
235
-;
236
-BANK1 JSR     BANK
237
- BEQ     SAV60     ;ALWAYS
210
+	PLA             ;GET AUX ERROR FLAG
211
+	AND     PARSTX  ; REPEATED,ILLEGAL PARAMS?
212
+	BNE     DN20
213
+	PLA             ;GET ERROR FLAGS
214
+	JSR     PRMRPT
215
+	LDA     PARSTS
216
+	LDX    PARSTX
217
+	RTS
218
+;
219
+PARSE1	CMP     #'#'
220
+	BEQ     LOGADR  ;IF LOGICAL FILE NUMBER
221
+	CMP     #'W'
222
+	BEQ     RECLEN  ;IF RECORD LENGTH
223
+	CMP     #'L'
224
+	BEQ     RECLEN  ;IF RECORD LENGTH
225
+	CMP     #'R'
226
+	BNE     DOS5    ;IF NOT ????
227
+	JSR     CHRGET  ;MOVE ON
228
+	JMP     DELIM1
229
+;
230
+ON1	JSR     ON
231
+SAV60	JMP     DEL1
232
+;
233
+UNIT1	JSR     UNIT    ;DO UNIT# PARSING
234
+	BNE     SAV60     ;ALWAYS
235
+;
236
+BANK1	JSR     BANK
237
+	BEQ     SAV60     ;ALWAYS
238
+.SKIP 4
239
+DOS5	CMP     #'D'
240
+	BEQ     DRV1
241
+	CMP     #TKON   ;"ON" TOKEN
242
+	BEQ     ON1
243
+	CMP     #'B'
244
+	BEQ     BANK1
245
+	CMP     #'U'
246
+	BEQ     UNIT1
247
+	CMP     #'P'
248
+	BEQ     DOFFL
249
+	CMP     #'I'
250
+	BNE     DOS10   ;IF NOT IDENTIFIER
251
+	BEQ     IDENT
252
+;
238 253
 .SKIP 4
239
-DOS5 CMP     #'D'
240
- BEQ     DRV1
241
- CMP     #TKON ;"ON" TOKEN
242
- BEQ     ON1
243
- CMP     #'B'
244
- BEQ     BANK1
245
- CMP     #'U'
246
- BEQ     UNIT1
247
- CMP     #'P'
248
- BEQ     DOFFL
249
- CMP     #'I'
250
- BNE     DOS10 ;IF NOT IDENTIFIER
251
- BEQ     IDENT
252
-;
253
- .SKIP 4
254 254
 LOGADR
255
- LDA     #4
256
- JSR     PRMRPT ;CHECK FOR REPEATED PARAMETER
257
- JSR     GETVAL
258
- CPX     #0
259
- BEQ     QTYER2 ;IF ILLEGAL VALUE
260
- STX     DOSLA
261
- LDA     #4 ;SET LOGICAL ADDRESS FLAG
262
- BNE     SAV60 ;GET NEXT PARAMETER
263
-DN20 JMP     SNERR
264
- .SKIP 4
255
+	LDA     #4
256
+	JSR     PRMRPT  ;CHECK FOR REPEATED PARAMETER
257
+	JSR     GETVAL
258
+	CPX     #0
259
+	BEQ     QTYER2  ;IF ILLEGAL VALUE
260
+	STX     DOSLA
261
+	LDA     #4      ;SET LOGICAL ADDRESS FLAG
262
+	BNE     SAV60   ;GET NEXT PARAMETER
263
+DN20	JMP     SNERR
264
+.SKIP 4
265 265
 RECLEN
266
- TAX ;SAVE CHAR
267
- LDA     #$40
268
- JSR     PRMRPT ;CHECK FOR REPEATED PARAMETER
269
- CPX     #'W'
270
- BNE     RECOO
271
- JSR     CHRGET
272
- JMP     RECON ;SET PARSTS
273
-RECOO JSR     GETVAL
274
- CPX     #0
275
- BEQ     QTYER2 ;ZERO ILLEGAL DOSRCL
276
- CPX     #255
277
- BEQ     QTYER2 ;ILLEGAL DOSRCL
278
- STX     DOSRCL ;STORE PARCEL
266
+	TAX             ;SAVE CHAR
267
+	LDA     #$40
268
+	JSR     PRMRPT  ;CHECK FOR REPEATED PARAMETER
269
+	CPX     #'W'
270
+	BNE     RECOO
271
+	JSR     CHRGET
272
+	JMP     RECON   ;SET PARSTS
273
+RECOO	JSR     GETVAL
274
+	CPX     #0
275
+	BEQ     QTYER2  ;ZERO ILLEGAL DOSRCL
276
+	CPX     #255
277
+	BEQ     QTYER2  ;ILLEGAL DOSRCL
278
+	STX     DOSRCL  ;STORE PARCEL
279 279
 ;
280 280
 RECON
281
- LDA     #$40 ;SET DOSRCL FLAG &
282
- BNE     TACKY1
281
+	LDA     #$40    ;SET DOSRCL FLAG &
282
+	BNE     TACKY1
283 283
 ;
284
-DOS10 CMP     #'"'
285
- BEQ     NAME1
286
- CMP     #'('
287
- BEQ     NAME1
288
- BNE     DN20
284
+DOS10	CMP     #'"'
285
+	BEQ     NAME1
286
+	CMP     #'('
287
+	BEQ     NAME1
288
+	BNE     DN20
289 289
 ;
290 290
 .SKIP 4
291 291
 DRV1
292
- LDA     #$10
293
- JSR     PRMRPT ;CHECK FOR REPEATED PARAMETER
294
- JSR     GETVAL
295
- CPX     #2
296
- BCS     QTYER2 ;ILLEGAL DRV# IF >1
297
- STX     DOSDS1
298
- STX     DOSDS2
299
- LDA     #$10
300
-TACKY1 BNE     DEL1
301
-;
302
-QTYER2 JMP     QTYERR
303
- .SKIP 4
304
-IDENT LDA     DIDCHK
305
- BEQ     IDCON ;ONLY 1 DOSDID ALLOWED
306
- BNE     DN20
307
-;
308
-DOFFL LDA     #$02 ;CHK AUX STATUS
309
- JSR     PRXRPT
310
- JSR     GETOFF ;GET OFFSET VALUE
311
- STY     DOSOFL
312
- STA     DOSOFL+1
313
- LDA     #$02
314
-DLIMX1 ORA PARSTX ;SET AUX STATUS BITS
315
- STA     PARSTX
316
- BNE     DELIM1 ;TRY FOR NXT PARAM
317
-;
318
-DOFFH LDA     #$04
319
- JSR     PRXRPT
320
- JSR     GETOFF
321
- STY     DOSOFH
322
- STA     DOSOFH+1
323
- LDA     #$04
324
- BNE     DLIMX1 ;SET AUX STATUS
292
+	LDA     #$10
293
+	JSR     PRMRPT  ;CHECK FOR REPEATED PARAMETER
294
+	JSR     GETVAL
295
+	CPX     #2
296
+	BCS     QTYER2  ;ILLEGAL DRV# IF >1
297
+	STX     DOSDS1
298
+	STX     DOSDS2
299
+	LDA     #$10
300
+TACKY1	BNE     DEL1
301
+;
302
+QTYER2	JMP     QTYERR
303
+.SKIP 4
304
+IDENT	LDA     DIDCHK
305
+	BEQ     IDCON   ;ONLY 1 DOSDID ALLOWED
306
+	BNE     DN20
307
+;
308
+DOFFL	LDA     #$02    ;CHK AUX STATUS
309
+	JSR     PRXRPT
310
+	JSR     GETOFF  ;GET OFFSET VALUE
311
+	STY     DOSOFL
312
+	STA     DOSOFL+1
313
+	LDA     #$02
314
+DLIMX1	ORA PARSTX      ;SET AUX STATUS BITS
315
+	STA     PARSTX
316
+	BNE     DELIM1  ;TRY FOR NXT PARAM
317
+;
318
+DOFFH	LDA     #$04
319
+	JSR     PRXRPT
320
+	JSR     GETOFF
321
+	STY     DOSOFH
322
+	STA     DOSOFH+1
323
+	LDA     #$04
324
+	BNE     DLIMX1  ;SET AUX STATUS
325 325
 ;
326 326
 IDCON
327
- JSR     CHRGET ;GET NEXT CHARACTER
328
- STA     DOSDID ;M(TXTPTR => DOSDID
329
- JSR     CHRGET
330
- STA     DOSDID+1
331
- LDA     #$FF
332
- STA     DIDCHK ;SET DOSDID FLAG &
333
- JSR     CHRGET ;CONTINUE
334
- JMP     DELIM1
335
- .SKIP 4
327
+	JSR     CHRGET  ;GET NEXT CHARACTER
328
+	STA     DOSDID  ;M(TXTPTR => DOSDID
329
+	JSR     CHRGET
330
+	STA     DOSDID+1
331
+	LDA     #$FF
332
+	STA     DIDCHK  ;SET DOSDID FLAG &
333
+	JSR     CHRGET  ;CONTINUE
334
+	JMP     DELIM1
335
+.SKIP 4
336 336
 NAME1
337
- LDA     #1 ;NAME1 ALLWD ONLY ONCE
338
- JSR     NEWNAM ;DO NAME PARSING
339
- STA     DOSF1L
340
- STA     XCNT ;SAVE TEMP VALUE
341
- LDA     #<FBUFFR
342
- STA     DOSF1A
343
- LDA     #>FBUFFR
344
- STA     DOSF1A+1
345
- LDA     #SYSBNK ; SET TO SYSTEM BANK
346
- STA     DOSF1B
347
-;
348
- LDY     #0
349
- JSR     MAPINX
350
-LOOP6 LDA (INDEX)Y
351
- STA     FBUFFR,Y ; SET CHAR IN BUFFER
352
- INY
353
- CPY     XCNT
354
- BCC     LOOP6 ;IF NOT FULL NAME
355
- JSR     MAPTXT
356
- LDA     #1 ;SET NAME1 FLAG
337
+	LDA     #1      ;NAME1 ALLWD ONLY ONCE
338
+	JSR     NEWNAM  ;DO NAME PARSING
339
+	STA     DOSF1L
340
+	STA     XCNT    ;SAVE TEMP VALUE
341
+	LDA     #<FBUFFR
342
+	STA     DOSF1A
343
+	LDA     #>FBUFFR
344
+	STA     DOSF1A+1
345
+	LDA     #SYSBNK ; SET TO SYSTEM BANK
346
+	STA     DOSF1B
347
+;
348
+	LDY     #0
349
+	JSR     MAPINX
350
+LOOP6	LDA (INDEX)Y
351
+	STA     FBUFFR,Y ; SET CHAR IN BUFFER
352
+	INY
353
+	CPY     XCNT
354
+	BCC     LOOP6   ;IF NOT FULL NAME
355
+	JSR     MAPTXT
356
+	LDA     #1      ;SET NAME1 FLAG
357 357
 ;
358 358
 DEL1
359
- ORA     PARSTS
360
- STA     PARSTS
359
+	ORA     PARSTS
360
+	STA     PARSTS
361 361
 ;
362 362
 DELIM1
363
- JSR     CHRGOT
364
- BNE     NXXX
365
-DONE1 JMP     DONE ;<CR>/<>  => DONE
363
+	JSR     CHRGOT
364
+	BNE     NXXX
365
+DONE1	JMP     DONE    ;<CR>/<>  => DONE
366 366
 ;
367
-NEXT6 CMP     #TKON
368
- BNE     NEXT6A
369
- JMP     ON1
370
-NEXT6A CMP     #TKTO ;"TO" TOKEN
371
- BEQ     NEXT6B
372
- BNE     SAV61 ;SNTAX ERROR
367
+NEXT6	CMP     #TKON
368
+	BNE     NEXT6A
369
+	JMP     ON1
370
+NEXT6A	CMP     #TKTO   ;"TO" TOKEN
371
+	BEQ     NEXT6B
372
+	BNE     SAV61   ;SNTAX ERROR
373 373
 ;
374 374
 ;   IF "TO" IS NOT FOLLOWED BY AN OFFSET PARAM,
375 375
 ;   THEN DO FILE2 PARAMS. OTHERWISE, DO HIGH
376 376
 ;   OFFSET AND CONTINUE WITH FILE0 OPTIONS.
377
-NEXT6B JSR     CHRGET
378
- CMP     #'P'
379
- BNE     PARS22
380
- BEQ     DOFFH
381
-;
382
-NXXX CMP     #','
383
- BNE     NEXT6
384
- JSR     CHRGET
385
- JMP     PARSE1
386
-;
387
-PARSE2 JSR     CHRGET
388
-PARS22 CMP     #'D'
389
- BEQ     DRV2
390
- CMP     #TKON ;"ON" TOKEN
391
- BEQ     ON2
392
- CMP     #'U'
393
- BEQ     UNIT2
394
- CMP     #'"'
395
- BEQ     NAME2
396
- CMP     #'('
397
- BEQ     NAME2
377
+NEXT6B	JSR     CHRGET
378
+	CMP     #'P'
379
+	BNE     PARS22
380
+	BEQ     DOFFH
381
+;
382
+NXXX	CMP     #','
383
+	BNE     NEXT6
384
+	JSR     CHRGET
385
+	JMP     PARSE1
386
+;
387
+PARSE2	JSR     CHRGET
388
+PARS22	CMP     #'D'
389
+	BEQ     DRV2
390
+	CMP     #TKON   ;"ON" TOKEN
391
+	BEQ     ON2
392
+	CMP     #'U'
393
+	BEQ     UNIT2
394
+	CMP     #'"'
395
+	BEQ     NAME2
396
+	CMP     #'('
397
+	BEQ     NAME2
398 398
 ;
399 399
 DRV2
400
- LDA     #$20
401
- JSR     PRMRPT ;CHECK FOR REPEATED PARAMETER
402
- JSR     GETVAL
403
- CPX     #2
404
- BCS     QTYERR ;ILLEGAL DRIVE #
405
- STX     DOSDS2
406
- LDA     #$20
407
- BNE     DEL2
400
+	LDA     #$20
401
+	JSR     PRMRPT  ;CHECK FOR REPEATED PARAMETER
402
+	JSR     GETVAL
403
+	CPX     #2
404
+	BCS     QTYERR  ;ILLEGAL DRIVE #
405
+	STX     DOSDS2
406
+	LDA     #$20
407
+	BNE     DEL2
408 408
 ;
409
-ON2 JSR     ON
410
- JMP     DEL2
409
+ON2	JSR     ON
410
+	JMP     DEL2
411 411
 ;
412
-UNIT2 JSR     UNIT ;DO UNIT# PARSING
413
- BNE     DEL2   ;ALWAYS
412
+UNIT2	JSR     UNIT    ;DO UNIT# PARSING
413
+	BNE     DEL2    ;ALWAYS
414 414
 ;
415 415
 NAME2
416
- LDA     #2 ;NAME2 ALLOWED ONLY ONCE
417
- JSR     NEWNAM
418
- STA     DOSF2L
419
- STX     DOSF2A
420
- STY     DOSF2A+1
421
- LDA     INDEX1+2 ; GET STRNG BANK#
422
- STA     DOSF2B
423
- LDA     #2 ;SET FILENAME2 FLAG &
416
+	LDA     #2      ;NAME2 ALLOWED ONLY ONCE
417
+	JSR     NEWNAM
418
+	STA     DOSF2L
419
+	STX     DOSF2A
420
+	STY     DOSF2A+1
421
+	LDA     INDEX1+2 ; GET STRNG BANK#
422
+	STA     DOSF2B
423
+	LDA     #2      ;SET FILENAME2 FLAG &
424 424
 ;
425 425
 DEL2
426
- ORA     PARSTS ;SET FLAG IN STATUS
427
- STA     PARSTS
428
- JSR     CHRGOT
429
- BEQ     DONE1 ;DONE ON <CR>/<>
430
- CMP     #','
431
- BEQ     PARSE2
432
- CMP     #TKON ;"ON" TOKEN
433
- BEQ     ON2
434
- CMP     #'U'
435
- BEQ     UNIT2
426
+	ORA     PARSTS  ;SET FLAG IN STATUS
427
+	STA     PARSTS
428
+	JSR     CHRGOT
429
+	BEQ     DONE1   ;DONE ON <CR>/<>
430
+	CMP     #','
431
+	BEQ     PARSE2
432
+	CMP     #TKON   ;"ON" TOKEN
433
+	BEQ     ON2
434
+	CMP     #'U'
435
+	BEQ     UNIT2
436 436
 SAV61
437
- BNE     SNER
438
- .SKIP 4
437
+	BNE     SNER
438
+.SKIP 4
439 439
 QTYERR
440
- JMP     FCERR ;"ILLEGAL QUANTITY"
440
+	JMP     FCERR   ;"ILLEGAL QUANTITY"
441 441
 ;
442
-ON JSR     CHRGET
443
- CMP     #'U'
444
- BEQ     UNIT ;IF CHARACTER IS A "U"
445
- CMP     #'B'
446
- BEQ     BANK
447
- BNE     SNER
442
+ON	JSR     CHRGET
443
+	CMP     #'U'
444
+	BEQ     UNIT    ;IF CHARACTER IS A "U"
445
+	CMP     #'B'
446
+	BEQ     BANK
447
+	BNE     SNER
448 448
 ;
449 449
 UNIT
450
- JSR     GETVAL
451
- CPX     #32
452
- BCS     QTYERR ;ERROR IF >31
453
- CPX     #3
454
- BCC     QTYERR ;ERROR IF <3
455
- STX     DOSFA
456
- LDA     #8
457
- RTS
450
+	JSR     GETVAL
451
+	CPX     #32
452
+	BCS     QTYERR  ;ERROR IF >31
453
+	CPX     #3
454
+	BCC     QTYERR  ;ERROR IF <3
455
+	STX     DOSFA
456
+	LDA     #8
457
+	RTS
458 458
 ;
459 459
 BANK
460
- LDA     #$01 ;REPEATED PARAM?
461
- JSR     PRXRPT
462
- JSR     GETVAL
463
- CPX     #MXBANK ;BANK TOO LARGE?
464
- BCS     QTYERR
465
- STX     DOSBNK
466
- LDA     #$01
467
- ORA     PARSTX ;SET BNK BIT IN AUX STATUS
468
- STA     PARSTX
469
- LDA     #0 ; .A=STD STATUS WRD, NO BITS TO SET
470
- RTS
471
-;
472
-SNER JMP     SNERR ;JUMP SYSTAN ERROR
460
+	LDA     #$01    ;REPEATED PARAM?
461
+	JSR     PRXRPT
462
+	JSR     GETVAL
463
+	CPX     #MXBANK ;BANK TOO LARGE?
464
+	BCS     QTYERR
465
+	STX     DOSBNK
466
+	LDA     #$01
467
+	ORA     PARSTX  ;SET BNK BIT IN AUX STATUS
468
+	STA     PARSTX
469
+	LDA     #0      ; .A=STD STATUS WRD, NO BITS TO SET
470
+	RTS
471
+;
472
+SNER	JMP     SNERR   ;JUMP SYSTAN ERROR
473 473
 ;
474 474
 NEWNAM
475
- JSR     PRMRPT ;CHECK FOR REPEATED PARAMETER
476
- JSR     SAV13
477
- TAX ;SAVE LENGTH OF STRING
478
- BEQ     QTYERR ;IF LENGTH = 0
479
- LDY     #0
480
- JSR     SAV12
481
- CMP     #'@'
482
- BNE     LENCHK
483
- LDA     #$80
484
- JSR     PRMRPT
485
- LDA     PARSTS
486
- ORA     #$80 ;SET "@" FLAG
487
- STA     PARSTS
488
- DEX ;DECREMENT LENGTH
489
- INC     INDEX1 ;INCREMENT PAST "@"
490
- BNE     LENCHK ;IF NO CARRY
491
- INC     INDEX1+1
475
+	JSR     PRMRPT  ;CHECK FOR REPEATED PARAMETER
476
+	JSR     SAV13
477
+	TAX             ;SAVE LENGTH OF STRING
478
+	BEQ     QTYERR  ;IF LENGTH = 0
479
+	LDY     #0
480
+	JSR     SAV12
481
+	CMP     #'@'
482
+	BNE     LENCHK
483
+	LDA     #$80
484
+	JSR     PRMRPT
485
+	LDA     PARSTS
486
+	ORA     #$80    ;SET "@" FLAG
487
+	STA     PARSTS
488
+	DEX             ;DECREMENT LENGTH
489
+	INC     INDEX1  ;INCREMENT PAST "@"
490
+	BNE     LENCHK  ;IF NO CARRY
491
+	INC     INDEX1+1
492 492
 ;
493 493
 LENCHK
494
- TXA
495
- CMP     #17
496
- BCS     ERRLEN ;IF LENGTH < 17
497
- LDX     INDEX1
498
- LDY     INDEX1+1
499
- RTS
500
-;
501
-ERRLEN LDX     #ERRLS
502
- JMP     ERROR ;FILENAME TOO LONG
503
- .SKIP 4
504
-GETVAL ;GET NEXTVALUE ROUTINE
505
- JSR     CHRGET ;GET NXT CHR
506
-GTVL2 BEQ     SNER ;IF END OF STATEMENT
507
- BCC     GTVL5 ;CAN BE NUMERIC
508
- JSR     CHKOPN ;OR A "("
509
- JSR     GETBYT ;ANYTHING ELSE IS AN ERROR
510
- JMP     CHKCLS ;NEED CLOSING ")"
511
-;
512
-GTVL5 JMP     GETBYT ;EVALUATE IT
494
+	TXA
495
+	CMP     #17
496
+	BCS     ERRLEN  ;IF LENGTH < 17
497
+	LDX     INDEX1
498
+	LDY     INDEX1+1
499
+	RTS
500
+;
501
+ERRLEN	LDX     #ERRLS
502
+	JMP     ERROR   ;FILENAME TOO LONG
503
+.SKIP 4
504
+GETVAL	;GET NEXTVALUE ROUTINE
505
+	JSR     CHRGET  ;GET NXT CHR
506
+GTVL2	BEQ     SNER    ;IF END OF STATEMENT
507
+	BCC     GTVL5   ;CAN BE NUMERIC
508
+	JSR     CHKOPN  ;OR A "("
509
+	JSR     GETBYT  ;ANYTHING ELSE IS AN ERROR
510
+	JMP     CHKCLS  ;NEED CLOSING ")"
511
+;
512
+GTVL5	JMP     GETBYT  ;EVALUATE IT
513 513
 ;
514 514
 ;   GET NEXT 2BYTE EXPR ROUTINE
515 515
 ;   EXIT:  .A,.Y (HIGH,LOW) VALUE
516 516
 ;
517
-GETOFF JSR     CHRGET ;GET NXT CHR
518
- BEQ     SNER ;IF END OF STATEMENT
519
- BCC     GTFF5 ;CAN BE NUM. CONST
520
- JSR     CHKOPN ;OR A "("
521
- JSR     GETPIN ;EXPR
522
- JSR     CHKCLS ;NEED CLOSING ")"
523
- LDY     POKER
524
- LDA     POKER+1
525
- RTS
526
-;
527
-GTFF5 JMP     GETPIN ;EVALUATE IT
528
- .SKIP 4
517
+GETOFF	JSR     CHRGET  ;GET NXT CHR
518
+	BEQ     SNER    ;IF END OF STATEMENT
519
+	BCC     GTFF5   ;CAN BE NUM. CONST
520
+	JSR     CHKOPN  ;OR A "("
521
+	JSR     GETPIN  ;EXPR
522
+	JSR     CHKCLS  ;NEED CLOSING ")"
523
+	LDY     POKER
524
+	LDA     POKER+1
525
+	RTS
526
+;
527
+GTFF5	JMP     GETPIN  ;EVALUATE IT
528
+.SKIP 4
529 529
 ;       PRMRPT  CHECKS FOR A REPEATED PARAMETER.
530 530
 ;
531 531
 ;       ENTRY   A CONTAINS PARSTS FLAG TO CHECK.
532 532
 PRMRPT
533
- AND     PARSTS ;AND WITH PARSTS
534
- BNE     SNER ;IF BIT PREVIOUSLY SET
535
- RTS
533
+	AND     PARSTS  ;AND WITH PARSTS
534
+	BNE     SNER    ;IF BIT PREVIOUSLY SET
535
+	RTS
536 536
 ;
537 537
 ;       PRXRPT  CHECKS FOR A REPEATED PARAMETER.
538 538
 ;
539 539
 ;       ENTRY   A CONTAINS PARSTX FLAG TO CHECK.
540 540
 PRXRPT
541
- AND     PARSTX ;AND WITH PARSTX
542
- BNE     SNER ;IF BIT PREVIOUSLY SET
543
- RTS
541
+	AND     PARSTX  ;AND WITH PARSTX
542
+	BNE     SNER    ;IF BIT PREVIOUSLY SET
543
+	RTS
544 544
 .END

+ 380
- 380
BASIC_CBM2_A/butes2 View File

@@ -6,409 +6,409 @@
6 6
 ;
7 7
 TABFCB
8 8
 TCLR=*-TABFCB
9
-.BYT <FCLRM1 ;CLEAR
9
+	.BYT <FCLRM1    ;CLEAR
10 10
 TCAT=*-TABFCB
11
-.BYT FCAT-1 ;CATALOG
11
+	.BYT FCAT-1     ;CATALOG
12 12
 TOPN=*-TABFCB
13
-.BYT FOPN-1 ;DOPEN DSAVE DLOAD
13
+	.BYT FOPN-1     ;DOPEN DSAVE DLOAD
14 14
 TAPN=*-TABFCB
15
-.BYT FAPN-1 ;APPEND
15
+	.BYT FAPN-1     ;APPEND
16 16
 THED=*-TABFCB
17
-.BYT FHED-1 ;HEADER
17
+	.BYT FHED-1     ;HEADER
18 18
 TCOLL=*-TABFCB
19
-.BYT FCOLL-1 ;COLLECT
19
+	.BYT FCOLL-1    ;COLLECT
20 20
 TBAK=*-TABFCB
21
-.BYT FBAK-1 ;BACKUP
21
+	.BYT FBAK-1     ;BACKUP
22 22
 TCOPY=*-TABFCB
23
-.BYT FCOPY-1 ;COPY
23
+	.BYT FCOPY-1    ;COPY
24 24
 TCONC=*-TABFCB
25
-.BYT FCONC-1 ;CONCAT
25
+	.BYT FCONC-1    ;CONCAT
26 26
 TREN=*-TABFCB
27
-.BYT FREN-1 ;RENAME
27
+	.BYT FREN-1     ;RENAME
28 28
 TSCR=*-TABFCB
29
-.BYT FSCR-1 ;SCRATCH
29
+	.BYT FSCR-1     ;SCRATCH
30 30
 TREC=*-TABFCB
31
-.BYT FREC-1 ;RECORD
32
-;
33
-XSCA =$C2 ;SEND DOSSCA
34
-XID =$D0 ;SENDS DISK ID
35
-XD1 =$D1 ;SENDS DOSDS1
36
-XD2 =$D2 ;SENDS DOSDS2
37
-XREC =$E0 ;SENDS S FOR SEQ OR DOSRCL
38
-XWRT =$E1 ;SENDS W OR L
39
-XRCL =$E2 ;SEND LOW ((POKER))
40
-XFAT =$F0 ;SENDS "@" IF SPECIFIED
41
-XFN1 =$F1 ;SENDS FILENAME1
42
-XFN2 =$F2 ;SENDS FILENAME2
31
+	.BYT FREC-1     ;RECORD
32
+;
33
+XSCA	=$C2            ;SEND DOSSCA
34
+XID	=$D0            ;SENDS DISK ID
35
+XD1	=$D1            ;SENDS DOSDS1
36
+XD2	=$D2            ;SENDS DOSDS2
37
+XREC	=$E0            ;SENDS S FOR SEQ OR DOSRCL
38
+XWRT	=$E1            ;SENDS W OR L
39
+XRCL	=$E2            ;SEND LOW ((POKER))
40
+XFAT	=$F0            ;SENDS "@" IF SPECIFIED
41
+XFN1	=$F1            ;SENDS FILENAME1
42
+XFN2	=$F2            ;SENDS FILENAME2
43 43
 ;
44 44
 ;  TABLD - TOKEN TABLE DEFINITIONS
45 45
 ;
46
-TABLD ;USED TO BUILD DISK COMMAND STRINGS
47
-FCLR =*-TABLD
48
-FCLRM1 =FCLR-1
49
-.BYT 'I',XD1
50
-FCAT =*-TABLD
51
-.BYT '$',XD1,':',XFN1
46
+TABLD	;USED TO BUILD DISK COMMAND STRINGS
47
+FCLR	=*-TABLD
48
+FCLRM1	=FCLR-1
49
+	.BYT 'I',XD1
50
+FCAT	=*-TABLD
51
+	.BYT '$',XD1,':',XFN1
52 52
 ;
53
-FOPN =*-TABLD
54
-.BYT XFAT,XD1,':',XFN1,',',XWRT,',',XREC
53
+FOPN	=*-TABLD
54
+	.BYT XFAT,XD1,':',XFN1,',',XWRT,',',XREC
55 55
 ;
56
-FCONC =*-TABLD
57
-.BYT 'C',XD2,':',XFN2,'=',XD2,':',XFN2,','
58
-FAPN =*-TABLD
59
-.BYT XD1,':',XFN1,',','A'
56
+FCONC	=*-TABLD
57
+	.BYT 'C',XD2,':',XFN2,'=',XD2,':',XFN2,','
58
+FAPN	=*-TABLD
59
+	.BYT XD1,':',XFN1,',','A'
60 60
 ;
61
-FHED =*-TABLD
62
-.BYT 'N',XD1,':',XFN1,',',XID
61
+FHED	=*-TABLD
62
+	.BYT 'N',XD1,':',XFN1,',',XID
63 63
 ;
64
-FCOLL =*-TABLD
65
-.BYT 'V',XD1
64
+FCOLL	=*-TABLD
65
+	.BYT 'V',XD1
66 66
 ;
67
-FBAK =*-TABLD
68
-.BYT 'D',XD2,'=',XD1
67
+FBAK	=*-TABLD
68
+	.BYT 'D',XD2,'=',XD1
69 69
 ;
70
-FCOPY =*-TABLD
71
-.BYT 'C',XD2,':',XFN2,'=',XD1,':',XFN1
70
+FCOPY	=*-TABLD
71
+	.BYT 'C',XD2,':',XFN2,'=',XD1,':',XFN1
72 72
 ;
73
-FREN =*-TABLD
74
-.BYT 'R',XD1,':',XFN2,'=',XD1,':',XFN1
73
+FREN	=*-TABLD
74
+	.BYT 'R',XD1,':',XFN2,'=',XD1,':',XFN1
75 75
 ;
76
-FSCR =*-TABLD
77
-.BYT 'S',XD1,':',XFN1
76
+FSCR	=*-TABLD
77
+	.BYT 'S',XD1,':',XFN1
78 78
 ;
79
-FREC =*-TABLD
80
-.BYT 'P',XSCA,XRCL,XREC
79
+FREC	=*-TABLD
80
+	.BYT 'P',XSCA,XRCL,XREC
81 81
 .PAG
82 82
 ;  SEND PARAMETERS TO DEVICE
83 83
 ;
84 84
 ;  ENTRY  A NUMBER OF BYTES IN FORMAT.
85 85
 ;  Y --> TABLD ENTRY.
86
- SAV20   JSR     CHK2
87
- LDY     #TOPN ;TABLE OFFSET
88
- SAV21   LDA     #4 ;LENGTH
86
+SAV20	JSR     CHK2
87
+	LDY     #TOPN   ;TABLE OFFSET
88
+SAV21	LDA     #4      ;LENGTH
89 89
 SENDP
90
- STA XCNT ;SAVE NUMBER OF STRING BYTES
91
- LDA TABFCB,Y ;GET POINTER INTO TABLD
92
- PHA
93
- JSR OLDCLR ;CLEAR OLD STATUS
90
+	STA XCNT        ;SAVE NUMBER OF STRING BYTES
91
+	LDA TABFCB,Y    ;GET POINTER INTO TABLD
92
+	PHA
93
+	JSR OLDCLR      ;CLEAR OLD STATUS
94 94
 ;
95
- LDX #0
95
+	LDX #0
96 96
 SDP1
97
- PLA
98
- DEC XCNT
99
- BMI TRANR
100
- TAY
101
- INY ;MOVE DOWN TABLE
102
- TYA
103
- PHA
104
- LDA TABLD,Y ;GET NEXT ENTRY
105
- BPL SDP5 ;IF NOT ESCAPE CODE
106
- CMP #XSCA ;IF NOT SECONDARY ADDRESS
107
- BEQ RSCA
108
- CMP #XID
109
- BEQ RID ;IF DISK ID
110
- CMP #XRCL
111
- BEQ RDCN ;IF RECORD NUMBER
112
- CMP #XWRT
113
- BEQ RWRT ;IF W OR L
114
- CMP #XFAT
115
- BEQ RFAT ;IF "@" SYMBOL REQUEST
116
- CMP #XFN1
117
- BEQ RSFN ;IF FILENAME 1
118
- CMP #XFN2
119
- BEQ GORDFN ;IF FILENAME 2
120
- CMP #XREC
121
- BNE SDP2 ;IF NOT RECORD TYPE
122
- LDA DOSRCL ;GET REC #
123
- BNE SDP5 ;ALWAYS BRANCH
124
-SDP2 CMP #XD1
125
- BNE SDP3 ;IF NOT DRIVE 1
126
- LDA DOSDS1
127
- BPL SDP4 ;ALWAYS BRANCH
128
-SDP3 CMP #XD2
129
- BNE SDP1 ;IF NOT DRIVE 2, CONTINUE
130
- LDA DOSDS2
131
-SDP4 ORA #'0  ;CHANGE # TO ASCII
132
-;
133
-SDP5 STA DOSSTR,X ;ELSE INTO BUFFER
134
- INX
135
- BNE SDP1 ;ALWAYS
97
+	PLA
98
+	DEC XCNT
99
+	BMI TRANR
100
+	TAY
101
+	INY             ;MOVE DOWN TABLE
102
+	TYA
103
+	PHA
104
+	LDA TABLD,Y     ;GET NEXT ENTRY
105
+	BPL SDP5        ;IF NOT ESCAPE CODE
106
+	CMP #XSCA       ;IF NOT SECONDARY ADDRESS
107
+	BEQ RSCA
108
+	CMP #XID
109
+	BEQ RID         ;IF DISK ID
110
+	CMP #XRCL
111
+	BEQ RDCN        ;IF RECORD NUMBER
112
+	CMP #XWRT
113
+	BEQ RWRT        ;IF W OR L
114
+	CMP #XFAT
115
+	BEQ RFAT        ;IF "@" SYMBOL REQUEST
116
+	CMP #XFN1
117
+	BEQ RSFN        ;IF FILENAME 1
118
+	CMP #XFN2
119
+	BEQ GORDFN      ;IF FILENAME 2
120
+	CMP #XREC
121
+	BNE SDP2        ;IF NOT RECORD TYPE
122
+	LDA DOSRCL      ;GET REC #
123
+	BNE SDP5        ;ALWAYS BRANCH
124
+SDP2	CMP #XD1
125
+	BNE SDP3        ;IF NOT DRIVE 1
126
+	LDA DOSDS1
127
+	BPL SDP4        ;ALWAYS BRANCH
128
+SDP3	CMP #XD2
129
+	BNE SDP1        ;IF NOT DRIVE 2, CONTINUE
130
+	LDA DOSDS2
131
+SDP4	ORA #'0         ;CHANGE # TO ASCII
132
+;
133
+SDP5	STA DOSSTR,X    ;ELSE INTO BUFFER
134
+	INX
135
+	BNE SDP1        ;ALWAYS
136 136
 ;
137 137
 GORDFN
138
- BEQ RDFN
138
+	BEQ RDFN
139 139
 ;
140 140
 TRANR
141
- TXA ;LENGTH TO A
142
- PHA
143
- LDX #<DOSSTR ;SET FILENAME
144
- LDY #>DOSSTR
145
- STX HIGHDS ; SET UP VECTOR FOR FILENAME
146
- STY HIGHDS+1
147
- LDY #SYSBNK ;FILENAME IS IN SYSTEM BANK
148
- STY HIGHDS+2
149
- JSR SAV3
150
- PLA
151
- RTS
141
+	TXA             ;LENGTH TO A
142
+	PHA
143
+	LDX #<DOSSTR    ;SET FILENAME
144
+	LDY #>DOSSTR
145
+	STX HIGHDS      ; SET UP VECTOR FOR FILENAME
146
+	STY HIGHDS+1
147
+	LDY #SYSBNK     ;FILENAME IS IN SYSTEM BANK
148
+	STY HIGHDS+2
149
+	JSR SAV3
150
+	PLA
151
+	RTS
152 152
 .SKI 4
153
-RSCA LDA DOSSA ;SECONDARY ADDRESS (RECORD)
154
- BNE SDP5 ;ALWAYS
153
+RSCA	LDA DOSSA       ;SECONDARY ADDRESS (RECORD)
154
+	BNE SDP5        ;ALWAYS
155 155
 ;
156 156
 RFAT
157
- BIT PARSTS
158
- BMI RFATA
159
- BPL SDP1 ;IF @ NOT ENCOUNTERED
160
-RFATA LDA #'@
161
- BNE SDP5 ;ALWAYS
157
+	BIT PARSTS
158
+	BMI RFATA
159
+	BPL SDP1        ;IF @ NOT ENCOUNTERED
160
+RFATA	LDA #'@
161
+	BNE SDP5        ;ALWAYS
162 162
 ;
163 163
 ;  ID SUBROUTINE
164 164
 RID
165
- LDA DOSDID ;INCLUDE ID
166
- STA DOSSTR,X
167
- INX
168
- LDA DOSDID+1
169
- BNE SDP5 ;ALWAYS
165
+	LDA DOSDID      ;INCLUDE ID
166
+	STA DOSSTR,X
167
+	INX
168
+	LDA DOSDID+1
169
+	BNE SDP5        ;ALWAYS
170 170
 ;
171 171
 RWRT
172
- LDA DOSRCL ;CHK FOR L OR W
173
- BEQ RWRT1 ;ZERO THEN WRITE
174
- LDA #'L
175
- BNE SDP5 ;ALWAYS
172
+	LDA DOSRCL      ;CHK FOR L OR W
173
+	BEQ RWRT1       ;ZERO THEN WRITE
174
+	LDA #'L
175
+	BNE SDP5        ;ALWAYS
176 176
 ;
177
-RWRT1 LDA #'S ;SEND W,S
178
- STA DOSRCL
179
- LDA #'W
180
- BNE SDP5 ;ALWAYS
177
+RWRT1	LDA #'S         ;SEND W,S
178
+	STA DOSRCL
179
+	LDA #'W
180
+	BNE SDP5        ;ALWAYS
181 181
 ;
182 182
 ;  MOVE RECORD NUMBER
183 183
 RDCN
184
- LDA POKER
185
- STA DOSSTR,X
186
- LDA POKER+1
187
- INX
188
- BNE SDP5 ;ALWAYS
184
+	LDA POKER
185
+	STA DOSSTR,X
186
+	LDA POKER+1
187
+	INX
188
+	BNE SDP5        ;ALWAYS
189 189
 ;
190 190
 ;  MOVE FILE NAMES.
191 191
 RSFN
192
- LDA DOSF1A
193
- STA INDEX1
194
- LDA DOSF1A+1
195
- STA INDEX1+1
196
- LDA DOSF1B
197
- LDY DOSF1L
198
- BEQ RDRT0 ;IF NULL STRING
199
- BNE XRFN ;ALWAYS
192
+	LDA DOSF1A
193
+	STA INDEX1
194
+	LDA DOSF1A+1
195
+	STA INDEX1+1
196
+	LDA DOSF1B
197
+	LDY DOSF1L
198
+	BEQ RDRT0       ;IF NULL STRING
199
+	BNE XRFN        ;ALWAYS
200 200
 ;
201 201
 RDFN
202
- LDA DOSF2A
203
- STA INDEX1
204
- LDA DOSF2A+1
205
- STA INDEX1+1
206
- LDA DOSF2B
207
- LDY DOSF2L
208
- BEQ RDRT0 ;IF NULL STRING
202
+	LDA DOSF2A
203
+	STA INDEX1
204
+	LDA DOSF2A+1
205
+	STA INDEX1+1
206
+	LDA DOSF2B
207
+	LDY DOSF2L
208
+	BEQ RDRT0       ;IF NULL STRING
209 209
 ;
210 210
 XRFN
211
- STA I6509 ;SET INDIRECTION BANK
212
- STY COUNT
213
- LDY #0 ;MOVE NAME TO DOSSTR
214
-RDMOV LDA (INDEX1)Y
215
- STA DOSSTR,X
216
- INX
217
- INY
218
- CPY COUNT
219
- BNE RDMOV ;IF MOVE NOT COMPLETE
220
- .BYTE $24 ;HOP
221
-RDRT0 DEX ;CASE CDD=SD
211
+	STA I6509       ;SET INDIRECTION BANK
212
+	STY COUNT
213
+	LDY #0          ;MOVE NAME TO DOSSTR
214
+RDMOV	LDA (INDEX1)Y
215
+	STA DOSSTR,X
216
+	INX
217
+	INY
218
+	CPY COUNT
219
+	BNE RDMOV       ;IF MOVE NOT COMPLETE
220
+	.BYTE $24       ;HOP
221
+RDRT0	DEX             ;CASE CDD=SD
222 222
 RDRT1
223
- JSR MAPTXT ;RESTORE INDIR BANK
224
- JMP SDP1 ;GET NEXT SYMBOL
223
+	JSR MAPTXT      ;RESTORE INDIR BANK
224
+	JMP SDP1        ;GET NEXT SYMBOL
225 225
 .PAG
226 226
 ;  SYNTAX CHECKER
227 227
 ;  ROUTINES FOR DOS.WRITE
228 228
 CHK1
229
- AND #$E6 ;FOR HEADER,DLOAD,SCRTCH
230
- BEQ CHK2 ;CHK OPT PARMS
231
-CHKER1 JMP SNERR
229
+	AND #$E6        ;FOR HEADER,DLOAD,SCRTCH
230
+	BEQ CHK2        ;CHK OPT PARMS
231
+CHKER1	JMP SNERR
232 232
 ;
233 233
 CHK2
234
- LDA PARSTS ;FOR DSAVE
235
- AND #1
236
- CMP #1 ;CHK REQ'D PARMS
237
- BNE CHKER1 ;ERROR IF 1 MISSING
238
- LDA PARSTS ;RELOAD FOR RETURN
239
- RTS
240
-;
241
-CHK3 AND #$E7 ;FOR COLECT
242
- BNE CHKER1 ;CHK OPT PARMS
243
- RTS
244
-;
245
-CHK4 AND #$C4 ;FOR COPY,CONCAT
246
- BNE CHKER1 ;CHK OPT PARMS
247
- LDA PARSTS
248
-CHK5 AND #3 ;FOR RENAME
249
- CMP #3 ;CHK REQ'D PARMS
250
- BNE CHKER1
251
- LDA PARSTS ;RELOAD FOR RETURN
252
- RTS
253
-;
254
-CHK6 AND #5 ;FOR APPEND,DOPEN
255
- CMP #5 ;CHK REQ'D PARMS
256
- BNE CHKER1
257
- LDA PARSTS ;RELOAD FOR RTS
258
- RTS
234
+	LDA PARSTS      ;FOR DSAVE
235
+	AND #1
236
+	CMP #1          ;CHK REQ'D PARMS
237
+	BNE CHKER1      ;ERROR IF 1 MISSING
238
+	LDA PARSTS      ;RELOAD FOR RETURN
239
+	RTS
240
+;
241
+CHK3	AND #$E7        ;FOR COLECT
242
+	BNE CHKER1      ;CHK OPT PARMS
243
+	RTS
244
+;
245
+CHK4	AND #$C4        ;FOR COPY,CONCAT
246
+	BNE CHKER1      ;CHK OPT PARMS
247
+	LDA PARSTS
248
+CHK5	AND #3          ;FOR RENAME
249
+	CMP #3          ;CHK REQ'D PARMS
250
+	BNE CHKER1
251
+	LDA PARSTS      ;RELOAD FOR RETURN
252
+	RTS
253
+;
254
+CHK6	AND #5          ;FOR APPEND,DOPEN
255
+	CMP #5          ;CHK REQ'D PARMS
256
+	BNE CHKER1
257
+	LDA PARSTS      ;RELOAD FOR RTS
258
+	RTS
259 259
 .PAG
260 260
 ;  ERROR ON CHANNEL READ
261 261
 ERRCHL
262
- LDA #0 ;NO FILENAME
263
- JSR SETNAM
264
- LDY #$6F ;.Y=SA
265
- JSR OCHANL ;OPEN SPECIAL CHANNEL
266
- LDX #DOSLFN ;MAKE IT THE INPUT CHANNEL
267
- JSR CHKIN
268
- LDY #$FF ;FOR OFFSET
269
- JSR MAPSTR
270
-;
271
-LOOP1 INY
272
- JSR BASIN
273
- CMP #CR ;CHECK FOR END
274
- BEQ ERREND
275
- STA (DSDESC+1)Y
276
- CPY #39
277
- BNE LOOP1
278
-ERREND LDA #00
279
- STA (DSDESC+1)Y
280
- LDA #40 ;GET 40 CHAR STR
281
- STA DSDESC ;WE HAVE 40 CHRS
282
- JSR MAPTXT
283
- JSR CLRCH
284
- LDA #DOSLFN ;CLOSE CHANNEL AND RESTORE DEFAULT CHNLS
285
- CLC
286
- JSR TCLOSE
287
- JMP DCAT0 ;RESTORE DEFAULT CHANNEL ...
262
+	LDA #0          ;NO FILENAME
263
+	JSR SETNAM
264
+	LDY #$6F        ;.Y=SA
265
+	JSR OCHANL      ;OPEN SPECIAL CHANNEL
266
+	LDX #DOSLFN     ;MAKE IT THE INPUT CHANNEL
267
+	JSR CHKIN
268
+	LDY #$FF        ;FOR OFFSET
269
+	JSR MAPSTR
270
+;
271
+LOOP1	INY
272
+	JSR BASIN
273
+	CMP #CR         ;CHECK FOR END
274
+	BEQ ERREND
275
+	STA (DSDESC+1)Y
276
+	CPY #39
277
+	BNE LOOP1
278
+ERREND	LDA #00
279
+	STA (DSDESC+1)Y
280
+	LDA #40         ;GET 40 CHAR STR
281
+	STA DSDESC      ;WE HAVE 40 CHRS
282
+	JSR MAPTXT
283
+	JSR CLRCH
284
+	LDA #DOSLFN     ;CLOSE CHANNEL AND RESTORE DEFAULT CHNLS
285
+	CLC
286
+	JSR TCLOSE
287
+	JMP DCAT0       ;RESTORE DEFAULT CHANNEL ...
288 288
 .SKI 4
289 289
 ;R-U-SURE SUBROUTINE
290
-RUSURE JSR TSTDIR ;CHK FOR DIRECT
291
- BNE ANSYES ;Z CLR=NOT DIRECT
292
- LDX #MSG30
293
- JSR MSG ;PROMPT USER
294
- JSR CLRCH ;CLEAR CHANNEL FOR BASIN
295
- JSR BASIN ;NEXT CHAR
296
- CMP #'Y
297
- BNE ANSNO ;IF 1ST <> 'Y'
298
- JSR BASIN ;NEXT CHR
299
- CMP #CR
300
- BEQ ANSYES ;IF SHORT FORM OF YES (Y,CR)
301
- CMP #'E
302
- BNE ANSNO ;IF NOT 'E'
303
- JSR BASIN
304
- CMP #'S
305
- BNE ANSNO ;IF NOT 'S'
306
- JSR BASIN
307
- CMP #CR
308
- BEQ ANSYES ;IF 'YES',CR
290
+RUSURE	JSR TSTDIR      ;CHK FOR DIRECT
291
+	BNE ANSYES      ;Z CLR=NOT DIRECT
292
+	LDX #MSG30
293
+	JSR MSG         ;PROMPT USER
294
+	JSR CLRCH       ;CLEAR CHANNEL FOR BASIN
295
+	JSR BASIN       ;NEXT CHAR
296
+	CMP #'Y
297
+	BNE ANSNO       ;IF 1ST <> 'Y'
298
+	JSR BASIN       ;NEXT CHR
299
+	CMP #CR
300
+	BEQ ANSYES      ;IF SHORT FORM OF YES (Y,CR)
301
+	CMP #'E
302
+	BNE ANSNO       ;IF NOT 'E'
303
+	JSR BASIN
304
+	CMP #'S
305
+	BNE ANSNO       ;IF NOT 'S'
306
+	JSR BASIN
307
+	CMP #CR
308
+	BEQ ANSYES      ;IF 'YES',CR
309 309
 ;
310 310
 ;  IF NOT YES, INPUT UNTIL CR RECEIVED
311
-ANSNO CMP #CR
312
- SEC ;CARRY SET =NO&DIRECT
313
- BEQ ANSBYE ;IF CR RECEIVED, EXIT
314
- JSR BASIN
315
- BNE ANSNO ;CONTINUE TO IGNORE
311
+ANSNO	CMP #CR
312
+	SEC             ;CARRY SET =NO&DIRECT
313
+	BEQ ANSBYE      ;IF CR RECEIVED, EXIT
314
+	JSR BASIN
315
+	BNE ANSNO       ;CONTINUE TO IGNORE
316 316
 ;
317 317
 ;  HERE IF ANSWER 'YES'
318
-ANSYES CLC ;CARRY CLR =NOT DIRECT
319
-ANSBYE RTS
318
+ANSYES	CLC             ;CARRY CLR =NOT DIRECT
319
+ANSBYE	RTS
320 320
 .SKI 4
321 321
 ;OLDCLR SUBROUTINE
322 322
 ;    CLEARS DS$: SET STRING LENGTH TO ZERO.
323 323
 ;    CLEARS ST
324 324
 ;
325 325
 OLDCLR
326
- LDA #0
327
- STA DSDESC ;KILL DS$
328
- CLC
329
- JMP STORST ;KILL ST
326
+	LDA #0
327
+	STA DSDESC      ;KILL DS$
328
+	CLC
329
+	JMP STORST      ;KILL ST
330 330
 .SKI 3
331 331
 SAV77
332
- JSR SAV13
333
- STA DOSF1L
334
- LDA INDEX1 ;SAVE ADDRESS OF STRING
335
- LDY INDEX1+1
336
- STA DOSF1A
337
- STY DOSF1A+1
338
- LDY INDEX1+2 ; ...AND ITS BANK#
339
- STY DOSF1B
340
- RTS
332
+	JSR SAV13
333
+	STA DOSF1L
334
+	LDA INDEX1      ;SAVE ADDRESS OF STRING
335
+	LDY INDEX1+1
336
+	STA DOSF1A
337
+	STY DOSF1A+1
338
+	LDY INDEX1+2    ; ...AND ITS BANK#
339
+	STY DOSF1B
340
+	RTS
341 341
 .PAG
342 342
 ;  PARSER FOR LOAD,SAVE AND VERIFY VERBS
343 343
 ; (FILE NAME OPTION)
344 344
 ; (OPT DEVICE #) DFLT=1
345 345
 ; (EOT CMD) DFLT=0=NO
346 346
 PLSV
347
- LDX #0
348
- STX DOSF1L ;SET FILE NAME LENGTH TO ZERO
349
- STX DOSSA ;SET SECONDARY ADDRESS TO ZERO
350
- STX DOSLA ;CLEAR LOGICAL ADDRESS
351
- LDX #1 ;DEFAULT DEVICE
352
- STX DOSFA ;SET PHYSICAL ADDRESS TO 8 (DISK)
347
+	LDX #0
348
+	STX DOSF1L      ;SET FILE NAME LENGTH TO ZERO
349
+	STX DOSSA       ;SET SECONDARY ADDRESS TO ZERO
350
+	STX DOSLA       ;CLEAR LOGICAL ADDRESS
351
+	LDX #1          ;DEFAULT DEVICE
352
+	STX DOSFA       ;SET PHYSICAL ADDRESS TO 8 (DISK)
353 353
 ;
354
- JSR CHRGOT
355
- BEQ PLSVX ;IF NO PARAMTERS
356
- JSR SAV77
354
+	JSR CHRGOT
355
+	BEQ PLSVX       ;IF NO PARAMTERS
356
+	JSR SAV77
357 357
 ;
358
- JSR PLSV27
359
- STX DOSFA ;SAVE DEVICE CHANNEL
358
+	JSR PLSV27
359
+	STX DOSFA       ;SAVE DEVICE CHANNEL
360 360
 ;
361
- JSR PLSV27
362
- STX DOSSA ;SET SECONDARY ADDRESS
361
+	JSR PLSV27
362
+	STX DOSSA       ;SET SECONDARY ADDRESS
363 363
 ;
364 364
 PLSVX
365
- LDA DOSF1A
366
- LDX DOSF1A+1
367
- LDY DOSF1B
368
- STA HIGHDS ;SET UP VECTOR TO FILENAME
369
- STX HIGHDS+1
370
- STY HIGHDS+2
371
- LDA DOSF1L ;.A=FILENAME LENGTH
372
- SAV3 LDX #<HIGHDS ;PAGE 0 ADDR OF VECTOR
373
- JSR SETNAM
374
- LDA DOSLA ;SET LOGICAL FILE INFO
375
- LDX DOSFA
376
- LDY DOSSA
377
- JMP SETLFS
365
+	LDA DOSF1A
366
+	LDX DOSF1A+1
367
+	LDY DOSF1B
368
+	STA HIGHDS      ;SET UP VECTOR TO FILENAME
369
+	STX HIGHDS+1
370
+	STY HIGHDS+2
371
+	LDA DOSF1L      ;.A=FILENAME LENGTH
372
+SAV3	LDX #<HIGHDS    ;PAGE 0 ADDR OF VECTOR
373
+	JSR SETNAM
374
+	LDA DOSLA       ;SET LOGICAL FILE INFO
375
+	LDX DOSFA
376
+	LDY DOSSA
377
+	JMP SETLFS
378 378
 ;
379 379
 PLSV27
380
- JSR CHRGOT
381
- BEQ PLSVX
382
- JMP COPG
383
-;
384
-PLSV30 JSR CHKCOM
385
-PLSV32 JSR CHRGOT
386
- BNE PLSRTS ;IF NOT END OF STATEMENT
387
- JMP SNERR
380
+	JSR CHRGOT
381
+	BEQ PLSVX
382
+	JMP COPG
383
+;
384
+PLSV30	JSR CHKCOM
385
+PLSV32	JSR CHRGOT
386
+	BNE PLSRTS      ;IF NOT END OF STATEMENT
387
+	JMP SNERR
388 388
 .SKI 4
389 389
 ;  ROUTINE TO TEST IF VARIABLE IS IN BASIC.
390 390
 ;  ENTRY  (FACMO) = ADDRESS OF VARIABLE.
391 391
 ;  EXIT  CARRY CLEAR IF VARIABLE IS IN BASIC.
392 392
 ;  CARRY SET IF VARIABLE NOT IN BASIC.
393 393
 TSTROM
394
- LDA FACMO+2 ;CHECK BANK#S
395
- CMP #SYSBNK
396
- BNE XIT ;NOT IN BASIC...
397
- CLC
398
- LDA #<BENTRY ;BENTRY-PTR-1<=0?
399
- SBC FACMO
400
- LDA #>BENTRY
401
- SBC FACMO+1
402
- PLSRTS  RTS
403
-;
404
-XIT SEC
405
- RTS
394
+	LDA FACMO+2     ;CHECK BANK#S
395
+	CMP #SYSBNK
396
+	BNE XIT         ;NOT IN BASIC...
397
+	CLC
398
+	LDA #<BENTRY    ;BENTRY-PTR-1<=0?
399
+	SBC FACMO
400
+	LDA #>BENTRY
401
+	SBC FACMO+1
402
+PLSRTS	RTS
403
+;
404
+XIT	SEC
405
+	RTS
406 406
 .SKI 4
407 407
 FLPINT
408
- JSR AYINT
409
- LDA FACMO
410
- LDY FACLO
411
- RTS
408
+	JSR AYINT
409
+	LDA FACMO
410
+	LDY FACLO
411
+	RTS
412 412
 .PAG     'CHRGET ROUTINE'
413 413
 ;  CHRGET IS CALLED TO GET THE NEXT CHARACTER FROM THE
414 414
 ;  TEXT BUFFER POINTED TO BY TXTPTR WHICH IS INCREMENTED
@@ -429,113 +429,113 @@ FLPINT
429 429
 ;  Z BIT = 0, THE NOT END OF STATEMENT.
430 430
 ;   = 1, END OF STATEMENT "" OR END OF LINE.
431 431
 ;
432
-CHRGET JMP (ICHRGE)
433
-CHRGOT JMP (ICHRGO)
432
+CHRGET	JMP (ICHRGE)
433
+CHRGOT	JMP (ICHRGO)
434 434
 .SKI 2
435
-.IFN CC1 <
435
+	.IFN CC1 <
436 436
 NCHRGE
437
- INC TXTPTR ;INCREMENT TEXT POINTER
438
- BNE NCHRGO ;IF NO CARRY INTO MSB
439
- INC TXTPTR+1
437
+	INC TXTPTR      ;INCREMENT TEXT POINTER
438
+	BNE NCHRGO      ;IF NO CARRY INTO MSB
439
+	INC TXTPTR+1
440 440
 ;
441 441
 NCHRGO
442
- LDY #0
443
- LDA (TXTPTR)Y
444
- CMP #$20 ;SPAN BLANKS
445
- BEQ CHRGET ;IF BLANK CHARACTER
442
+	LDY #0
443
+	LDA (TXTPTR)Y
444
+	CMP #$20        ;SPAN BLANKS
445
+	BEQ CHRGET      ;IF BLANK CHARACTER
446 446
 ;
447 447
 ;  IF THE CHARACTER IN .A IS NUMERIC THEN
448 448
 ;  THE FOLLOWING CODE CLEARS THE CARRY BIT.
449 449
 QNUM
450
- CMP #':
451
- BCS QNRTS
452
- SBC #$2F ;'0'-1
453
- SEC
454
- SBC #$D0 ;$100-'0'
455
-QNRTS RTS
450
+	CMP #':
451
+	BCS QNRTS
452
+	SBC #$2F        ;'0'-1
453
+	SEC
454
+	SBC #$D0        ;$100-'0'
455
+QNRTS	RTS
456 456
 >
457
-.IFE CC1 <
458
-NCHRGO JSR CHRMAP
459
- JMP CHRG20
457
+	.IFE CC1 <
458
+NCHRGO	JSR CHRMAP
459
+	JMP CHRG20
460 460
 NCHRGE
461
- JSR CHRMAP
461
+	JSR CHRMAP
462 462
 CHRG10
463
- INC TXTPTR ;INCREMENT TEXT POINTER
464
- BNE CHRG20 ;IF NO CARRY INTO MSB
465
- INC TXTPTR+1
466
-;
467
-CHRG20 LDY #0
468
- LDA (TXTPTR)Y
469
- CMP #$20 ;SPAN BLANKS
470
- BEQ CHRG10 ;IF BLANK CHARACTER
471
- JSR QNUM
472
- PHP
473
- PHA
474
- LDA TTTEMP
475
- STA I6509
476
- PLA
477
- PLP
478
- RTS
463
+	INC TXTPTR      ;INCREMENT TEXT POINTER
464
+	BNE CHRG20      ;IF NO CARRY INTO MSB
465
+	INC TXTPTR+1
466
+;
467
+CHRG20	LDY #0
468
+	LDA (TXTPTR)Y
469
+	CMP #$20        ;SPAN BLANKS
470
+	BEQ CHRG10      ;IF BLANK CHARACTER
471
+	JSR QNUM
472
+	PHP
473
+	PHA
474
+	LDA TTTEMP
475
+	STA I6509
476
+	PLA
477
+	PLP
478
+	RTS
479 479
 ;  IF THE CHARACTER IN .A IS NUMERIC THEN
<