You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

293 lines
7.8KB

  1. .PAG 'DECLARE'
  2. *=$0000 ;DECLARE 6510 PORTS
  3. D6510 *=*+1 ;6510 DATA DIRECTION REGISTER
  4. R6510 *=*+1 ;6510 DATA REGISTER
  5. *=$0002 ;MISS 6510 REGS
  6. ;VIRTUAL REGS FOR MACHINE LANGUAGE MONITOR
  7. PCH *=*+1
  8. PCL *=*+1
  9. FLGS *=*+1
  10. ACC *=*+1
  11. XR *=*+1
  12. YR *=*+1
  13. SP *=*+1
  14. INVH *=*+1 ;USER MODIFIABLE IRQ
  15. INVL *=*+1
  16. .SKI 3
  17. * =$90
  18. STATUS *=*+1 ;I/O OPERATION STATUS BYTE
  19. ; CRFAC *=*+2 ;CORRECTION FACTOR (UNUSED)
  20. STKEY *=*+1 ;STOP KEY FLAG
  21. SVXT *=*+1 ;TEMPORARY
  22. VERCK *=*+1 ;LOAD OR VERIFY FLAG
  23. C3P0 *=*+1 ;IEEE BUFFERED CHAR FLAG
  24. BSOUR *=*+1 ;CHAR BUFFER FOR IEEE
  25. SYNO *=*+1 ;CASSETTE SYNC #
  26. XSAV *=*+1 ;TEMP FOR BASIN
  27. LDTND *=*+1 ;INDEX TO LOGICAL FILE
  28. DFLTN *=*+1 ;DEFAULT INPUT DEVICE #
  29. DFLTO *=*+1 ;DEFAULT OUTPUT DEVICE #
  30. PRTY *=*+1 ;CASSETTE PARITY
  31. DPSW *=*+1 ;CASSETTE DIPOLE SWITCH
  32. MSGFLG *=*+1 ;OS MESSAGE FLAG
  33. PTR1 ;CASSETTE ERROR PASS1
  34. T1 *=*+1 ;TEMPORARY 1
  35. TMPC
  36. PTR2 ;CASSETTE ERROR PASS2
  37. T2 *=*+1 ;TEMPORARY 2
  38. TIME *=*+3 ;24 HOUR CLOCK IN 1/60TH SECONDS
  39. R2D2 ;SERIAL BUS USAGE
  40. PCNTR *=*+1 ;CASSETTE STUFF
  41. ; PTCH *=*+1 (UNUSED)
  42. BSOUR1 ;TEMP USED BY SERIAL ROUTINE
  43. FIRT *=*+1
  44. COUNT ;TEMP USED BY SERIAL ROUTINE
  45. CNTDN *=*+1 ;CASSETTE SYNC COUNTDOWN
  46. BUFPT *=*+1 ;CASSETTE BUFFER POINTER
  47. INBIT ;RS-232 RCVR INPUT BIT STORAGE
  48. SHCNL *=*+1 ;CASSETTE SHORT COUNT
  49. BITCI ;RS-232 RCVR BIT COUNT IN
  50. RER *=*+1 ;CASSETTE READ ERROR
  51. RINONE ;RS-232 RCVR FLAG FOR START BIT CHECK
  52. REZ *=*+1 ;CASSETE READING ZEROES
  53. RIDATA ;RS-232 RCVR BYTE BUFFER
  54. RDFLG *=*+1 ;CASSETTE READ MODE
  55. RIPRTY ;RS-232 RCVR PARITY STORAGE
  56. SHCNH *=*+1 ;CASSETTE SHORT CNT
  57. SAL *=*+1
  58. SAH *=*+1
  59. EAL *=*+1
  60. EAH *=*+1
  61. CMP0 *=*+1
  62. TEMP *=*+1
  63. TAPE1 *=*+2 ;ADDRESS OF TAPE BUFFER #1Y.
  64. BITTS ;RS-232 TRNS BIT COUNT
  65. SNSW1 *=*+1
  66. NXTBIT ;RS-232 TRNS NEXT BIT TO BE SENT
  67. DIFF *=*+1
  68. RODATA ;RS-232 TRNS BYTE BUFFER
  69. PRP *=*+1
  70. FNLEN *=*+1 ;LENGTH CURRENT FILE N STR
  71. LA *=*+1 ;CURRENT FILE LOGICAL ADDR
  72. SA *=*+1 ;CURRENT FILE 2ND ADDR
  73. FA *=*+1 ;CURRENT FILE PRIMARY ADDR
  74. FNADR *=*+2 ;ADDR CURRENT FILE NAME STR
  75. ROPRTY ;RS-232 TRNS PARITY BUFFER
  76. OCHAR *=*+1
  77. FSBLK *=*+1 ;CASSETTE READ BLOCK COUNT
  78. MYCH *=*+1
  79. CAS1 *=*+1 ;CASSETTE MANUAL/CONTROLLED SWITCH
  80. TMP0
  81. STAL *=*+1
  82. STAH *=*+1
  83. MEMUSS ;CASSETTE LOAD TEMPS (2 BYTES)
  84. TMP2 *=*+2
  85. ;
  86. ;VARIABLES FOR SCREEN EDITOR
  87. ;
  88. LSTX *=*+1 ;KEY SCAN INDEX
  89. ; SFST *=*+1 ;KEYBOARD SHIFT FLAG (UNUSED)
  90. NDX *=*+1 ;INDEX TO KEYBOARD Q
  91. RVS *=*+1 ;RVS FIELD ON FLAG
  92. INDX *=*+1
  93. LSXP *=*+1 ;X POS AT START
  94. LSTP *=*+1
  95. SFDX *=*+1 ;SHIFT MODE ON PRINT
  96. BLNSW *=*+1 ;CURSOR BLINK ENAB
  97. BLNCT *=*+1 ;COUNT TO TOGGLE CUR
  98. GDBLN *=*+1 ;CHAR BEFORE CURSOR
  99. BLNON *=*+1 ;ON/OFF BLINK FLAG
  100. CRSW *=*+1 ;INPUT VS GET FLAG
  101. PNT *=*+2 ;POINTER TO ROW
  102. ; POINT *=*+1 (UNUSED)
  103. PNTR *=*+1 ;POINTER TO COLUMN
  104. QTSW *=*+1 ;QUOTE SWITCH
  105. LNMX *=*+1 ;40/80 MAX POSITON
  106. TBLX *=*+1
  107. DATA *=*+1
  108. INSRT *=*+1 ;INSERT MODE FLAG
  109. LDTB1 *=*+26 ;LINE FLAGS+ENDSPACE
  110. USER *=*+2 ;SCREEN EDITOR COLOR IP
  111. KEYTAB *=*+2 ;KEYSCAN TABLE INDIRECT
  112. ;RS-232 Z-PAGE
  113. RIBUF *=*+2 ;RS-232 INPUT BUFFER POINTER
  114. ROBUF *=*+2 ;RS-232 OUTPUT BUFFER POINTER
  115. FREKZP *=*+4 ;FREE KERNAL ZERO PAGE 9/24/80
  116. BASZPT *=*+1 ;LOCATION ($00FF) USED BY BASIC
  117. .SKI 3
  118. *=$100
  119. BAD *=*+1
  120. *=$200
  121. BUF *=*+89 ;BASIC/MONITOR BUFFER
  122. .SKI
  123. ; TABLES FOR OPEN FILES
  124. ;
  125. LAT *=*+10 ;LOGICAL FILE NUMBERS
  126. FAT *=*+10 ;PRIMARY DEVICE NUMBERS
  127. SAT *=*+10 ;SECONDARY ADDRESSES
  128. .SKI 2
  129. ; SYSTEM STORAGE
  130. ;
  131. KEYD *=*+10 ;IRQ KEYBOARD BUFFER
  132. MEMSTR *=*+2 ;START OF MEMORY
  133. MEMSIZ *=*+2 ;TOP OF MEMORY
  134. TIMOUT *=*+1 ;IEEE TIMEOUT FLAG
  135. .SKI 2
  136. ; SCREEN EDITOR STORAGE
  137. ;
  138. COLOR *=*+1 ;ACTIV COLOR NYBBLE
  139. GDCOL *=*+1 ;ORIGINAL COLOR BEFORE CURSOR
  140. HIBASE *=*+1 ;BASE LOCATION OF SCREEN (TOP)
  141. XMAX *=*+1
  142. RPTFLG *=*+1 ;KEY REPEAT FLAG
  143. KOUNT *=*+1
  144. DELAY *=*+1
  145. SHFLAG *=*+1 ;SHIFT FLAG BYTE
  146. LSTSHF *=*+1 ;LAST SHIFT PATTERN
  147. KEYLOG *=*+2 ;INDIRECT FOR KEYBOARD TABLE SETUP
  148. MODE *=*+1 ;0-PET MODE, 1-CATTACANNA
  149. AUTODN *=*+1 ;AUTO SCROLL DOWN FLAG(=0 ON,<>0 OFF)
  150. .SKI 3
  151. ; RS-232 STORAGE
  152. ;
  153. M51CTR *=*+1 ;6551 CONTROL REGISTER
  154. M51CDR *=*+1 ;6551 COMMAND REGISTER
  155. M51AJB *=*+2 ;NON STANDARD (BITTIME/2-100)
  156. RSSTAT *=*+1 ; RS-232 STATUS REGISTER
  157. BITNUM *=*+1 ;NUMBER OF BITS TO SEND (FAST RESPONSE)
  158. BAUDOF *=*+2 ;BAUD RATE FULL BIT TIME (CREATED BY OPEN)
  159. ;
  160. ; RECIEVER STORAGE
  161. ;
  162. ; INBIT *=*+1 ;INPUT BIT STORAGE
  163. ; BITCI *=*+1 ;BIT COUNT IN
  164. ; RINONE *=*+1 ;FLAG FOR START BIT CHECK
  165. ; RIDATA *=*+1 ;BYTE IN BUFFER
  166. ; RIPRTY *=*+1 ;BYTE IN PARITY STORAGE
  167. RIDBE *=*+1 ;INPUT BUFFER INDEX TO END
  168. RIDBS *=*+1 ;INPUT BUFFER POINTER TO START
  169. ;
  170. ; TRANSMITTER STORAGE
  171. ;
  172. ; BITTS *=*+1 ;# OF BITS TO BE SENT
  173. ; NXTBIT *=*+1 ;NEXT BIT TO BE SENT
  174. ; ROPRTY *=*+1 ;PARITY OF BYTE SENT
  175. ; RODATA *=*+1 ;BYTE BUFFER OUT
  176. RODBS *=*+1 ;OUTPUT BUFFER INDEX TO START
  177. RODBE *=*+1 ;OUTPUT BUFFER INDEX TO END
  178. ;
  179. IRQTMP *=*+2 ;HOLDS IRQ DURING TAPE OPS
  180. ;
  181. ; TEMP SPACE FOR VIC-40 VARIABLES ****
  182. ;
  183. ENABL *=*+1 ;RS-232 ENABLES (REPLACES IER)
  184. CASTON *=*+1 ;TOD SENSE DURING CASSETTES
  185. KIKA26 *=*+1 ;TEMP STORAGE FOR CASSETTE READ ROUTINE
  186. STUPID *=*+1 ;TEMP D1IRQ INDICATOR FOR CASSETTE READ
  187. LINTMP *=*+1 ;TEMPORARY FOR LINE INDEX
  188. PALNTS *=*+1 ;PAL VS NTSC FLAG 0=NTSC 1=PAL
  189. .SKI 3
  190. *=$0300 ;REM PROGRAM INDIRECTS(10)
  191. *=$0300+20 ;REM KERNAL/OS INDIRECTS(20)
  192. CINV *=*+2 ;IRQ RAM VECTOR
  193. CBINV *=*+2 ;BRK INSTR RAM VECTOR
  194. NMINV *=*+2 ;NMI RAM VECTOR
  195. IOPEN *=*+2 ;INDIRECTS FOR CODE
  196. ICLOSE *=*+2 ; CONFORMS TO KERNAL SPEC 8/19/80
  197. ICHKIN *=*+2
  198. ICKOUT *=*+2
  199. ICLRCH *=*+2
  200. IBASIN *=*+2
  201. IBSOUT *=*+2
  202. ISTOP *=*+2
  203. IGETIN *=*+2
  204. ICLALL *=*+2
  205. USRCMD *=*+2
  206. ILOAD *=*+2
  207. ISAVE *=*+2 ;SAVESP
  208. .SKI 3
  209. *=$0300+60
  210. TBUFFR *=*+192 ;CASSETTE DATA BUFFER
  211. .SKI 3
  212. * =$400
  213. VICSCN *=*+1024
  214. RAMLOC
  215. .SKI 3
  216. .PAG 'DECLARE'
  217. ; I/O DEVICES
  218. ;
  219. * =$D000
  220. VICREG =* ;VIC REGISTERS
  221. .SKI 2
  222. * =$D400
  223. SIDREG =* ;SID REGISTERS
  224. .SKI 2
  225. * =$D800
  226. VICCOL *=*+1024 ;VIC COLOR NYBBLES
  227. .SKI 2
  228. * =$DC00 ;DEVICE1 6526 (PAGE1 IRQ)
  229. COLM ;KEYBOARD MATRIX
  230. D1PRA *=*+1
  231. ROWS ;KEYBOARD MATRIX
  232. D1PRB *=*+1
  233. D1DDRA *=*+1
  234. D1DDRB *=*+1
  235. D1T1L *=*+1
  236. D1T1H *=*+1
  237. D1T2L *=*+1
  238. D1T2H *=*+1
  239. D1TOD1 *=*+1
  240. D1TODS *=*+1
  241. D1TODM *=*+1
  242. D1TODH *=*+1
  243. D1SDR *=*+1
  244. D1ICR *=*+1
  245. D1CRA *=*+1
  246. D1CRB *=*+1
  247. .SKI 2
  248. * =$DD00 ;DEVICE2 6526 (PAGE2 NMI)
  249. D2PRA *=*+1
  250. D2PRB *=*+1
  251. D2DDRA *=*+1
  252. D2DDRB *=*+1
  253. D2T1L *=*+1
  254. D2T1H *=*+1
  255. D2T2L *=*+1
  256. D2T2H *=*+1
  257. D2TOD1 *=*+1
  258. D2TODS *=*+1
  259. D2TODM *=*+1
  260. D2TODH *=*+1
  261. D2SDR *=*+1
  262. D2ICR *=*+1
  263. D2CRA *=*+1
  264. D2CRB *=*+1
  265. .SKI 2
  266. TIMRB =$19 ;6526 CRB ENABLE ONE-SHOT TB
  267. .PAG 'DECLARE'
  268. ;TAPE BLOCK TYPES
  269. ;
  270. EOT =5 ;END OF TAPE
  271. BLF =1 ;BASIC LOAD FILE
  272. BDF =2 ;BASIC DATA FILE
  273. PLF =3 ;FIXED PROGRAM TYPE
  274. BDFH =4 ;BASIC DATA FILE HEADER
  275. BUFSZ =192 ;BUFFER SIZE
  276. ;
  277. ;SCREEN EDITOR CONSTANTS
  278. ;
  279. LLEN =40 ;SINGLE LINE 40 COLUMNS
  280. LLEN2 =80 ;DOUBLE LINE = 80 COLUMNS
  281. NLINES =25 ;25 ROWS ON SCREEN
  282. WHITE =$01 ;WHITE SCREEN COLOR
  283. BLUE =$06 ;BLUE CHAR COLOR
  284. CR =$D ;CARRIAGE RETURN
  285. .END
  286. ;RSR 8/3/80 ADD & CHANGE Z-PAGE
  287. ;RSR 8/11/80 ADD MEMUSS & PLF TYPE
  288. ;RSR 8/22/80 ADD RS-232 ROUTINES
  289. ;RSR 8/24/80 ADD OPEN VARIABLES
  290. ;RSR 8/29/80 ADD BAUD SPACE MOVE RS232 TO Z-PAGE
  291. ;RSR 9/2/80 ADD SCREEN EDITOR VARS&CON 
  292. ;RSR 12/7/81 MODIFY FOR VIC-40