User Tools

Site Tools


plato:source:plaopl:dboot03

DBOOT03

Table Of Contents

  • [00009] COMMON DISK BOOT LOADER
  • [00073] LOADER EQUATES
  • [00091] IST TERMINAL EQUATES
  • [00165] VIKING X TERMINAL EQUATES
  • [00187] CTC DEFINITIONS
  • [00241] 5037 CRT CONTROLLER
  • [00265] 8250 KEYBOARD UART DEFINITIONS
  • [00343] 8255 I/O PORT DEFINITIONS
  • [00390] 8250 COMM LINE UART DEFINITIONS
  • [00462] LED LATCH DEFINITIONS
  • [00479] BANK SELECT DEFINITIONS
  • [00506] 8250 PORT A AND B DEFINITIONS
  • [00562] PARALLEL I/O CHANNEL DEFINITIONS
  • [00863] START
  • [00897] BEGIN
  • [01184] LOADER EXEC
  • [01300] RETRY ROUTINE
  • [01367] LOAD FILE FROM DISK
  • [01426] LOADER SUBROUTINE
  • [01534] SUBROUTINES
  • [01599] CHECKSUM ROUTINES
  • [01732] SECURITY MESSAGE
  • [01793] MESSAGE DISPLAY ROUTINES
  • [01852] MESSAGES
  • [01900] IST CHARACTER SET
  • [02001] MESSAGES
  • [02144] LOADER VARIABLES

Source Code

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