CDC Community

๐Ÿ”น Historical Conservation ๐Ÿ”น

User Tools

Site Tools


plato.source:plaopl:dboot

Table of Contents

DBOOT

Table Of Contents

  • [00008] COMMON DISK BOOT LOADER
  • [00065] LOADER EQUATES
  • [00083] IST TERMINAL EQUATES
  • [00157] VIKING X TERMINAL EQUATES
  • [00179] CTC DEFINITIONS
  • [00233] 5037 CRT CONTROLLER
  • [00257] 8250 KEYBOARD UART DEFINITIONS
  • [00335] 8255 I/O PORT DEFINITIONS
  • [00382] 8250 COMM LINE UART DEFINITIONS
  • [00454] LED LATCH DEFINITIONS
  • [00471] BANK SELECT DEFINITIONS
  • [00498] 8250 PORT A AND B DEFINITIONS
  • [00554] PARALLEL I/O CHANNEL DEFINITIONS
  • [00855] START
  • [00872] BEGIN
  • [01161] LOADER EXEC
  • [01273] RETRY ROUTINE
  • [01340] LOAD FILE FROM DISK
  • [01399] LOADER SUBROUTINE
  • [01503] SUBROUTINES
  • [01566] CHECKSUM ROUTINES
  • [01699] SECURITY MESSAGE
  • [01715] MESSAGE DISPLAY ROUTINES
  • [01774] MESSAGES
  • [01809] IST CHARACTER SET
  • [01910] MESSAGES
  • [02053] LOADER VARIABLES

Source Code

DBOOT.txt
  1. DBOOT
  2. * /--- FILE TYPE = E
  3. * /--- BLOCK TITLE 00 000 82/06/03 13.41
  4. IDENT DKBOOT,ORIGIN
  5. ABS
  6. ORIGIN EQU 4000H
  7. ORG ORIGIN
  8. TITLE COMMON DISK BOOT LOADER
  9. *
  10. *
  11. *
  12. * COMMON DISK BOOT LOADER
  13. *
  14. * (C) COPYRIGHT 1982 'CONTROL 'DATA 'CORPORATION
  15. *
  16. *****
  17. *
  18. * FLEXIBLE DISK LOAD ROUTINE FOR VIKING X, IST2,
  19. * AND IST3 TERMINALS.
  20. *
  21. * VERSION 00
  22. *
  23. * PROGRAMMER T. E. LARSON
  24. *
  25. * 'THIS LOADER IS STORED ON THE FLEXIBLE DISK AND
  26. * LOADED INTO THE TERMINAL MEMORY AT 4000 HEX BY A
  27. * LOAD ROUTINE THAT IS RESIDENT IN THE TERMINAL ROM.
  28. *
  29. * 'THE PURPOSE OF THIS LOADER IS TO LOAD THE TERMINAL
  30. * RESIDENT FROM THE DISK AND PASS CONTROL TO IT.
  31. *
  32. * 'DATA FROM THE FLEXIBLE DISK CONTROLLER IS LOADED
  33. * INTO THE TERMINAL MEMORY BY SECTORS. 'AS EACH
  34. * SECTOR IS STORED, IT IS CHECKSUMED AND VERIFIED
  35. * USING THE SECTOR CHECKSUM FROM THE DISK CONTROLLER.
  36. * 'IF THE SECTOR CHECKSUM IS NOT CORRECT, THE
  37. * LOADER WILL TRY TO RE-READ BLOCK OF DATA FROM THE
  38. * DISK THREE TIMES BEFORE ABORTING AND WILL THEN
  39. * DISPLAY AN ERROR MESSAGE.
  40. *
  41. *
  42. **
  43. *
  44. * FILE NUMBERS OF DISK RECORDS (OLD)
  45. * 3 IST2 RESIDENT
  46. * 4 IST2/3 INTERPRETER
  47. * 5 IST3 RESIDENT
  48. * 6 IST3 ASCII RESIDENT (THE VIKING RESIDENT)
  49. * 7 IST3 ASCII INTERPRETER
  50. * 8 VIKING X CONTROLWARE RESIDENT
  51. *
  52. **
  53. *
  54. * FILE NUMBERS OF DISK RECORDS (NEW)
  55. * 3 IST2 RESIDENT (21/12 BIT PCN)
  56. * 4 IST2/3 INTERPRETER
  57. * 5 IST3 RESIDENT (21/12 BIT PCN)
  58. * 6 IST2/IST3 ASCII/PLATO RESIDENT
  59. * 7 IST3 ASCII INTERPRETER
  60. * 8 VIKING X CONTROLWARE RESIDENT
  61. * 9 IST3 ASCII/GRAPHICS RESIDENT
  62. *
  63. **
  64. * /--- BLOCK LDREQU 00 000 82/03/18 07.55
  65. TITLE LOADER EQUATES
  66. *
  67. * LOADER EQUATES
  68. *
  69. SECTSZ EQU 128 SECTOR SIZE
  70.  
  71. ZSTACK EQU 5000H MICRO PROCESSOR STACK ADDRESS
  72.  
  73. INTADR EQU 5300H INTERPRETER FWA
  74.  
  75. MLWA EQU 7FFFH MEMORY LWA
  76.  
  77. * TERMINAL TYPE EQUATES
  78.  
  79. VIKX EQU 02 VIKING X SUB TYPE
  80. IST3 EQU 01 IST3 SUB TYPE
  81. IST2 EQU 00 IST2 SUB TYPE
  82. * /--- BLOCK ISTEQU 00 000 82/04/16 08.39
  83. TITLE IST TERMINAL EQUATES
  84. *
  85. * IST TERMINAL EQUATES
  86. *
  87. CHARADR EQU 2300H LOAD ADDRESS OF CHARACTER SET
  88. *
  89. BLOCK0 EQU 08E5H FWA OF BLOCK 00 OF RESIDENT.
  90. *
  91. KA EQU 41H KEY CODE FOR THE A KEY
  92. KP EQU 50H KEY CODE FOR THE P KEY
  93. KG EQU 47H KEY CODE FOR THE G KEY
  94. TA EQU 16H TOUCH PANEL CODE FOR A
  95. TP EQU 18H TOUCH PANEL CODE FOR P
  96. TG EQU 14H TOUCH PANEL CODE FOR G
  97. *
  98. LDVAR EQU 22B4H LOADER VARIABLES
  99. CKSUMTBL EQU 22C8H ASCII CHECKSUM TABLE FWA
  100. CHECKSUM EQU 22CAH ASCII CHECKSUM
  101. LOADFLAG EQU 22CBH 3CH = FULL LOAD COMPLETE
  102. RESETFLG EQU 22CCH 3CH = SHORT RESET
  103. MODE EQU 22CDH ASCII RESIDENT OPERATING MODE
  104. LOADINFO EQU 22CEH LOAD PARAMETERS
  105. RUNINFO EQU 22CFH RUN PARAMETERS
  106. CLR EQU 22D0H LAST RESTART STORE
  107. M.LDFILE EQU 22E5H
  108.  
  109. LDSOURCE EQU 0979H LOAD SOURCE
  110. STRADR EQU 097AH INITIAL RESIDENT ADDRESS
  111. FULLDF EQU 08DEH FULL LOAD COMPLETE FLAG
  112. MLWA EQU 7FFFH MEMORY LWA
  113. MESADR0 EQU 99B0H DISPLAY MESSAGE SCREEN ADDRESS
  114. MESADR1 EQU 99C0H DISPLAY MESSAGE SCREEN ADDRESS
  115. MESADR2 EQU 99D0H DISPLAY MESSAGE SCREEN ADDRESS
  116. MESADR3 EQU 96E0H DISPLAY MESSAGE SCREEN ADDRESS
  117. MESADR4 EQU 9720H DISPLAY MESSAGE SCREEN ADDRESS
  118. MESADR5 EQU 99A0H DISPLAY MESSAGE SCREEN ADDRESS
  119. MESADR6 EQU 83B0H DISPLAY MESSAGE SCREEN ADDRESS
  120. MESADR7 EQU 9760H DISPLAY MESSAGE SCREEN ADDRESS
  121. NEXT EQU 16H NEXT KEY CODE
  122.  
  123.  
  124. * /--- BLOCK ISTEQU 00 000 82/03/18 07.44
  125. *
  126. MNTSW EQU 00 MAINTAINENCE SWITCHES
  127. KBDATA EQU 01 KEY BOARD DATA
  128. TPDATA EQU 02 TOUCH PANEL DATA
  129. IDLOW EQU 03 READ LOWER BITS OF ID
  130. IDUP EQU 04 READ UPPER BITS OF ID
  131. EXTDATI EQU 05 INPUT EXTERNAL DATA
  132. EXTSTAT EQU 06 INPUT EXTERNAL STATUS
  133. SYSSTAT EQU 07 TERMINAL SYSTEM STATUS
  134. CLADATA EQU 08 CLA DATA
  135. *
  136. PNLLTS EQU 00 PANEL LIGHTS
  137. TXLOW EQU 01 TRANSMIT LOWER BITS
  138. TXUP EQU 02 TRANSMIT UPPER BITS
  139. BLKERS EQU 03 SCREEN BULK ERASE
  140. INTMSK EQU 04 PROCESSOR INTERRUPT MASK
  141. ALARM EQU 05 SOUND AUDIBLE ALARM
  142. EXTDATO EQU 06 OUTPUT EXTERNAL DATA
  143. EXTCNTL EQU 07 OUTPUT EXTERNAL CONTROL
  144. *
  145. * TERMINAL SYSTEM STATUS
  146. *
  147. PCRDY EQU 01 PLATO CHARACTER READY
  148. HWFLG EQU 02 HARDWARE FLAG (POWER-ON/RESET)
  149. PCREQ EQU 04 PLATO CHARACTER REQUEST
  150. KDRDY EQU 08 KEYBOARD DATA READY
  151. TDRDY EQU 10H TOUCH PANEL DATA READY
  152. TMOUT EQU 20H I/O TIME-OUT
  153. RESET EQU 40H RESET SWITCH
  154. BERAS EQU 80H BULK ERASE IN PROGRESS
  155.  
  156. * /--- BLOCK VXEQU 00 000 82/03/18 07.50
  157. TITLE VIKING X TERMINAL EQUATES
  158. * * * * * * * * * * * * * * * * * * * *
  159. *
  160. * I/O FUNCTION EQUATES
  161. *
  162. * * * * * * * * * * * * * * * * * * * *
  163.  
  164. * * * * * * * * * * * * * * * * * * * *
  165. *
  166. * 8250 UART REGISTERS
  167. *
  168. * * * * * * * * * * * * * * * * * * * *
  169. UDATA EQU 00 8250 TRANSMIT/RECEIVE DATA
  170. UINTR EQU 01 8250 INTERRUPT ENABLE REGISTER
  171. UINTI EQU 02 8250 INTERRUPT ID REGISTER
  172. ULCLR EQU 03 8250 LINE CONTROL REGISTER
  173. UMCLR EQU 04 8250 MODEM CONTROL REGISTER
  174. ULSTR EQU 05 8250 LINE STATUS REGISTER
  175. UMSTR EQU 06 8250 MODEM STATUS REGISTER
  176. UBRLL EQU 00 8250 BAUD RATE DIVISOR LATCH L
  177. UBRLU EQU 01 8250 BAUD RATE DIVISOR LATCH U
  178. * /--- BLOCK VXEQU 00 000 82/01/12 13.12
  179. TITLE CTC DEFINITIONS
  180. * * * * * * * * * * * * * * * * * * * *
  181. *
  182. * Z80-CTC
  183. *
  184. * THE Z80-CTC HAS FOUR CHANNELS. CHANNEL 3
  185. * IS USED FOR THE RESIDENT 17.5 MSEC CLOCK.
  186. * CHANNELS 1 AND 2 ARE NOT AVAILABLE AS THEY
  187. * ARE USED AS THE TRANSMIT CLOCK FOR THE 8 BIT
  188. * COMM PORT. CHANNEL 0 IS NOT USED.
  189. *
  190. * * * * * * * * * * * * * * * * * * * *
  191.  
  192. TIMER EQU 00H BASE ADDRESS OF CTC
  193.  
  194. TIMER0 EQU TIMER+00 CHANNEL 0
  195. TIMER1 EQU TIMER+01 CHANNEL 1
  196. TIMER2 EQU TIMER+02 CHANNEL 2
  197. TIMER3 EQU TIMER+03 CHANNEL 3
  198. TC EQU 205 TIME CONSTANT FOR 8.75 MSEC
  199. TRESET EQU 03 CONTROL BYTE FOR TIMER RESET
  200. TSETUP EQU 0B7H CONTROL BYTE TO,
  201. * RESET TIMER, TC FOLLOWS,
  202. * PRESCALER = 256, TIMER MODE,
  203. * ENABLE INTERRUPT.
  204.  
  205. * TIME CONSTANT (TC) FOLLOWS CONTROL BYTE IF
  206. * BIT 2 OF CONTROL BYTE SET.
  207. * TIMER MODE;
  208. * INPUT CLOCK = 6 MHZ
  209. * PRESCALER (P) USED (16 OR 256)
  210. * PERIOD = CLOCK X P X TC
  211. * COUNTER MODE;
  212. * INPUT CLOCK = 1.8432 MHZ
  213. * PRESCALER NOT USED
  214. * PERIOD = CLOCK X TC
  215. *
  216. * OUTPUT TO Z80-CTC
  217. * BIT 0 0 = VECTOR, 1 = CONTROL
  218. * CONTROL
  219. * BIT 1 0 = CONTINUE, 1 = RESET
  220. * BIT 2 0 = NO TC, 1 = TC FOLLOWS
  221. * BIT 3 0 = AUTO TRIG., 1 = CLOCK TRIG
  222. * BIT 4 0 = FALL EDGE, 1 = RISING EDGE
  223. * BIT 5 0 = PRESCALER 16, 1 = 256
  224. * BIT 6 0 = TIMER MODE, 1 = COUNTER
  225. * BIT 7 0 = DISABLE INT., 1 = ENABLE
  226. * VECTOR (LOWER 8 BITS OF INT. VECTOR)
  227. * BIT 1, 2 00 = CHANNEL 0
  228. * 01 = CHANNEL 1
  229. * 10 = CHANNEL 2
  230. * 11 = CHANNEL 3
  231. * BITS 3 - 7 ADDRESS BITS
  232. * /--- BLOCK VXEQU 00 000 81/12/08 10.15
  233. TITLE 5037 CRT CONTROLLER
  234. * * * * * * * * * * * * * * * * * * * *
  235. *
  236. * 5037 CRT CONTROLLER
  237. *
  238. * * * * * * * * * * * * * * * * * * * *
  239.  
  240. CRT EQU 10H BASE ADDRESS OF CRT CONTROLLER
  241.  
  242. CRTRG0 EQU CRT+0 HORIZONTAL LINE COUNT
  243. CRTRG1 EQU CRT+1 SYNC WIDTH AND DELAY
  244. CRTRG2 EQU CRT+2 SCANS PER DATA ROW
  245. CRTRG3 EQU CRT+3 NUMBER OF LINES
  246. CRTRG4 EQU CRT+4 SCANS PER LINE
  247. CRTRG5 EQU CRT+5 NUMBER OF SCANS TO TOP LINE
  248. CRTRG6 EQU CRT+6 LAST LINE
  249. CRTRDY EQU CRT+8 READ CURSOR Y COORDINATE
  250. XRTRDX EQU CRT+9 READ CURSOR X COORDINATE
  251. CRTRST EQU CRT+10 RESET
  252. CRTCRL EQU CRT+11 SCROLL
  253. CRTLDX EQU CRT+12 LOAD CHARACTER COUNT
  254. CRTLDY EQU CRT+13 LOAD LINE COUNT
  255. CRTST EQU CRT+14 START CRT
  256. * /--- BLOCK VXEQU 00 000 82/01/13 08.50
  257. TITLE 8250 KEYBOARD UART DEFINITIONS
  258. * * * * * * * * * * * * * * * * * * * *
  259. *
  260. * 8250 KEYBOARD UART
  261. *
  262. * * * * * * * * * * * * * * * * * * * *
  263.  
  264. UKYBD EQU 20H BASE ADDRESS OF KEYBOARD UART
  265.  
  266. * KEYBOARD TRANSMIT DATA REGISTER (OUTPUT)
  267. * EQU UKYBD+UDATA
  268. LCKLTO EQU 00H TURN OFF LOCK LIGHT ON KYBD
  269.  
  270. * KEYBOARD RECEIVE DATA REGISTER (INPUT)
  271. * EQU UKYBD+UDATA
  272.  
  273. * KEYBOARD INTERRUPT ENABLE REGISTER (OUTPUT)
  274. * EQU UKYBD+UINTR
  275.  
  276. KBERXI EQU 01H ENABLE RECEIVE DATA READY INT
  277. KBETXI EQU 02H ENABLE TRANSMIT DATA REQ INT
  278. KBELSI EQU 04H ENABLE LINE STATUS INTERRUPT
  279. KBEMSI EQU 08H ENABLE MODEM STATUS INTERRUPT
  280.  
  281. * KEYBOARD INTERRUPT ID REGISTER (INPUT)
  282. * EQU UKYBD+UINTI
  283.  
  284. * KEYBOARD LINE CONTROL REGISTER (OUTPUT)
  285. * EQU UKYBD+ULCLR
  286.  
  287. KBWL5 EQU 00H WORD LENGTH 5 BITS
  288. KBWL6 EQU 01H WORD LENGTH 6 BITS
  289. KBWL7 EQU 02H WORD LENGTH 7 BITS
  290. KBWL8 EQU 03H WORD LENGTH 8 BITS
  291. KBSB1 EQU 00H 1 STOP BIT
  292. KBSB2 EQU 04H 2 STOP BITS
  293. KBPEN EQU 08H ENABLE PARITY
  294. KBPEV EQU 10H EVEN PARITY
  295. KBDLE EQU 80H BAUD RATE DIVITOR LATCH
  296.  
  297. * MODEM CONTROL REGISTER (OUTPUT)
  298. * EQU UKYBD+UMCLR
  299.  
  300. FCBIT2 EQU 01H FOREIGN CHARACTER ROM BIT 2
  301. ALARMH EQU 02H ALARM HIGH
  302. FCBIT1 EQU 04H FOREIGN CHARACTER ROM BIT 1
  303. FCBIT0 EQU 08H FOREIGN CHARACTER ROM BIT 0
  304. KBLOOP EQU 10H PLACE UART IN LOOP BACK MODE
  305.  
  306. * KEYBOARD LINE STATUS REGISTER (INPUT)
  307. * EQU UKYBD+ULSTR
  308.  
  309. KBDR EQU 01H DATA READY
  310. KBOR EQU 02H OVERRUN ERROR
  311. KBPE EQU 04H PARITY ERROR
  312. KBFE EQU 08H FRAMING ERROR
  313. KBBK EQU 10H BREAK RECEIVED
  314. KBTXHE EQU 20H TRANSMIT HOLDING REG EMPTY
  315. KBTXSE EQU 40H TRANSMIT SHIFT REG EMPTY
  316.  
  317. * MODEM STATUS REGISTER (INPUT)
  318. * EQU UKYBD+UMSTR
  319.  
  320. LPSW EQU 10H LOOP BACK SWITCH ACTIVE
  321. RSTSW EQU 20H RESET SWITCH ACTIVE
  322. ROMPK EQU 40H ROM PACK INSTALLED
  323. BATLOW EQU 80H BATTERY LOW
  324.  
  325. * BAUD RATE DIVISOR LATCH LOWER (OUTPUT)
  326. * EQU UKYBD+UBRLL
  327.  
  328. KBBRL EQU 0CH BAUD RATE LOWER VALUE (9600)
  329.  
  330. * BAUD RATE DIVISOR LATCH UPPER (OUTPUT)
  331. * EQU UKYBD+UBRLU
  332.  
  333. KBBRU EQU 00H BAUD RATE UPPER VALUE (9600)
  334. * /--- BLOCK VXEQU 00 000 81/11/17 09.12
  335. TITLE 8255 I/O PORT DEFINITIONS
  336. * * * * * * * * * * * * * * * * * * * *
  337. *
  338. * 8255 I/O PORTS
  339. *
  340. * * * * * * * * * * * * * * * * * * * *
  341.  
  342. PORT EQU 30H BASE ADDRESS OF 8255 I/O PORTS
  343.  
  344. PORTA EQU PORT+00 ADDRESS OF PORT A (OUTPUT)
  345.  
  346. LPSTRB EQU 01H LIGHT PEN STROBE
  347. LPHIT EQU 02H LIGHT PEN HIT
  348. INTCLK EQU 40H INTERNAL CLOCK ENABLE
  349. EVIDEO EQU 80H ENABLE VIDEO
  350.  
  351. PORTB EQU PORT+01 ADDRESS OF PORT B (OUTPUT)
  352. * (INTERRUPT MASK)
  353.  
  354. * 01 COMM PORT INTERRUPT
  355. * 02 21/12 BIT PCN INTERRUPT
  356. * 04 DUAL SERIAL PORT
  357. * 08 PARALLEL PORT
  358. * 10 TOUCH PANEL
  359. * 20 KEYBOARD
  360. * 40 TIMER
  361. * 80 MEMORY PARITY ERROR
  362.  
  363. PORTC EQU PORT+03 ADDRESS OF PORT C (OUTPUT)
  364.  
  365. ALRON EQU 00H ALARM ON
  366. ALROF EQU 01H ALARM OFF
  367. BLKCR EQU 02H BLINK CURSOR
  368. SLDCR EQU 03H SOLID CURSOR
  369. EBLINK EQU 04H ENABLE BLINK
  370. DBLINK EQU 05H DISABLE BLINK
  371. LN80 EQU 06H 80 CHARACTERS PER LINE
  372. LN132 EQU 07H 132 CHARACTERS PER LINE
  373. NORBK EQU 08H NORMAL BACKGROUND
  374. INVBK EQU 09H INVERSE BACKGROUND
  375. UDCR EQU 0AH UNDERLINE CURSOR
  376. BXCR EQU 0BH SOLID BOX CURSOR
  377. PLATO EQU 0CH ENABLE PLATO CHARACTER GEN
  378. RAMGEN EQU 0DH ENABLE RAM CHARACTER GEN
  379. RFRSDS EQU 0EH DISABLE REFRESH
  380. RFRSEN EQU 0FH ENABLE REFRESH
  381. * /--- BLOCK VXEQU 00 000 81/11/18 07.22
  382. TITLE 8250 COMM LINE UART DEFINITIONS
  383. * * * * * * * * * * * * * * * * * * * *
  384. *
  385. * 8250 COMM LINE UART
  386. *
  387. * * * * * * * * * * * * * * * * * * * *
  388.  
  389. UCOMM EQU 40H BASE ADDRESS OF COMM LINE UART
  390.  
  391. * COMM TRANSMIT DATA (OUTPUT)
  392. * EQU UCOMM+UDATA
  393.  
  394. * COMM RECEIVE DATA (INPUT)
  395. * EQU UCOMM+UDATA
  396.  
  397. * COMM INTERRUPT ENABLE REGISTER (OUTPUT)
  398. * EQU UCOMM+UINTR
  399.  
  400. CERXI EQU 01H ENABLE RECEIVE DATA READY INT
  401. CETXI EQU 02H ENABLE TRANSMIT DATA REQ INT
  402. CELSI EQU 04H ENABLE LINE STATUS INTERRUPT
  403. CEMSI EQU 08H ENABLE MODEM STATUS INTERRUPT
  404.  
  405. * COMM INTERRUPT ID REGISTER (INPUT)
  406. * EQU UCOMM+UINTI
  407.  
  408. * COMM LINE CONTROL REGISTER (OUTPUT)
  409. * EQU UCOMM+ULCLR
  410.  
  411. CWL7 EQU 02H WORD LENGTH 7 BITS
  412. CWL8 EQU 03H WORD LENGTH 8 BITS
  413. CSB1 EQU 00H 1 STOP BIT
  414. CSB2 EQU 04H 2 STOP BITS
  415. CPEN EQU 08H ENABLE PARITY
  416. CPEV EQU 10H EVEN PARITY
  417. CBRK EQU 40H SEND BREAK SIGNAL
  418. CDLE EQU 80H DIVISOR LATCH ENABLE
  419.  
  420. * COMM MODEM CONTROL REGISTER (OUTPUT)
  421. * EQU UCOMM+UMCLR
  422.  
  423. CDTR EQU 01H DTR ON
  424. CRTS EQU 02H RTS ON
  425. CSRTS EQU 04H SECONDARY RTS ON
  426. COUT2 EQU 08H NOT USED
  427. CLOOP EQU 10H PLACE UART IN LOOP BACK MODE
  428.  
  429. * COMM LINE STATUS REGISTER (INPUT)
  430. * EQU UCOMM+ULSTR
  431.  
  432. CDR EQU 01H DATA READY
  433. CORE EQU 02H OVERRUN ERROR
  434. CPE EQU 04H PARITY ERROR
  435. CFE EQU 08H FRAMING ERROR
  436. CBK EQU 10H BREAK RECEIVED
  437. CTXHE EQU 20H TRANSMIT HOLDING REG EMPTY
  438. CTXSE EQU 40H TRANSMIT SHIFT REG EMPTY
  439.  
  440. * COMM MODEM STATUS REGISTER (INPUT)
  441. * EQU UCOMM+UMSTR
  442.  
  443. CCTS EQU 10H CTS ON
  444. CDSR EQU 20H DSR ON
  445. CRI EQU 40H RING INDICATOR ON
  446. CCO EQU 80H CARRIER ON
  447.  
  448. * COMM BAUD RATE DIVISOR LATCH LOWER (OUTPUT)
  449. * EQU UCOMM+UBRLL
  450.  
  451. * COMM BAUD RATE DIVISOR LATCH UPPER (OUTPUT)
  452. * EQU UCOMM+UBRLU
  453. * /--- BLOCK VXEQU 00 000 82/03/31 13.07
  454. TITLE LED LATCH DEFINITIONS
  455. * * * * * * * * * * * * * * * * * * * *
  456. *
  457. * LED LATCH
  458. *
  459. * * * * * * * * * * * * * * * * * * * *
  460.  
  461. LEDOUT EQU 50H BASE ADDRESS OF LED LATCH
  462.  
  463. LTERR EQU 01H ERROR
  464. LTALRT EQU 02H ALERT
  465. LTKBLK EQU 04H KEYBOARD LOCKED
  466. LTMSG EQU 08H MESSAGE WAITING
  467. LTDSR EQU 10H DSR ON
  468. LTPRG1 EQU 20H PROGRAMMABLE IND. 1
  469. LTPRG2 EQU 40H PROGRAMMABLE IND. 2
  470. LTPRG3 EQU 80H PROGRAMMABLE IND. 3
  471. TITLE BANK SELECT DEFINITIONS
  472. * * * * * * * * * * * * * * * * * * * *
  473. *
  474. * BANK SELECT EQUATES
  475. *
  476. * * * * * * * * * * * * * * * * * * * *
  477.  
  478. BANK EQU 70H ADDRESS OF BANK SELECT REG.
  479.  
  480. B0 EQU 00 BANK 0 ROM, BLOCK 0
  481. B1 EQU 02 BANK 1 RAM, BLOCK 0
  482. B2 EQU 0CH BANK 2 RAM, BLOCK 4
  483. B3 EQU 10H BANK 3 RAM, BLOCK 8
  484. B4 EQU 00 BANK 4 RAM, BLOCK C
  485. B5 EQU 00 BANK 5 ROM PACK, BLOCK 8
  486. B6L EQU 00 BANK 6 NVM, BLOCK 4
  487. B6U EQU 40H BANK 6 NVM, BLOCK C
  488. B7L EQU 01 BANK 7 GRAPHICS, BLOCK 0
  489. B7U EQU 30H BANK 7 GRAPHICS, BLOCK 8
  490. B8L EQU 04 BANK 8 GRAPHICS, BLOCK 4
  491. B8U EQU 0C0H BANK 8 GRAPHICS, BLOCK C
  492. *
  493. * LD A,B7L+B8L+B3+B4
  494. * OUT (BANK),A SELECTS LOWER GRAPHICS
  495. *
  496. ROMPACK EQU 8000H FWA OF ROM PACK
  497. * /--- BLOCK VXEQU 00 000 82/03/18 07.36
  498. TITLE 8250 PORT A AND B DEFINITIONS
  499. * * * * * * * * * * * * * * * * * * * *
  500. *
  501. * 8250 SERIAL PORTS A AND B
  502. *
  503. * * * * * * * * * * * * * * * * * * * *
  504.  
  505. USERA EQU 80H BASE ADDRESS OF SERIAL CHAN A
  506. USERB EQU 90H BASE ADDRESS OF SERIAL CHAN B
  507.  
  508. * SERIAL CHANNEL TRANSMIT DATA REGISTER (OUTPUT)
  509. * EQU USERA+UDATA CHANNEL A
  510. * EQU USERB+UDATA CHANNEL B
  511.  
  512. * SERIAL CHANNEL RECEIVE DATA REGISTER (INPUT)
  513. * EQU USERA+UDATA CHANNEL A
  514. * EQU USERB+UDATA CHANNEL B
  515.  
  516. * SERIAL CHANNEL INTERRUPT ENABLE REGISTER (OUTPUT)
  517. * EQU USERA+UINTR CHANNEL A
  518. * EQU USERB+UINTR CHANNEL B
  519.  
  520. * SERIAL CHANNEL INTERRUPT ID REGISTER (INPUT)
  521. * EQU USERA+UINTI CHANNEL A
  522. * EQU USERB+UINTI CHANNEL B
  523.  
  524. * SERIAL CHANNEL LINE CONTROL REGISTER (OUTPUT)
  525. * EQU USERA+ULCLR CHANNEL A
  526. * EQU USERB+ULCLR CHANNEL B
  527.  
  528. * SERIAL CHANNEL MODEM CONTROL REGISTER (OUTPUT)
  529. * EQU USERA+UMCLR CHANNEL A
  530. * EQU USERB+UMCLR CHANNEL B
  531.  
  532. * SERIAL CHANNEL LINE STATUS REGISTER (INPUT)
  533. * EQU USERA+ULSTR CHANNEL A
  534. * EQU USERB+ULSTR CHANNEL B
  535.  
  536. * SERIAL CHANNEL MODEM STATUS REGISTER (INPUT)
  537. * EQU USERA+UMSTR CHANNEL A
  538. * EQU USERB+UMSTR CHANNEL B
  539.  
  540. * SERIAL CHANNEL BAUD RATE DIVISOR LATCH LOWER (OUTPUT)
  541. * EQU USERA+UBRLL CHANNEL A
  542. * EQU USERB+UBRLL CHANNEL B
  543.  
  544. * SERIAL CHANNEL BAUD RATE DIVISOR LATCH UPPER (OUTPUT)
  545. * EQU USERA+UBRLU CHANNEL A
  546. * EQU USERB+UBRLU CHANNEL B
  547.  
  548. *
  549. * PRINTER MODEM STATUS REGISTER
  550. * 10 PRINTERS RTS
  551. * 20 PRINTERS DTR
  552. * 40 PORT TEST ENABLED
  553. * 80 PRINTERS 3/4 FULL
  554. TITLE PARALLEL I/O CHANNEL DEFINITIONS
  555. * * * * * * * * * * * * * * * * * * * *
  556. *
  557. * PARALLEL CHANNEL
  558. *
  559. * * * * * * * * * * * * * * * * * * * *
  560.  
  561. PCHAN EQU 0A0H DEVICE ADDRESSES A0-BF HEX
  562. PSTAT EQU 88H PARALLEL PORT STATUS
  563. TIMOUT EQU 01 CHANNEL TIME-OUT
  564. INTPND EQU 02 INTERRUPT PENDING
  565. * BIT 0 = CHANNEL TIME OUT, (50 MSEC)
  566. * BIT 1 = EXTERNAL INTERRUPT
  567. * BIT 2 = EXTERNAL FIXED DISK INTERRUPT
  568. * /--- BLOCK VXEQU 00 000 82/03/18 08.40
  569. SPACE 4
  570. * GRAPHICS PRINTER EQUATES
  571.  
  572. DATAFCN EQU PCHAN+0AH 000NNNN0 PRINTER DATA ADDRESS
  573. CNTLFCN EQU PCHAN+0BH 000NNNN1 PRINTER CTRL ADDRESS
  574.  
  575. MRESET0 EQU 00H RESET INTERFACE
  576. MRESET1 EQU 01H RESET PTR
  577. SECSTAT EQU 09H REQUEST SECONDARY STATUS.
  578. READID EQU 08H READ DEVICE ID.
  579. STIMER EQU 0EH START TIMER.
  580. *
  581. C.ENQ EQU 05H DOT ROW PREAMBLE
  582. C.LF EQU 0AH LINE / ROW FEED
  583. C.FF EQU 0CH FORM FEED
  584. SPACE 4
  585. * * * * * * * * * * * * * * * * * * * *
  586. *
  587. * GRAPHICS EQUATES
  588. *
  589. * * * * * * * * * * * * * * * * * * * *
  590.  
  591. BULKW EQU 0FCH GRAPHICS BULK WRITE
  592. UNBLNKG EQU 0FDH UNBLANK GRAPHICS VIDEO
  593. SEL512 EQU 0FEH SELECT 512 LINES
  594. BLNKG EQU 0FFH BLANK GRAPHICS VIDEO
  595. VTPDAT EQU 0FCH INPUT TOUCH PANEL DATA
  596. GSTAT EQU 0FDH GRAPHICS STATUS
  597. * BIT 0 = BULK WRITE BUSY
  598. * BIT 1 = TOUCH PANEL DATA READY
  599. SEL480 EQU 0FEH INPUT SELECTS 480 LINES
  600.  
  601. R.SETDE EQU 008AH SET CURSOR TO (DE)
  602. R.DSTRNG EQU 0063H DISPLAY DATA STRING
  603. * /--- BLOCK DISKEQU 00 000 82/03/18 07.30
  604. *
  605. * EQUATE TABLES
  606. *
  607. * DISK EQUATES
  608. *
  609. * DISK I/O FUNCTION CODES
  610. DCNTL EQU 0AFH DISK CONTROL, WRITE
  611. DSTAT EQU 0AFH DISK STAT, READ
  612. DDATA EQU 0AEH DISK DATA, READ AND WRITE
  613. *
  614. * DISK I/O COMMANDS
  615. DREAD EQU 00 READ SECTORS
  616. DWRITE EQU 02 WRITE SECTORS
  617. DID EQU 04 READ DISK CONTROLLER ID
  618. DLDRES EQU 06 LOAD TERMINAL RESIDENT
  619. DRESET EQU 08 DISK RESET
  620. RDFILE EQU 12 READ DISK FILE
  621. *
  622. * DISK STATUS
  623. IDLE EQU 40H CONTROLLER IDLE STATUS
  624. BUSY EQU 44H CONTROLLER BUSY STATUS
  625. SCOMD EQU 48H WAITING FOR CMD COMPLIMENT
  626. SRXFER EQU 4AH READY FOR READ TRANSFER
  627. SWXFER EQU 4CH READY FOR WRITE TRANSFER
  628. SDONE EQU 50H COMMAND PROCESSING COMPLETE.
  629. *
  630. * 'COMMAND ERRORS
  631. SCODD EQU 80H ODD-NUMBERED COMMAND RECEIVED.
  632. SCOOR EQU 81H COMMAND OUT OF RANGE.
  633. SCCOMP EQU 82H BAD COMMAND COMPLEMENT.
  634. *
  635. * 'PARAMETER ERRORS
  636. SDRIVE EQU 83H BAD DRIVE NUMBER.
  637. SSIDE EQU 84H BAD SIDE NUMBER.
  638. STRK EQU 85H BAD TRACK NUMBER.
  639. SSECT EQU 86H BAD SECTOR NUMBER.
  640. SDEN EQU 87H BAD DENSITY.
  641. SPSUM EQU 88H PARAMETER CHECKSUM FAILURE.
  642. SNSCT EQU 89H BAD NUMBER OF SECTORS.
  643. *
  644. * 'SEEK / RESTORE ERRORS
  645. SSCRC EQU 90H SEEK CRC ERROR.
  646. SSEEK EQU 91H SEEK ERROR.
  647. SSTIME EQU 92H SEEK TIMEOUT.
  648. SREST EQU 93H RESTORE TIMEOUT.
  649. *
  650. * 'READ/WRITE ERRORS
  651. SNRDY EQU 0ADH DESIRED DRIVE NOT READY.
  652. SSGL EQU 0AEH ATTEMPTED ACCESS TO SIDE 1
  653. *
  654. * 'READ ERRORS
  655. SRTIME EQU 0B0H DISK READ TIMEOUT.
  656. SRDATA EQU 0B1H LOST DATA.
  657. SRCRC EQU 0B2H CRC ERROR.
  658. SRRNF EQU 0B3H RECORD NOT FOUND.
  659. SRTTO EQU 0B4H TERMINAL TRANSFER TIMEOUT.
  660. SREOS EQU 0B5H TRIED TO READ PAST END OF SIDE.
  661. *
  662. * 'WRITE ERRORS
  663. SWTTO EQU 0C0H TERMINAL TRANSFER TIMEOUT.
  664. SWTIME EQU 0C1H DISK WRITE TIMEOUT.
  665. SWDATA EQU 0C2H LOST DATA.
  666. SWCRC EQU 0C3H CRC ERROR.
  667. SWRNF EQU 0C4H RECORD NOT FOUND.
  668. SWFAULT EQU 0C5H DISK WRITE FAULT.
  669. SWPROT EQU 0C6H DISK IS WRITE-PROTECTED.
  670. SWCSUM EQU 0C7H CHECKSUMS DO NOT MATCH.
  671. *
  672. * /--- BLOCK VIKINGP 00 000 81/10/20 10.56
  673. * * * * * * * * * * * * * * * * * * * *
  674. *
  675. * NVM CONFIGURATION INFORMATION
  676. * TERMINAL INSTALLATION PARAMETERS
  677. * CMOS BANK 6
  678. *
  679. * X01F CHECKSUM
  680. * X020 MODE 1 PARAMETERS
  681. * X040 MODE 2 PARAMETERS
  682. * X060 MODE 3 PARAMETERS
  683. * X080 MODE 4 PARAMETERS
  684. * X0A0 MODE 5 PARAMETERS
  685. * X0C0 MODE 6 PARAMETERS
  686. * X0E0 MODE 3 NAME
  687. * X0E8 MODE 4 NAME
  688. * X0F0 MODE 5 NAME
  689. * X0F8 MODE 6 NAME
  690. *
  691. * MODE BYTE 1 X000
  692. * 01 MODE ENABLE
  693. * 02 SECURITY ENABLE
  694. * 04 OPERTOR SELECT SOURCE/FILE
  695. * 08 LOAD ENABLE
  696. * MODE BYTE 2 X001
  697. * 01 LOAD FROM DISK
  698. * 02 USE INTERNAL 1200 BAUD MODEM
  699. * 04 CURRENT LOOP ENABLE
  700. * 08 AUTO DIAL
  701. * MODE BYTE 3 X002
  702. * 01 HOST 8 BITS
  703. * 02 HOST PARITY ENABLE
  704. * 04 HOST PARITY EVEN
  705. * 08 HOST 2 STOP BITS
  706. * MODE BYTE 4 X003
  707. * 01 DTR SWITCHED
  708. * 02 RTS SWITCHED
  709. * 04 REPEAT DISABLED
  710. * 08 DATA ONLY OPERATION
  711. * MODE BYTE 5 X004
  712. * 01 HOME LOWER LEFT
  713. * 02 AUTO LINE FEED ENABLE
  714. * 04 PACING ENABLE
  715. * 08 BIAS ENABLED
  716. * MODE BYTE 6 X005
  717. * 01 NOT USED
  718. * 02 NOT USED
  719. * 04 NOT USED
  720. * 08 NOT USED
  721. ****
  722. * OPERATER PARAMETERS
  723. ****
  724. * OPERATOR BYTE 1 X006
  725. * 01 LOCAL
  726. * 02 PRINTER SELECTED
  727. * 04 MARGIN ALERT ENABLED
  728. * 08 ALERT LOUD
  729. * OPERATOR BYTE 2 X007
  730. * 01 SHIFT LOCK
  731. * 02 NOT USED
  732. * 04 ROLL SCREEN
  733. * 08 NATIVE MODE / LARGE CYBER
  734. * OPERATOR BYTE 3 X008
  735. * 01 BACKGROUND LIGHT
  736. * 02 CURSOR BOX
  737. * 04 CURSOR SOLID ON
  738. * 08 NOT USED
  739. * /--- BLOCK VIKINGP 00 000 81/10/28 08.25
  740. * OPERATOR BYTE 4 X009
  741. * 01 FULL DUPLEX
  742. * 02 132 CHARACTERS PER LI
  743. * 04 30 LINES
  744. * 08 TRANSPARENT
  745. * AUTO DIAL NUMBER 12 BYTES X00A
  746. * DEFAULT FILE 2 BYTES X016
  747. * TRANSMIT BAUD 1 BYTE X018
  748. * RECEIVE BAUD 1 BYTE X019
  749. * SECURITY CODE 1 BYTE X01A
  750. ****
  751. * TERMINAL PARAMETERS
  752. ****
  753. * TERMINAL BYTE 1 X01B
  754. * 01 64K RAM OPTION
  755. * 02 TOUCH PANEL OPTION
  756. * 04 DUAL SERIAL OPTION
  757. * 08 GRAPHIC PRINTER OPTION
  758. * TERMINAL BYTE 2 X01C
  759. * 01 FLEXIBLE DISK OPTION
  760. * 02 21/12 BIT PCN OPTION
  761. * 04 INTERNAL 1200 BAUD MODEM
  762. * 08 ISO 3243 KEYBOARD OPTION
  763. * TERMINAL BYTE 3 X01C
  764. * 01 NOT USED
  765. * 02 NOT USED
  766. * 04 NOT USED
  767. * 08 NOT USED
  768. * TERMINAL BYTE 4 X01D
  769. * 01 AUTO SELECT ENABLE
  770. * 02 50 HZ POWER SOURCE
  771. * 04 NOT USED
  772. * 08 NOT USED
  773. * TERMINAL BYTE 5 X01E
  774. * 01 NOT USED
  775. * 02 NOT USED
  776. * 04 NOT USED
  777. * 08 NOT USED
  778. * TERMINAL BYTE 6 X01F
  779. * 01 NOT USED
  780. * 02 NOT USED
  781. * 04 NOT USED
  782. * 08 NOT USED
  783. * SCREEN MOVE X DELTA X020
  784. * SCREEN MOVE Y DELTA 0-7 X021
  785. * LANGUAGE 0-7
  786. * TERMINAL ID 0000-FFFF
  787. * CHANNEL A PARAMETERS
  788. * 01 2 STOP BITS
  789. * 02 PARITY EVEN
  790. * 04 PARITY DISABLED
  791. * 08 BI-DIRECTIONAL PORT
  792. * CHANNEL A BAUD RATE 0-F
  793. * CHANNEL B PARAMETERS
  794. * CHANNEL B BAUD RATE 0-F
  795. *
  796. * * * * * * * * * * * * * * * * * * * *
  797. * /--- BLOCK VIKINGP 00 000 81/10/20 08.54
  798.  
  799. * * * * * * * * * * * * * * * * * * * *
  800. *
  801. * I/O FUNCTION CODES
  802. *
  803. * * * * * * * * * * * * * * * * * * * *
  804.  
  805. * 00 Z80B TIMER-0
  806. * 01 Z80B TIMER-1
  807. * 02 Z80B TIMER-2
  808. * 03 Z80B TIMER-3
  809. * 10 CRT 5037 CRT CONTROLLER LOAD CONTROL REG 0
  810. * 11 CRT 5037 CRT CONTROLLER LOAD CONTROL REG 1
  811. * 12 CRT 5037 CRT CONTROLLER LOAD CONTROL REG 2
  812. * 13 CRT 5037 CRT CONTROLLER LOAD CONTROL REG 3
  813. * 14 CRT 5037 CRT CONTROLLER LOAD CONTROL REG 4
  814. * 15 CRT 5037 CRT CONTROLLER LOAD CONTROL REG 5
  815. * 16 CRT 5037 CRT CONTROLLER LOAD CONTROL REG 6
  816. * 18 CRT 5037 CRT CONTROLLER READ CURSOR LINE ADDR
  817. * 19 CRT 5037 CRT CONTROLLER READ CURSOR CHAT ADDR
  818. * 1A CRT 5037 CRT CONTROLLER RESET
  819. * 1B CRT 5037 CRT CONTROLLER UP SCROLL
  820. * 1C CRT 5037 CRT CONTROLLER LOAD CURSOR CHAR ADDR
  821. * 1D CRT 5037 CRT CONTROLLER LOAD CURSOR LINE ADDR
  822. * 1E CRT 5037 CRT CONTROLLER START TIMING CHAIN
  823. * 20 KEYBOARD UART 8250 DLAB=0 READ RX BUFFER
  824. * 20 KEYBOARD UART 8250 DLAB=0 TX HOLDING REG
  825. * 21 KEYBOARD UART 8250 DLAB=0 INTERRUPT ENABLE
  826. * 22 KEYBOARD UART 8250 INTERRUPT ID REG
  827. * 23 KEYBOARD UART 8250 LINE CONTROL REG
  828. * 24 KEYBOARD UART 8250 MODEM CONTROL REG
  829. * 25 KEYBOARD UART 8250 LINE STATUS REG
  830. * 26 KEYBOARD UART 8250 MODEM STATUS REG
  831. * 27 KEYBOARD UART 8250 NOT USED
  832. * 20 KEYBOARD UART 8250 DLAB=1 DIVISOR LATCH LSB
  833. * 21 KEYBOARD UART 8250 DLAB=1 DIVISOR LATCH MSB
  834. * 30 8255 I/O EXPANDER PORT A
  835. * 31 8255 I/O EXPANDER PORT B
  836. * 32 8255 I/O EXPANDER PORT C
  837. * 33 8255 I/O EXPANDER CONTROL
  838. * 40 COMM UART 8250 DLAB=0, READ RX BUFFER
  839. * 40 COMM UART 8250 DLAB=0, TX HOLDING REG
  840. * 41 COMM UART 8250 DLAB=0, INT. ENABLE
  841. * 42 COMM UART 8250 INTERRUPT ID REG
  842. * 43 COMM UART 8250 LINE CONTROL REG
  843. * 44 COMM UART 8250 MODEM CONTROL REG
  844. * 45 COMM UART 8250 LINE STATUS REG
  845. * 46 COMM UART 8250 MODEM STATUS REG
  846. * 47 COMM UART 8250 NOT USED
  847. * 40 COMM UART 8250 DLAB=1, DIVISOR LSB
  848. * 41 COMM UART 8250 DLAB=1, DIVISOR MSB
  849. * 50 LEDS
  850. * 5F LEDS
  851. * 60 LIGHT PEN REG 1 HORZ COURT REG
  852. * 61 LIGHT PEN REG 2 VERT COURT + SCAN CNT
  853. * 70 BANK SELECT REG
  854. * /--- BLOCK INIT 00 000 82/05/27 08.42
  855. TITLE START
  856. **
  857. *
  858. * STARTING POINT OF LOADER
  859. *
  860. **
  861. SPACE 6
  862. **
  863. *
  864. START EQU *
  865. *
  866. LADR DEFW ENTRY LOAD ADDRESS
  867. LLNTH DEFW ENDLDR LOAD LENGTH
  868. ENTRY EQU *
  869. JR BEGIN
  870. DEFW NUMB
  871. *
  872. TITLE BEGIN
  873. **
  874. *
  875. * 'THIS ROUTINE DISABLES THE TERMINAL INTERRUPTS, SETS
  876. * THE STACK POINTER, CLEARS THWE SCREEN, AND CLEARS
  877. * THE INTERPRETER MEMORY AREA.
  878. *
  879.  
  880. BEGIN EQU *
  881. DI DISABLE PROCESSOR INTERRUPTS
  882. LD (TTYPE),BC SAVE TERMINAL TYPE.
  883. LD SP,ZSTACK SET STACK POINTER
  884.  
  885. LD HL,INTADR
  886. LD DE,INTADR+1
  887. LD BC,MLWA-INTADR
  888. LD (HL),00
  889. LDIR CLEAR INTERPRETER
  890.  
  891. LD A,03
  892. LD (RTYCNT),A SET RETRY COUNT
  893. *
  894. LD A,(TTYPE)
  895. CP VIKX TEST FOR VIKING X TERMINAL
  896. JR NZ,BEGIN1 JUMP IF NOT VIKING X
  897. *
  898. * VIKING X INITIALIZE
  899. *
  900.  
  901. LD A,B0+B2+B3+B4 SELECT RES ROM
  902. OUT (BANK),A AND THEN OUTPUT TO PORT
  903. *
  904. * SET ADDRESSES FOR TERMINAL RESIDENT.
  905. *
  906. LD IX,PARMS
  907. LD (IX+0),8 LOAD RESIDENT FIRMWARE NUMBER
  908. LD (IX+1),2 LOAD NUMBER OF ADDITIONAL PARTS
  909. LD (IX+2),4 LOAD PLATO INTERPRETER
  910. LD (IX+3),1 LOAD NUMBER OF ADDITIONAL PARTS
  911.  
  912. LD DE,0A17H SET TO COL 10, LINE 23
  913. CALL R.SETDE
  914. LD DE,VMES11 DISPLAY LOAD MESSAGE
  915. CALL VDMSG
  916.  
  917. JP EXEC
  918. * /--- BLOCK INIT 00 000 82/04/21 08.19
  919. *
  920. * IST INITIALIZE
  921. *
  922. **
  923. *
  924. * 'THIS ROUTINE DISABLES THE TERMINAL INTERRUPTS, SETS
  925. * THE STACK POINTER, CLEARS THWE SCREEN, AND CLEARS
  926. * THE INTERPRETER MEMORY AREA.
  927. *
  928. *
  929. * INPUT FRONT PANEL SWITCHES AND DETERMINE
  930. * WHEATHER TO LOAD FROM DEFAULT SWITCH SETTING,
  931. * OR TO DISPLAY SELECT MESSAGE.
  932. * (TTYPE) DETERMINE TERMINAL TYPE, 00 FOR IST2 AND
  933. * 01 FOR IST3. IF TERMINAL IS AN IST2, DO NOT LOAD
  934. * ASCII GRAPHICS RESIDENT
  935. *
  936. *
  937. BEGIN1 EQU *
  938. LD A,00 TURN OFF INTERRUPT MASK.
  939. OUT (INTMSK),A
  940.  
  941. LD A,06
  942. OUT (BLKERS),A CLEAR SCREEN
  943. LD A,0C1H SELECT LOW
  944. OUT (PNLLTS),A RAM AREA OF MEMORY.
  945. *
  946. BGIN0 EQU *
  947. IN A,(SYSSTAT) INPUT TERMINAL STATUS
  948. RLCA AND TEST FOR BULK ERASE
  949. JR C,BGIN0 COMPLETED.
  950. *
  951. LD A,(TTYPE)
  952. CP IST3 TEST FOR IST3
  953. JP NZ,BGIN4 IF AN IST2
  954. *
  955. IN A,(MNTSW) LOAD SWITCH DATA
  956. BIT 0,A AND TEST FOR SELECT.
  957. JR NZ,BGIN1 GOTO SELECT
  958. *
  959. IN A,(EXTSTAT) ELSE INPUT DEFAULT
  960. BIT 0,A AND TEST FOR PLATO OR ASCII
  961. JP NZ,BGIN6 GOTO ASCII
  962. JP BGIN5 ELSE LOAD PLATO
  963. *
  964. * DISPLAY PLATO/ASCII LOAD MESSAGE
  965. *
  966. BGIN1 EQU *
  967. LD DE,MESADR7 LOAD SCREEN ADDRESS
  968. LD IX,MES7 LOAD MESSAGE ADDRESS
  969. CALL MESSAGE AND DISPLAY.
  970. LD DE,8B60H
  971. LD IX,MES11
  972. CALL MESSAGE
  973.  
  974. BGIN1A EQU *
  975. LD DE,MESADR3 LOAD SCREEN ADDRESS
  976. LD IX,MES5 LOAD MESSAGE ADDRESS
  977. CALL MESSAGE AND DISPLAY.
  978. LD DE,MESADR4 LOAD SCREEN ADDRESS
  979. LD IX,MES6 LOAD MESSAGE ADDRESS
  980. CALL MESSAGE AND DISPLAY.
  981. LD DE,8AE0H
  982. LD IX,MES12
  983. CALL MESSAGE
  984. LD DE,8B20H
  985. LD IX,MES13
  986. CALL MESSAGE
  987. * /--- BLOCK INIT 00 000 82/04/21 08.48
  988. *
  989. * WAIT FOR KEYBOARD INPUT LETTERS A OR P
  990. *
  991. BGIN2 EQU *
  992. IN A,(SYSSTAT) INPUT TERMINAL STATUS
  993. BIT 3,A TEST FOR KEYBOARD DATA
  994. JR Z,BGIN3
  995. *
  996. IN A,(KBDATA) INPUT KEY CODE
  997. AND 5FH MASK OFF SHIFT CODE
  998. CP KA TEST FOR LETTER A
  999. JP Z,BGIN7
  1000. CP KP TEST FOR LETTER P
  1001. JP Z,BGIN5
  1002. CP KG TEST FOR LETTER G
  1003. JP Z,BGIN6
  1004. *
  1005. * WAIT FOR TOUCH PANEL INPUT
  1006. *
  1007. BGIN3 EQU *
  1008. IN A,(SYSSTAT) INPUT TERMINAL STATUS
  1009. BIT 4,A TEST FOR TOUCH PANEL DATA
  1010. JR Z,BGIN2 LOOP FOR INPUT
  1011. *
  1012. LD A,01
  1013. OUT (ALARM),A SAY BEEB
  1014. *
  1015. IN A,(TPDATA) ELSE INPUT THE DATA
  1016. CP TA TEST FOR ASCII
  1017. JP Z,BGIN7 LOAD ASCII PARAMETERS
  1018. *
  1019. CP TA+1 TEST FOR ASCII
  1020. JP Z,BGIN7 LOAD ASCII PARAMETERS
  1021. *
  1022. CP TA+10H TEST FOR ASCII
  1023. JP Z,BGIN7 LOAD ASCII PARAMETERS
  1024. *
  1025. CP TA-10H TEST FOR ASCII
  1026. JP Z,BGIN7 LOAD ASCII PARAMETERS
  1027. *
  1028. CP TP TEST FOR PLATO
  1029. JR Z,BGIN5 LOAD PLATO PARAMETERS
  1030. *
  1031. CP TP+1 TEST FOR PLATO
  1032. JR Z,BGIN5 LOAD PLATO PARAMETERS
  1033. *
  1034. CP TP+10H TEST FOR PLATO
  1035. JR Z,BGIN5 LOAD PLATO PARAMETERS
  1036. *
  1037. CP TP-10H TEST FOR PLATO
  1038. JR Z,BGIN5 LOAD PLATO PARAMETERS
  1039. *
  1040. CP TG TEST FOR GRAPHICS
  1041. JP Z,BGIN6 LOAD GRAPHICS PARAMETERS
  1042. *
  1043. CP TG+1 TEST FOR GRAPHICS
  1044. JP Z,BGIN6 LOAD GRAPHICS PARAMETERS
  1045. *
  1046. CP TG+10H TEST FOR GRAPHICS
  1047. JP Z,BGIN6 LOAD GRAPHICS PARAMETERS
  1048. *
  1049. CP TG-10H TEST FOR GRAPHICS
  1050. JP Z,BGIN6 LOAD GRAPHICS PARAMETERS
  1051. JR BGIN2
  1052. * /--- BLOCK INIT 00 000 82/05/27 08.40
  1053. SPACE 4
  1054. *
  1055. * SET ADDRESSES FOR IST2 PLATO RESIDENT
  1056. *
  1057. BGIN4 EQU *
  1058. LD A,(TTYPE+1)
  1059. CP 80H TEST FOR IST2 21/12 BIT PCN
  1060. JP NZ,BGIN7
  1061.  
  1062. LD IX,PARMS
  1063. LD (IX+0),03 LOAD RESIDENT RECORD NUMBER
  1064. LD (IX+1),01 LOAD NUMBER OF ADDED PARTS
  1065. LD (IX+2),04 LOAD INTERPRETER RECORD NUMBER
  1066. LD (IX+3),01 LOAD NUMBER OF ADDED PARTS
  1067. LD HL,097AH
  1068. LD (BGN.ADR),HL LOAD ADDR OF ENTRY ADDR
  1069. LD HL,08E5H
  1070. LD (BLK0.ADR),HL LOAD FWA OF BLOCK 0
  1071. LD HL,0979H
  1072. LD (LDS.ADR),HL LOAD SOURCE FLAG ADDR
  1073. LD HL,08DEH
  1074. LD (FL.ADR),HL LOAD FULL LOAD FLAG ADDR
  1075. LD DE,MESADR5 LOAD SCREEN ADDRESS
  1076. LD IX,MES3 LOAD MESSAGE ADDRESS
  1077. CALL MESSAGE AND DISPLAY.
  1078. JP EXEC LOAD RESIDENT
  1079. *
  1080. * SET ADDRESSES FOR IST3 PLATO RESIDENT
  1081. *
  1082. BGIN5 EQU *
  1083. LD IX,PARMS
  1084. LD (IX+0),05 LOAD RESIDENT RECORD NUMBER
  1085. LD (IX+1),01 LOAD NUMBER OF ADDED PARTS
  1086. LD (IX+2),04 LOAD INTERPRETER RECORD NUMBER
  1087. LD (IX+3),01 LOAD NUMBER OF ADDED PARTS
  1088. LD HL,0140H
  1089. LD (BGN.ADR),HL LOAD ADDR OF ENTRY ADDR
  1090. LD HL,00B0H
  1091. LD (BLK0.ADR),HL LOAD FWA OF BLOCK 0
  1092. LD HL,0144H
  1093. LD (LDS.ADR),HL LOAD SOURCE FLAG ADDR
  1094. LD HL,SAVEI LOAD SAVE ADDRESS
  1095. LD (HL),3CH LOAD FULL LOAD FLAG
  1096. INC HL
  1097. LD (HL),3CH LOAD RESET FLAG
  1098. INC HL
  1099. LD (HL),80H LOAD PLATO MODE FLAG
  1100. INC HL
  1101. LD A,(LOADINFO) SAVE LOAD INFORMATION FLAG
  1102. RES 2,A SET PLATO BIT
  1103. LD (HL),A AND SAVE.
  1104. INC HL
  1105. LD (HL),A LOAD RUN INFORMATION FLAG.
  1106. LD DE,MESADR5 LOAD SCREEN ADDRESS
  1107. LD IX,MES3 LOAD MESSAGE ADDRESS
  1108. CALL MESSAGE AND DISPLAY.
  1109. LD DE,MESADR5 LOAD SCREEN ADDRESS
  1110. LD IX,MES3 LOAD MESSAGE ADDRESS
  1111. CALL MESSAGE AND DISPLAY.
  1112. JR EXEC
  1113. * /--- BLOCK INIT 00 000 82/04/21 21.12
  1114. *
  1115. * SET ADDRESSES FOR IST3 ASCII GRAPHICS RESIDENT
  1116. *
  1117. BGIN6 EQU *
  1118. LD IX,PARMS
  1119. LD (IX+0),09 LOAD RESIDENT RECORD NUMBER
  1120. LD (IX+1),02 LOAD NUMBER OF ADDED PARTS
  1121. LD (IX+2),07 LOAD INTERPRETER RECORD NUMBER
  1122. LD (IX+3),01 LOAD NUMBER OF PART
  1123. LD HL,0041H
  1124. LD (BGN.ADR),HL LOAD ADDR OF ENTRY ADDR
  1125. LD HL,00F0H
  1126. LD (BLK0.ADR),HL LOAD CHECKSUM TABLE ADDRESS
  1127. LD HL,22C7H
  1128. LD (LDS.ADR),HL LOAD SOURCE FLAG ADDR
  1129. LD HL,SAVEI LOAD SAVE ADDRESS
  1130. LD (HL),3CH LOAD FULL LOAD FLAG
  1131. INC HL
  1132. LD (HL),00 LOAD RESET FLAG
  1133. INC HL
  1134. LD (HL),00 LOAD ASCII MODE FLAG
  1135. INC HL
  1136. LD A,(LOADINFO) SAVE LOAD INFORMATION FLAG
  1137. SET 2,A SET ASCII BIT
  1138. LD (HL),A
  1139. INC HL
  1140. LD (HL),A LOAD RUN INFORMATION FLAG.
  1141. LD DE,MESADR5 LOAD SCREEN ADDRESS
  1142. LD IX,MES9 LOAD MESSAGE ADDRESS
  1143. CALL MESSAGE AND DISPLAY.
  1144. JR EXEC
  1145.  
  1146. *
  1147. * SET ADDRESSES FOR IST2/IST3 ASCII PLATO RESIDENT
  1148. *
  1149. BGIN7 EQU *
  1150. LD IX,PARMS
  1151. LD (IX+0),6 LOAD RESIDENT FIRMWARE NUMBER
  1152. LD (IX+1),1 LOAD NUMBER OF ADDITIONAL PARTS
  1153. LD (IX+2),4 LOAD PLATO INTERPRETER
  1154. LD (IX+3),1 LOAD NUMBER OF ADDITIONAL PARTS
  1155.  
  1156. LD DE,MESADR5 LOAD SCREEN ADDRESS
  1157. LD IX,MES8 LOAD MESSAGE ADDRESS
  1158. CALL MESSAGE AND DISPLAY.
  1159. *
  1160. * /--- BLOCK EXEC 00 000 82/04/15 08.56
  1161. TITLE LOADER EXEC
  1162. **
  1163. *
  1164. * 'THIS ROUTINE CALLS THE LOAD ROUTINES AND THE
  1165. * CHECKSUM ROUTINES. 'IF THE CHECKSUM FAILS, THREE
  1166. * RETRIES ARE MADE TO RELOAD EITHER THE RESIDENT
  1167. * OR THE INTERPRETER AND CHECKSUM THE DATA.
  1168. * 'IF THE CHECKSUM FAILS AFTER THREE RETRIES, THE
  1169. * LOAD ERROR ROUTINE IS ENTERED, AND THE ERROR
  1170. * MESSAGE IS DISPLAYED ON THE SCREEN.
  1171. *
  1172.  
  1173. EXEC EQU *
  1174. LD IX,PARMS SET ADDRESS IF LOAD FILE NUMBER
  1175. CALL LOADF LOAD IST RESIDENT
  1176. JP C,RETRY DISPLAY ERROR MESSAGE IF ERROR
  1177. *
  1178. ***
  1179. LD A,(TTYPE)
  1180. CP IST2 TEST FOR0IST2 TERMINAL
  1181. JR NZ,EXEC1 IF NOT AN IST2
  1182. LD HL,22E5H FROM
  1183. LD DE,0013H TO
  1184. LD BC,8D1H LEN
  1185. LDIR MOVE IST2 CHARS DOWN
  1186. *
  1187. EXEC1 EQU *
  1188. LD A,(PARMS)
  1189. CP 06 IF IST3 ASCII PLATO
  1190. JR Z,EXEC1A
  1191. CP 08 IF VIKING X
  1192. JR Z,EXEC1A
  1193. CP 10 OR IF IST2 ASCII PLATO
  1194. JR NZ,EXEC2
  1195.  
  1196. EXEC1A EQU *
  1197. LD HL,(BGNADR) SET THE ENTRY POINT ADDRESS.
  1198. LD (BGN.ADR),HL
  1199.  
  1200. EXEC2 EQU *
  1201. LD IX,PARMS+2 SET ADDRESS OF INTERPRETER NO.
  1202. CALL LOADF LOAD INTERPRETER
  1203. JP C,RETRY DISPLAY ERROR MESSAGE IF ERROR
  1204. LD A,0D0H
  1205. OUT (ALARM),A
  1206. * /--- BLOCK EXEC 00 000 82/04/15 08.53
  1207. SPACE 4
  1208. **
  1209. *
  1210. * EXIT BOOT LOADER TO ENTRY POINT OF RESIDENT
  1211. *
  1212. **
  1213. *
  1214. * INITIALIZE TERMINAL RESIDENT LOAD VARIABLES
  1215. *
  1216. EXEC3 EQU *
  1217. LD A,(PARMS)
  1218. CP 05 TEST FOR IST3 21/12 BIT
  1219. JR Z,EXEC3A
  1220.  
  1221. CP 09 TEST FOR IST3 ASCII GRAPHICS
  1222. JR NZ,EXEC4
  1223. *
  1224. EXEC3A EQU *
  1225. LD HL,SAVEI LOAD FLAG SAVE ADDRESS
  1226. LD DE,LOADFLAG LOAD FLAG ADDRESS
  1227. LD BC,05
  1228. LDIR LOAD RESIDENT FLAGS.
  1229. XOR A
  1230. LD (M.LDFILE),A SET FOR LOAD FILE 00.
  1231.  
  1232. LD A,(PARMS)
  1233. CP 09 TEST FOR ASCII GRAPHICS
  1234. CALL Z,ACHKSM GENERATE CHECKSUM FOR ASCII
  1235. JR EXEC5
  1236. *
  1237. EXEC4 EQU *
  1238. CP 03 TEST FOR IST2 21/12 BIT
  1239. JR NZ,EXEC6 EXIT FOR VIKING X
  1240. LD HL,(FL.ADR)
  1241. LD (HL),01 SET FULL LOAD FLAG
  1242. *
  1243. EXEC5 EQU *
  1244. LD HL,(LDS.ADR)
  1245. LD (HL),-1 SET LOAD SOURCE FLAG
  1246. *
  1247. * FIND ENTRY POINT ADDRESS FOR FLEXIBLE DISK
  1248. * TO RESIDENT.
  1249. *
  1250. LD HL,(BGN.ADR)
  1251. LD E,(HL) LOAD LOWER BYTE OF ADDRESS
  1252. INC HL
  1253. LD D,(HL) LOAD UPPER BYTE
  1254. EX DE,HL
  1255. LD A,(TTYPE) GET TERMINAL TYPE
  1256. LD C,A FOR ASCII RESIDENT.
  1257. JP (HL)
  1258. *
  1259. * EXIT FOR VIKING X, IST2 ASCII/PLATO, IST3 ASCII/PLA
  1260. *
  1261. EXEC6 EQU *
  1262. LD HL,(BGN.ADR) HL = ADDR OF BLOCK 0 TABLE
  1263. LD DE,0055H
  1264. ADD HL,DE
  1265. LD E,(HL)
  1266. INC HL
  1267. LD D,(HL) DE = ENTRY POINT ADDRESS
  1268. EX DE,HL HL = ENTRY POINT ADDRESS
  1269. LD A,(TTYPE) GET TERMINAL TYPE
  1270. LD C,A FOR ASCII RESIDENT.
  1271. JP (HL) GO TO RESIDENT.
  1272. * /--- BLOCK LDERR 00 000 82/04/16 10.30
  1273. TITLE RETRY ROUTINE
  1274. *
  1275. * RETRY LOAD ROUTINE
  1276. *
  1277. RETRY EQU *
  1278. LD HL,RTYCNT
  1279. DEC (HL) DECREMENT THE RETRY COUNT
  1280. JP NZ,EXEC TRY AGAIN
  1281.  
  1282. LD A,(TTYPE) GET TERMINAL TYPE
  1283. CP VIKX TEST FOR VIKING X
  1284. JR Z,VLDERR
  1285. *
  1286. * LOAD ERROR ROUTINE
  1287. *
  1288. LDERR EQU *
  1289. LD DE,MESADR1
  1290. CALL MESSAGE
  1291. *
  1292. LD DE,MESADR2 LOAD SCREEN ADDRESS
  1293. LD IX,MES4 LOAD MESSAGE ADDRESS
  1294. CALL MESSAGE
  1295. *
  1296. LDERR0 EQU *
  1297. IN A,(SYSSTAT) INPUT STATUS
  1298. AND 08 TEST FOR KEY DATA READY
  1299. JR Z,LDERR0
  1300. *
  1301. IN A,(KBDATA) INPUT KEY DATA
  1302. AND 7FH
  1303. CP NEXT TEST FOR NEXT KEY
  1304. LD A,(TTYPE)
  1305. LD C,A GET TERMINAL TYPE
  1306. JP Z,BEGIN
  1307. JR LDERR0
  1308.  
  1309. * LOAD ERROR ROUTINE
  1310. *
  1311. VLDERR EQU *
  1312. PUSH DE SAVE MESSAGE ADDRESS
  1313. LD DE,1418H SET TO COL 25, LINE 23
  1314. CALL R.SETDE
  1315. POP DE GET MESSAGE ADDRESS
  1316. CALL VDMSG
  1317.  
  1318. LD DE,1419H SET TO COL 25, LINE 30
  1319. CALL R.SETDE
  1320. LD DE,VMES6 LOAD MESSAGE ADDRESS
  1321. CALL VDMSG
  1322. *
  1323. VLDERR0 EQU *
  1324. IN A,(UKYBD+ULSTR)
  1325. AND KBDR TEST FOR KEYBOARD DATA
  1326. JR Z,VLDERR0
  1327.  
  1328. IN A,(UKYBD+UDATA) GET KEY CODE
  1329. XOR 66H TEST FOR NEXT KEY
  1330. JR NZ,VLDERR0
  1331.  
  1332. LD DE,1419H
  1333. CALL R.SETDE
  1334. LD DE,VMES0
  1335. CALL VDMSG ERASE ERROR MESSAGE
  1336. LD A,(TTYPE)
  1337. LD C,A GET TERMINAL TYPE
  1338. JP BEGIN
  1339. * /--- BLOCK LOADF 00 000 82/03/18 10.49
  1340. TITLE LOAD FILE FROM DISK
  1341. **
  1342. *
  1343. * THIS ROUTINE IS CALLED TO LOAD A FILE FROM
  1344. * THE FLEXIBLE DISK.
  1345. *
  1346. * ENTRY;
  1347. * (IX+0) = LOAD FILE NUMBER
  1348. * (IX+1) = NUMBER OF ADDITIONAL PARTS
  1349. *
  1350. **
  1351. *
  1352. * STORE RETRY COUNT.
  1353. *
  1354. LOADF EQU *
  1355. LD A,03
  1356. LD (LRTYCNT),A LOAD FOR 3 RETRIES IF ERROR
  1357. *
  1358. * LOAD FIRST PART OF THE INTERPRETER.
  1359. * STORE SECTOR SIZE, LOAD ADDRESS, AND NUMBER OF
  1360. * SECTORS, CALL LOAD ROUTINE, TEST FOR CORRECT
  1361. * CHECKSUM ON RETURN, (CARRY BIT).
  1362. *
  1363. LOADF1 EQU *
  1364. LD A,(IX+0) GET FILE NUMBER
  1365. LD (RCRDN),A LOAD RECORD NUMBER FOR INTERP.
  1366. CALL FDDLOAD LOAD NEXT BLOCK
  1367. JR NC,LOADF2 LOAD SECOND PART
  1368. *
  1369. LD HL,LRTYCNT LOAD ADDR OF RETRY COUNT
  1370. DEC (HL) DECREMENT COUNT
  1371. JR NZ,LOADF1 RELOAD IF NOT ZERO
  1372. *
  1373. SCF SET ERROR FLAG
  1374. RET AND EXIT
  1375. *
  1376. * LOAD SECOND AND THIRD PARTS.
  1377. *
  1378. LOADF2 EQU *
  1379. LD (LDADR),HL SAVE LOAD ADDRESS
  1380. LD A,03
  1381. LD (LRTYCNT),A LOAD RETRY COUNT
  1382. *
  1383. LOADF3 EQU *
  1384. CALL OUTCS0 LOAD 2ND PART OF INTERPRETER
  1385. JR C,LOADF4 JUMP IF ERROR
  1386.  
  1387. DEC (IX+1) DECREMENT ADDITIONAL PART COUNT
  1388. JR NZ,LOADF2 LOAD THIRD PART
  1389. RET ELSE EXIT
  1390.  
  1391. LOADF4 EQU *
  1392. LD HL,LRTYCNT LOAD ADDR OF RETRY COUNT
  1393. DEC (HL) DECREMENT COUNT
  1394. JR NZ,LOADF3 RELOAD IF NOT ZERO
  1395. *
  1396. SCF SET ERROR FLAG
  1397. RET AND EXIT.
  1398. * /--- BLOCK FDDLOAD 00 000 82/03/17 11.32
  1399. TITLE LOADER SUBROUTINE
  1400. **
  1401. *
  1402. * THIS ROUTINE READS THE CONTROLLER STATUS, TESTS
  1403. * FOR IDLE, SENDS THE READ SECTOR COMMAND AND
  1404. * PARAMETERS. 'WHEN THE STATUS INDICATES THAT THE
  1405. * COMMAND HAS BEEN PROCESSED, THE DATA IS READ AND
  1406. * STORED INTO THE TERMINAL MEMORY BY SECTORS.
  1407. * 'AFTER EACH SECTOR IS STORED, IT IS CHECKSUMED
  1408. * AND VERIFIED WITH THE SECTOR CHECKSUM FROM THE
  1409. * DISK CONTROLLER.
  1410. **
  1411.  
  1412. FDDLOAD EQU *
  1413. LD D,IDLE LOAD EXPECTED STATUS
  1414. CALL WAITC STATUS CONTROLLER FOR IDLE STATE
  1415. RET C RETURN IF ERROR
  1416. *
  1417. LD A,RDFILE LOAD READ FILE COMMAND CODE
  1418. OUT (DCNTL),A AND OUTPUT TO DISK CONTLR.
  1419. LD D,SCOMD
  1420. CALL WAITC STATUS CONTROLLER FOR IDLE STATE
  1421. RET C RETURN IF ERROR
  1422. *
  1423. LD A,RDFILE LOAD READ FILE COMMAND COMPLIM.
  1424. CPL
  1425. OUT (DCNTL),A AND OUTPUT .
  1426. LD D,IDLE LOAD EXPECTED STATUS
  1427. CALL WAITC STAT COMTROLLER
  1428. RET C RETURN IF ERROR
  1429. *
  1430. LD A,(RCRDN) LOAD RECORD NUMBER
  1431. LD C,DDATA LOAD DEVICE FUNC, CODE
  1432. LD DE,00 INITIALIZE CHECKSUM REG.S
  1433.  
  1434. OUT (C),A OUTPUT FILE REQUEST NUMBER
  1435. LD B,A
  1436. RLCA
  1437. LD D,A LOAD PARAMETER
  1438. LD A,B
  1439. RRCA CHECKSUM FOR OUTPUT
  1440. LD E,A
  1441.  
  1442. CALL DELAY
  1443. OUT (C),E OUTPUT LOWER BYTE CHECKSUM
  1444. CALL DELAY WAIT FOR DISK
  1445. OUT (C),D OUTPUT UPPER BYTE CHECKSUM
  1446. *
  1447. OUTCS0 EQU *
  1448. LD D,SRXFER
  1449. CALL WAITC STATUS CONTROLLER FOR IDLE
  1450. RET C EXIT IF ERROR.
  1451. SPACE 4
  1452. * /--- BLOCK FDDLOAD 00 000 82/03/17 12.41
  1453. *
  1454. * READ DATA FROM THE DISK BUFFER
  1455. *
  1456. LD C,DDATA LOAD DISK DATA FUNC. CODE
  1457. IN L,(C) LOAD LOWER ADDRESS BYTE
  1458. NOP
  1459.  
  1460. IN H,(C) LOAD UPPER ADDRESS BYTE
  1461. NOP
  1462.  
  1463. IN E,(C) LOAD LOWER LENGHT BYTE
  1464. NOP
  1465.  
  1466. IN D,(C) LOAD UPPER LENGHT BYTE
  1467.  
  1468. *
  1469. * IF HL = 0FFFFH, THEN THIS IS A CONTINUED LOAD AND
  1470. * THE ACTUAL LOAD ADDRESS SHOULD BE GOTTEN FROM
  1471. * *LDADR*.
  1472. *
  1473. LD A,0FFH
  1474. CP H
  1475. JR NZ,READB IF NOT A CONTINUED LOAD
  1476. CP L
  1477. JR NZ,READB @ IF NOT A CONTINUED LOAD
  1478. LD HL,(LDADR) CONTINED LOAD ADDRESS
  1479. JR READB0
  1480. READB EQU *
  1481. LD (BGNADR),HL SAVE THE STARTING ADDRESS
  1482. READB0 EQU *
  1483. LD (LDADR),HL SAVE THE STARTING ADDRESS
  1484. LD B,SECTSZ LOAD DISK SECTOR SIZE
  1485. READB1 EQU *
  1486. INI LOAD SECTOR DATA TO MEMORY.
  1487. JR NZ,READB1
  1488. *
  1489. READB2 EQU *
  1490. IN A,(C) INPUT SECTOR CHECKSUM
  1491. LD (SAVE),A AND STORE.
  1492. IN A,(C)
  1493. LD (SAVE+1),A
  1494. CALL SCHKSM DO CHECKSUM OF SECTOR DATA
  1495. RET C EXIT IF ERROR.
  1496. *
  1497. DEC DE DECREMENT BYTE COUNT
  1498. LD A,D
  1499. OR E TEST FOR PART COMPLETED
  1500. RET Z RETURN IF LOAD COMPLETED
  1501. JR READB0 ELSE LOAD NEXT SECTOR
  1502. * /--- BLOCK SUBROUT 00 000 82/04/16 08.34
  1503. TITLE SUBROUTINES
  1504. * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  1505. * WAITC
  1506. * THIS SUBROUTINE CALLS DELAY AND INPUTS STATUS FROM
  1507. * THE DISK, COMPARES IT TO A VALUE IN REGISTER D.
  1508. * ENTRY;
  1509. * D = EXPECTED STATUS
  1510. * EXIT;
  1511. * NO-CARRY = STATUS EQUALS REGISTER D
  1512. * CARRY = STATUS NOT EQUALS REGISTER D
  1513. * DE = ADDRESS OF ERROR MESSAGE
  1514. * CALLS;
  1515. * DELAY
  1516. * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  1517.  
  1518. WAITC EQU *
  1519. LD B,40H
  1520.  
  1521. WAITC1 EQU *
  1522. CALL DELAY
  1523. IN A,(DSTAT)
  1524. CP D TEST FOR EXPECTED STATUS
  1525. RET Z
  1526. *
  1527. CP 0BEH TEST FOR SECURED DISK
  1528. JP Z,READER
  1529. *
  1530. RLCA TEST FOR DISK ERROR
  1531. JR C,WAITC2 JUMP IF ERROR STATUS
  1532. *
  1533. DJNZ WAITC1 LOOP FOR COUNT
  1534.  
  1535. WAITC2 EQU *
  1536. LD A,(TTYPE)
  1537. CP VIKX TEST FOR VIKING X
  1538. JR Z,WAITC3 JUMP IF VIKING X
  1539.  
  1540. LD IX,MES2 LOAD ADDRESS OF ERROR MESSAGE
  1541. SCF
  1542. RET
  1543.  
  1544. WAITC3 EQU *
  1545. LD DE,VMES2 LOAD ERROR MESSAGE
  1546. SCF SET TIME-OUT ERROR
  1547. RET
  1548.  
  1549.  
  1550. *
  1551. * DELAY OF '/'/ MSECS
  1552. *
  1553. DELAY EQU *
  1554. EXX
  1555. LD HL,1000H LOAD DELAY COUNT
  1556. *
  1557. DELAY1 EQU *
  1558. DEC HL
  1559. LD A,H
  1560. OR L
  1561. JR NZ,DELAY1
  1562. *
  1563. EXX
  1564. RET
  1565. * /--- BLOCK CHKSUM 00 000 82/04/16 08.33
  1566. TITLE CHECKSUM ROUTINES
  1567. *
  1568. * CHECKSUM SECTOR DATA IN TERMINAL MEMORY
  1569. *
  1570. SCHKSM EQU *
  1571. EXX
  1572. LD B,SECTSZ LOAD DISK SECTOR SIZE
  1573. LD DE,0000 CLEAR CHECKSUM REGISTERS
  1574. LD HL,(LDADR) LOAD THE STARTING ADDRESS
  1575. *
  1576. SCHKSM0 EQU *
  1577. CALL PCHKSM INCLUDE DATA TO CHECKSUM
  1578. INC HL UPDATE DATA POINTER
  1579. DJNZ SCHKSM0 LOOP TILL BYTE COUNT ZERO
  1580. *
  1581. LD A,(SAVE) LOAD SECTOR CHECSUM
  1582. XOR E AND TEST.
  1583. JR NZ,SCHKSM1 DISK DATA ERROR
  1584. LD A,(SAVE+1)
  1585. XOR D
  1586. JR NZ,SCHKSM1 IF CHECKSUM IS NOT CORRECT
  1587. EXX ELSE RETURN IF
  1588. RET IS COORRECT.
  1589. *
  1590. SCHKSM1 EQU *
  1591. EXX
  1592. LD A,(TTYPE)
  1593. CP VIKX TEST FOR VIKING X
  1594. JR Z,SCHKSM2
  1595.  
  1596. LD IX,MES1 LOAD ADDRESS OF ERROR MESSAGE
  1597. SCF
  1598. RET
  1599.  
  1600. SCHKSM2 EQU *
  1601. LD DE,VMES1 LOAD CHECKSUM ERROR MESSAGE
  1602. SCF SET ERROR INDICATOR
  1603. RET
  1604.  
  1605.  
  1606. *
  1607. * PARMS TABLE CHECK SUM ROUTINE
  1608. * ENTRY (HL) BYTE TO ADD TO CHECK SUM
  1609. * DE CURRENT CHECK SUM
  1610. * EXIT DE NEW CHECK SUM
  1611. * CHANGES DE, A
  1612. *
  1613. PCHKSM EQU *
  1614. LD A,D LOAD UPPER BYTE
  1615. XOR (HL) INCLUDE PARAMETER
  1616. RLCA ROTATE LEFT END AROUND
  1617. LD D,A AND SAVE
  1618. LD A,E LOAD LOWER BYTE
  1619. XOR (HL) INCLUDE PARAMETER
  1620. RRCA ROTATE RIGHT END AROUND
  1621. LD E,A AND SAVE.
  1622. RET
  1623. * /--- BLOCK ACHKSM 00 000 82/03/19 16.11
  1624. **
  1625. *
  1626. * ASCII RESIDENT CHECKSUM ROUTINE
  1627. * THE LOADED RAM PROGRAM HAS A CHECKSUM ADDRESS TABLE
  1628. * AS FOLLOWS.
  1629. *
  1630. * (22C8H,22C9H)=FWA FWA OF CHECKSUM TABLE
  1631. * (22CAH)=CHECKSUM SET BY LOADER
  1632. * (22CBH)=LOADFLAG 3CH=CODE IS LOADED
  1633. * (22CCH)=RESETFLAG 3CH=SHORT RESET
  1634. * (22CDH)=MODE ASCII CONTROLWARE MODE
  1635. * (22CEH)=LOADINFO CONTROLWARE LOAD INFORMATION
  1636. * (22CFH)=RUNINFO CONTROLWARE RUN INFORMATION
  1637. *
  1638. * (FWA+0,FWA+1)=STARTING ADDRESS OF CODE SEGMENT 1
  1639. * (FWA+2,FWA+3)=LENGTH IN BYTES OF CODE SEGMENT 1
  1640. * (FWA+4,FWA+5)=STARTING ADDRESS OF CODE SEGMENT 2
  1641. * (FWA+6,FWA+7)=LENGTH IN BYTES OF CODE SEGMENT 2
  1642. * .
  1643. * .
  1644. * (FWA+4N+0,FWA+4N+1)=00 00 END OF TABLE
  1645. * (FWA+4N+2,FWA+4N+3)=00 00 (LENGHT =0)
  1646. *
  1647. **
  1648. *
  1649. **
  1650.  
  1651.  
  1652. ACHKSM EQU *
  1653. LD C,00 CLEAR CHECKSUM REGISTER
  1654. LD HL,(BLK0.ADR) LOAD FWA OF TABLE
  1655. *
  1656. ACHKSM0 EQU *
  1657. LD E,(HL)
  1658. INC HL
  1659. LD D,(HL) DE = FWA OF DATA TO CHECKSUM
  1660. INC HL
  1661. LD B,(HL) B = LENGTH IN BYTES
  1662. INC HL
  1663. LD A,(HL)
  1664. INC HL
  1665. LD (SAVE),HL SAVE TABLE ADDRESS
  1666. EX DE,HL HL = FWA OF DATA
  1667. LD E,B DE = LENGTH OF DATA
  1668. LD D,A
  1669. *
  1670. OR E TEST IF DONE
  1671. JR Z,ACHKSM3 DONE IF LENGTH = 00
  1672. *
  1673. ACHKSM1 EQU *
  1674. BIT 7,H ERROR IF ADDRESS TOO LARGE
  1675. JR NZ,ACHKSM4
  1676. *
  1677. LD A,(HL) GET DATA
  1678. ADD A,C ADD TO CHECKSUM
  1679. LD C,A
  1680. INC HL INCREMENT ADDRESS
  1681. DEC DE DECREMENT BYTE COUNT
  1682. LD A,E
  1683. OR D TEST FOR LAST BYTE
  1684. JR NZ,ACHKSM1 LOOP TILL COUNT = 00
  1685. *
  1686. LD HL,(SAVE) GET TABLE ADDRESS
  1687. JR ACHKSM0
  1688. *
  1689. ACHKSM3 EQU *
  1690. LD A,C
  1691. LD (CHECKSUM),A STORE CHECKSUM
  1692. RET EXIT
  1693. *
  1694. ACHKSM4 EQU *
  1695. LD IX,MES1 LOAD ERROR MESSAGE ADDRESS
  1696. SCF SET ERROR FLAG
  1697. RET EXIT.
  1698. * /--- BLOCK MESSAGE 00 000 82/04/15 09.30
  1699. TITLE SECURITY MESSAGE
  1700. *
  1701. * READ ERROR LOOP
  1702. *
  1703. READER EQU *
  1704. LD IX,MES14
  1705. LD DE,MESADR6 DISPLAY ERROR MESSAGE.
  1706. CALL MESSAGE
  1707. LD HL,0000
  1708.  
  1709. READER1 EQU *
  1710. DEC HL DELAY BETWEEN MESSAGES
  1711. LD A,H
  1712. OR L TEST FOR END DELAY
  1713. JR NZ,READER1
  1714. JR READER
  1715. TITLE MESSAGE DISPLAY ROUTINES
  1716. * * * * * * * * * * * * * * * * * * * *
  1717. *
  1718. * CALLABLE ROUTINE TO DISPLAY A FIELD MESSAGE.
  1719. *
  1720. * ON ENTRY, DE=FWA OF MESSAGE.
  1721. * BC, DE, HL REGISTERS ARE SAVED
  1722. *
  1723. * * * * * * * * * * * * * * * * * * * *
  1724.  
  1725. VDMSG EQU *
  1726. PUSH BC
  1727. PUSH DE
  1728. PUSH HL
  1729. EX DE,HL PUT ADDRESS INTO HL
  1730. CALL R.DSTRNG DISPLAY FIELD
  1731. POP HL
  1732. POP DE
  1733. POP BC
  1734. RET
  1735.  
  1736.  
  1737. *
  1738. * DISPLAYS MESSAGE ON TERMINAL SCREEN
  1739. *
  1740. MESSAGE EQU *
  1741. LD (SAVE),DE SAVE ADDRESS
  1742. *
  1743. MESSG0 EQU *
  1744. LD A,(IX+0) LOAD CHARACTER CODE
  1745. INC A AND TEST FOR END OF MESS.
  1746. RET Z EXIT IF END
  1747. *
  1748. INC A TEST FOR LINE FEED
  1749. JR Z,MESSG1 JUMP FOR LINE FEED
  1750. *
  1751. LD H,00 ELSE LOAD HL
  1752. LD L,(IX+0) WITH CARACTER CODE
  1753. ADD HL,HL SHIFT FOR
  1754. ADD HL,HL EIGHT BYTE CHARACTERS.
  1755. ADD HL,HL
  1756. LD BC,CHARSET LOAD ADDRESS OF CHAR SET
  1757. ADD HL,BC ADD FOR ADDRESS OF CHARACTER
  1758. LD BC,08 LOAD TRANSFER COUNT
  1759. LDIR DISPLAY CHARACTER
  1760. LD HL,01F8H ADJUST THE SCREEN
  1761. ADD HL,DE ADDRESS FOR NEXT CHARACTER
  1762. EX DE,HL
  1763. INC IX INCREMENT CHARACTER POINTER
  1764. JR MESSG0 DISPLAY NEXT CHARACTER.
  1765. *
  1766. MESSG1 EQU *
  1767. LD HL,0008
  1768. LD DE,(SAVE) LOAD OLD START ADDRESS
  1769. ADD HL,DE CALC. NEW LINE ADDRESS
  1770. EX DE,HL
  1771. INC IX INCREMENT CHARACTER POINTER
  1772. JR MESSAGE
  1773. * /--- BLOCK VMES 00 000 82/08/25 10.33
  1774. TITLE MESSAGES
  1775. *
  1776. * LOAD MESSAGES
  1777. *
  1778. * TURN ON ASCII STRINGS
  1779. CODE S
  1780.  
  1781. * LOAD MESSAGE
  1782. VMES0 EQU *
  1783. TEXT '7 '7
  1784. TEXT '7 '7
  1785. DEFB 0FFH
  1786.  
  1787. * CHECKSUM ERROR
  1788. VMES1 EQU *
  1789. TEXT '7'C'H'E'C'K'S'U'M 'E'R'R'O'R'7
  1790. DEFB 0FFH
  1791.  
  1792. * DISK READ FAILED
  1793. VMES2 EQU *
  1794. TEXT '7'D'I'S'K 'R'E'A'D 'F'A'I'L'E'D'7
  1795. DEFB 0FFH
  1796. *
  1797. * PRESS NEXT TO TRY AGAIN
  1798. VMES6 EQU *
  1799. TEXT '7'P'R'E'S'S 'N'E'X'T 'T'O 'T'R'Y 'A'G'A'I'N'7
  1800. DEFB 0FFH
  1801.  
  1802. * LOADING PLATO FROM DISK
  1803. VMES11 EQU *
  1804. TEXT '7'L'O'A'D'I'N'G 'T'E'R'M'I'N'A'L 'M'E'M'O'R'Y '7
  1805. TEXT '7'F'R'O'M 'D'I'S'K '7
  1806. DEFB 0FFH
  1807.  
  1808. * /--- BLOCK CHARSET 00 000 82/03/18 08.53
  1809. TITLE IST CHARACTER SET
  1810. *
  1811. * LOADER CHARACTER SET
  1812. *
  1813. CHARSET EQU *
  1814. * 0 00
  1815. HEX 1C,22,22,22,22,22,1C,00
  1816. * 1 01
  1817. HEX 08,0C,08,08,08,08,3E,00
  1818. * 2 02
  1819. HEX 1C,22,20,10,08,04,3E,00
  1820. * 3 03
  1821. HEX 1C,22,20,18,20,22,1C,00
  1822. * 4 04
  1823. HEX 22,22,22,3E,20,20,20,00
  1824. * 5 05
  1825. HEX 3E,02,1E,20,20,22,1C,00
  1826. * 6 06
  1827. HEX 1C,22,02,1A,26,22,1C,00
  1828. * 7 07
  1829. HEX 3E,20,10,08,04,02,02,00
  1830. * 8 08
  1831. HEX 1C,22,22,1C,22,22,1C,00
  1832. * 9 09
  1833. HEX 1C,22,22,3C,20,22,1C,00
  1834. * 'A 0A
  1835. HEX 1C,22,22,3E,22,22,22,00
  1836. * 'B 0B
  1837. HEX 1E,22,22,1E,22,22,1E,00
  1838. * 'C 0C
  1839. HEX 1C,22,02,02,02,22,1C,00
  1840. * 'D 0D
  1841. HEX 1E,22,22,22,22,22,1E,00
  1842. * 'E 0E
  1843. HEX 3E,02,02,1E,02,02,3E,00
  1844. * 'F 0F
  1845. HEX 3E,02,02,1E,02,02,02,00
  1846. * 'G 10
  1847. HEX 1C,22,02,02,32,22,1C,00
  1848. * 'H 11
  1849. HEX 22,22,22,3E,22,22,22,00
  1850. * 'I 12
  1851. HEX 3E,08,08,08,08,08,3E,00
  1852. * 'J 13
  1853. HEX 3C,08,08,08,08,0A,04,00
  1854. * 'K 14
  1855. HEX 22,12,0A,06,0A,12,22,00
  1856. * 'L 15
  1857. HEX 02,02,02,02,02,02,3E,00
  1858. * 'M 16
  1859. HEX 22,36,2A,22,22,22,22,00
  1860. * 'N 17
  1861. HEX 22,26,2A,2A,2A,32,22,00
  1862. * 'O 18
  1863. HEX 1C,22,22,22,22,22,1C,00
  1864. * 'P 19
  1865. HEX 1E,22,22,1E,02,02,02,00
  1866. * 'Q 1A
  1867. HEX 1C,22,22,22,22,32,3C,00
  1868. * 'R 1B
  1869. HEX 1E,22,22,1E,12,22,22,00
  1870. * 'S 1C
  1871. HEX 1C,22,02,1C,20,22,1C,00
  1872. * 'T 1D
  1873. HEX 3E,08,08,08,08,08,08,00
  1874. * 'U 1E
  1875. HEX 22,22,22,22,22,22,1C,00
  1876. * 'V 1F
  1877. HEX 22,22,22,14,14,14,08,00
  1878. * 'W 20
  1879. HEX 22,22,22,22,2A,36,22,00
  1880. * 'X 21
  1881. HEX 22,22,14,08,14,22,22,00
  1882. * 'Y 22
  1883. HEX 22,22,14,08,08,08,08,00
  1884. * 'Z 23
  1885. HEX 3E,20,10,08,04,02,3E,00
  1886. * /--- BLOCK CHARSET 00 000 82/03/18 12.48
  1887. * SP 24
  1888. HEX 00,00,00,00,00,00,00,00
  1889. * BOX
  1890. * HOR. LINE 25
  1891. HEX 00,00,00,FF,FF,00,00,00
  1892. * VERT. LINE 26
  1893. HEX 18,18,18,18,18,18,18,18
  1894. * UP L CORNER 27
  1895. HEX 00,00,00,F8,F8,18,18,18
  1896. * UP R CORNER 28
  1897. HEX 00,00,00,1F,1F,18,18,18
  1898. * LOW L CORNER
  1899. HEX 18,18,18,F8,F8,00,00,00
  1900. * LOW R COR
  1901. HEX 18,18,18,1F,1F,00,00,00
  1902. * COMMA 2B
  1903. HEX 00,00,00,00,00,0C,0C,04
  1904. * PERIOD 2C
  1905. HEX 00,00,00,00,00,0C,0C,00
  1906. * LINE FEED FE
  1907. * END OF MESSAGE FF
  1908. * /--- BLOCK MES 00 000 82/04/21 09.01
  1909. *
  1910. TITLE MESSAGES
  1911. * LOAD MESSAGES
  1912. *
  1913.  
  1914. * CHECKSUM ERROR
  1915. MES1 EQU *
  1916. HEX 0C,11,0E,0C,14,1C,1E,16,24
  1917. HEX 0E,1B,1B,18,1B,24,24,24,FF
  1918.  
  1919. * DISK READ FAILED
  1920. MES2 EQU *
  1921. HEX 0D,12,1C,14,24
  1922. HEX 1B,0E,0A,0D,24
  1923. HEX 0F,0A,12,15,0E,0D,24,FF
  1924.  
  1925. * LOADING PLATO FROM DISK
  1926. MES3 EQU *
  1927. HEX 15,18,0A,0D,12,17,10,24
  1928. HEX 19,15,0A,1D,18,24
  1929. HEX 0F,1B,18,16,24
  1930. HEX 0D,12,1C,14,24,FF
  1931.  
  1932. * PRESS NEXT TO TRY AGAIN
  1933. MES4 EQU *
  1934. HEX 19,1B,0E,1C,1C,24
  1935. HEX 17,0E,21,1D,24
  1936. HEX 1D,18,24
  1937. HEX 1D,1B,22,24
  1938. HEX 0A,10,0A,12,17,24,FF
  1939. * /--- BLOCK MES 00 000 82/04/21 08.25
  1940.  
  1941. * IF YOU ARE GOING TO USE THIS TERMINAL AS A PLATO
  1942. * OR MICRO PLATO STATION PRESS OR TOUCH P TO LOAD
  1943. MES5 EQU *
  1944. HEX 12,0F,24,22,18,1E,24
  1945. HEX 0A,1B,0E,24,10,18,12,17,10,24
  1946. HEX 1D,18,24,1E,1C,0E,24
  1947. HEX 1D,11,12,1C,24
  1948. HEX 1D,0E,1B,16,12,17,0A,15,FE,FE
  1949. HEX 0A,1C,24,0A,24
  1950. HEX 19,15,0A,1D,18,24
  1951. HEX 18,1B,24,16,12,0C,1B,18,24
  1952. HEX 19,15,0A,1D,18,24
  1953. HEX 1C,1D,0A,1D,12,18,17,2B,FE,FE
  1954. HEX 19,1B,0E,1C,1C,24
  1955. HEX 18,1B,24,1D,18,1E,0C,11,24
  1956. HEX 19,24
  1957. HEX 1D,18,24
  1958. HEX 15,18,0A,0D,2C,FF
  1959.  
  1960. * IF YOU ARE GOING TO USE THIS TERMINAL TO
  1961. * COMMUNICATE TO AN ASCII PLATO SYSTEM, PRESS OR
  1962. * TOUCH A TO LOAD.
  1963. MES6 EQU *
  1964. HEX 12,0F,24,22,18,1E,24
  1965. HEX 0A,1B,0E,24,10,18,12,17,10,24
  1966. HEX 1D,18,24,1E,1C,0E,24
  1967. HEX 1D,11,12,1C,24
  1968. HEX 1D,0E,1B,16,12,17,0A,15,FE,FE
  1969. HEX 1D,18,24
  1970. HEX 0C,18,16,16,1E,17,12,0C,0A,1D,0E,24
  1971. HEX 1D,18,24,0A,17,24
  1972. HEX 0A,1C,0C,12,12,24
  1973. HEX 19,15,0A,1D,18,24
  1974. HEX 1C,22,1C,1D,0E,16,2B,FE,FE
  1975. HEX 19,1B,0E,1C,1C,24
  1976. HEX 18,1B,24,1D,18,1E,0C,11,24
  1977. HEX 0A,24
  1978. HEX 1D,18,24
  1979. HEX 15,18,0A,0D,2C,FF
  1980.  
  1981. * IF YOU ARE GOING TO USE THIS TERMINAL TO
  1982. * COMMUNICATE TO AN ASCII GRAPHICS SYSTEM, PRESS
  1983. * OR TOUCH G TO LOAD.
  1984. MES7 EQU *
  1985. HEX 12,0F,24,22,18,1E,24
  1986. HEX 0A,1B,0E,24,10,18,12,17,10,24
  1987. HEX 1D,18,24,1E,1C,0E,24
  1988. HEX 1D,11,12,1C,24
  1989. HEX 1D,0E,1B,16,12,17,0A,15,FE,FE
  1990. HEX 1D,18,24
  1991. HEX 0C,18,16,16,1E,17,12,0C,0A,1D,0E,24
  1992. HEX 1D,18,24,0A,17,24
  1993. HEX 0A,1C,0C,12,12,24
  1994. HEX 10,1B,0A,19,11,12,0C,1C,24
  1995. HEX 1C,22,1C,1D,0E,16,2B,FE,FE
  1996. HEX 19,1B,0E,1C,1C,24
  1997. HEX 18,1B,24,1D,18,1E,0C,11,24
  1998. HEX 10,24
  1999. HEX 1D,18,24
  2000. HEX 15,18,0A,0D,2C,FF
  2001. * /--- BLOCK MES 00 000 82/05/04 09.25
  2002.  
  2003. * LOADING PLATO FROM DISK
  2004. MES8 EQU *
  2005. HEX 15,18,0A,0D,12,17,10,24
  2006. HEX 0A,1C,0C,12,12,24
  2007. HEX 19,15,0A,1D,18,24
  2008. HEX 0F,1B,18,16,24
  2009. HEX 0D,12,1C,14,24,FF
  2010.  
  2011. * LOADING PLATO FROM DISK
  2012. MES9 EQU *
  2013. HEX 15,18,0A,0D,12,17,10,24
  2014. HEX 19,15,0A,1D,18,24
  2015. HEX 10,1B,0A,19,11,12,0C,1C,24
  2016. HEX 0F,1B,18,16,24
  2017. HEX 0D,12,1C,14,24,FF
  2018.  
  2019. * BIG G
  2020. MES11 EQU *
  2021. HEX 27,25,28,FE,26,10,26,FE,29,25,2A,FF
  2022.  
  2023. * BIG A
  2024. MES12 EQU *
  2025. HEX 27,25,28,FE,26,19,26,FE,29,25,2A,FF
  2026.  
  2027. * BIG P
  2028. MES13 EQU *
  2029. HEX 27,25,28,FE,26,0A,26,FE,29,25,2A,FF
  2030.  
  2031. * THERE IS A PROBLEM
  2032. MES14 EQU *
  2033. HEX FE,1D,11,0E,1B,0E,24,12,1C,24,0A,24
  2034. HEX 19,1B,18,0B,15,0E,16,24,20,12,1D
  2035. HEX 11,24,22,18,1E,1B,24,0D,12,1C,14
  2036. HEX 2B,24,19,15,0E,0A,1C,0E,24,0C,0A
  2037. HEX 15,15,24,1D,11,0E,FE,FE,19,15,0A,1D
  2038. HEX 18,24,11,18,1D,24,15,12,17,0E,24
  2039. HEX 0F,18,1B,24,12,16,16,0E,0D,12,0A
  2040. HEX 1D,0E,24,0E,1F,0A,15,1E,0A,1D,12
  2041. HEX 18,17,2C,24,19,1B,18,1F,12,0D,0E
  2042. HEX FE,FE,1D,11,0E,24,11,18,1D,24,15,12
  2043. HEX 17,0E,24,1D,11,,0E,24,0E,1B,1B,18
  2044. HEX 1B,24,0C,18,0D,0E,24,17,1E,16,0B
  2045. HEX 0E,1B,24,01,04,06,24
  2046.  
  2047. NUMB EQU *-BEGIN
  2048. HEX 00,00,00,00,00,00,00,00,00,00,24
  2049. HEX 00,00,00,00,00,00,00,00,00,00,FF,FF,FF
  2050.  
  2051. ENDLDR EQU *-BEGIN
  2052. * /--- BLOCK END 00 000 82/05/27 08.44
  2053. TITLE LOADER VARIABLES
  2054. *
  2055. * PARAMETER TABLE
  2056. * INTIALIZED TO DRIVE 0, SIDE 0, TRACK 0,
  2057. * SECTOR 00, ONE SECTOR, SINGLE DENSITY.
  2058. *
  2059. PARMS EQU *
  2060. DRIVE EQU PARMS DRIVE NUMBER, 0 OR 1
  2061. SIDE EQU DRIVE+1 DISK SIDE, 0 OR 1
  2062. TRACK EQU SIDE+1 TRACK NUMBER, 00 TO 76
  2063. SECTOR EQU TRACK+1 STARTING SECTOR, 00 TO 26
  2064. NSECT EQU SECTOR+1 NUMBER OF SECTOR TO PROCESS
  2065. DENSITY EQU NSECT+1 SINGLE OR DOUBLE DENSITY
  2066. *
  2067. * FLAGS AND VARIABLES
  2068. *
  2069. RCRDN EQU DENSITY+1 REQUESTED DISK RECORD NUMDER
  2070. SAVE EQU RCRDN+1 EIGHT BYTE SCRATCH PAD
  2071. CMD EQU SAVE+8 COMMAND TO BE USED
  2072. NSEC EQU CMD+1 NUMBER OF SECTORS TO PROCESS
  2073. LDADR EQU NSEC+1 TERMINAL MEMORY ADDRESS
  2074. RTYCNT EQU LDADR+2 RETRY COUNT
  2075. LRTYCNT EQU RTYCNT+1 LOAD RETRY COUNT
  2076. *
  2077. CHRLWA EQU LRTYCNT+1 CHARACTER SET LWA
  2078. RESLWA EQU CHRLWA+2 RESIDENT LWA
  2079. INTLWA EQU RESLWA+2 INTERPRETER LWA
  2080. ASCLWA EQU INTLWA+2 ASCII RESIDENT LWA
  2081. *
  2082. BGN.ADR EQU ASCLWA+2 ADDRESS OF RES. ADDRESS
  2083. BLK0.ADR EQU BGN.ADR+2 BLOCK 0 FWA
  2084. M0.ADR EQU BLK0.ADR+2 CHAR SET FWA
  2085. LDS.ADR EQU M0.ADR+2 LOAD SOURCE FLAG ADDRESS
  2086. FL.ADR EQU LDS.ADR+2 FULL LOAD FLAG ADDRESS
  2087. LDFG EQU FL.ADR+2 LOAD FLAG
  2088. TTYPE EQU LDFG+2 TERMINAL TYPE, 0=IST2,1=IST3
  2089. * TTYPE+1, 0=21/12 BIT, 80H=ASCII
  2090. SAVEI EQU TTYPE+2 SAVE ROM LOADER VARIBLES
  2091. BGNADR EQU SAVEI+5
  2092. OPFLG EQU BGNADR+2
  2093. END
plato.source/plaopl/dboot.txt ยท Last modified: 2021/02/06 16:22 by 127.0.0.1