Table of Contents

DBOOT02

Table Of Contents

  • [00009] COMMON DISK BOOT LOADER
  • [00066] LOADER EQUATES
  • [00084] IST TERMINAL EQUATES
  • [00158] VIKING X TERMINAL EQUATES
  • [00180] CTC DEFINITIONS
  • [00234] 5037 CRT CONTROLLER
  • [00258] 8250 KEYBOARD UART DEFINITIONS
  • [00336] 8255 I/O PORT DEFINITIONS
  • [00383] 8250 COMM LINE UART DEFINITIONS
  • [00455] LED LATCH DEFINITIONS
  • [00472] BANK SELECT DEFINITIONS
  • [00499] 8250 PORT A AND B DEFINITIONS
  • [00555] PARALLEL I/O CHANNEL DEFINITIONS
  • [00856] START
  • [00874] BEGIN
  • [01163] LOADER EXEC
  • [01275] RETRY ROUTINE
  • [01342] LOAD FILE FROM DISK
  • [01402] LOADER SUBROUTINE
  • [01510] SUBROUTINES
  • [01574] CHECKSUM ROUTINES
  • [01707] SECURITY MESSAGE
  • [01768] MESSAGE DISPLAY ROUTINES
  • [01827] MESSAGES
  • [01875] IST CHARACTER SET
  • [01976] MESSAGES
  • [02119] LOADER VARIABLES

Source Code

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