CDC Community

๐Ÿ”น Historical Conservation ๐Ÿ”น

User Tools

Site Tools


plato.source:plaopl:asc1rom

ASC1ROM

Table Of Contents

Source Code

ASC1ROM.txt
  1. ASC1ROM
  2. IDENT ASC1ROM
  3. *
  4. * 'REVISION 'B005
  5. *
  6. ************************************************************************
  7. *
  8. * OUTPUT FUNCTION DEFINITIONS
  9. *
  10. ************************************************************************
  11. *
  12. * CHANNEL FUNCTION DESCRIPTION
  13. *
  14. * 0 0 OPERATORS PANEL DATA
  15. *
  16. * OUTPUT FROM A REGISTER
  17. * BIT 1 OUTPUT REGISTER BIT 1
  18. * BIT 2 OUTPUT REGISTER BIT 2
  19. * BIT 3 OUTPUT REGISTER BIT 3
  20. * BIT 4 OUTPUT REGISTER BIT 4
  21. * BIT 5 OUTPUT REGISTER BIT 5
  22. * BIT 6 OUTPUT REGISTER BIT 6
  23. * BIT 7 COMMUNICATION ERROR INDICATOR
  24. * BIT 8 UNUSED
  25. *
  26. * 1 0 COMMUNICATION CHANNEL DATA
  27. *
  28. * OUTPUT FROM A REGISTER
  29. * BIT 1 COMMUNICATION OUTPUT BIT 1
  30. * BIT 2 COMMUNICATION OUTPUT BIT 2
  31. * BIT 3 COMMUNICATION OUTPUT BIT 3
  32. * BIT 4 COMMUNICATION OUTPUT BIT 4
  33. * BIT 5 COMMUNICATION OUTPUT BIT 5
  34. * BIT 6 COMMUNICATION OUTPUT BIT 6
  35. * BIT 7 COMMUNICATION OUTPUT BIT 7
  36. * BIT 8 COMMUNICATION OUTPUT BIT 8
  37. *
  38. * 1 1 COMMUNICATION CHANNEL DATA
  39. *
  40. * OUTPUT FROM A REGISTER
  41. * BIT 1 COMUNICATION OUTPUT BIT 9
  42. * BIT 2 COMUNICATION OUTPUT BIT 10
  43. * BIT 3-8 UNUSED
  44. *
  45. * 1 2 COMMUNICATION CHANNEL CONTROL
  46. *
  47. * OUTPUT FROM A REGISTER
  48. * BIT 1 ENABLE CHARACTER READY INTERRUPT
  49. * BIT 2 ENABLE CHARACTER REQUEST INTERRUPT
  50. * BIT 3 ENABLE LOOP BACK
  51. * BIT 4-8 UNUSED
  52. *
  53. * 2 0 KEYBOARD CONTROL
  54. *
  55. * OUTPUT FROM A REGISTER
  56. * BIT 1 ENABLE CHARACTER READY INTERRUPT
  57. * BIT 2-8 UNUSED
  58. * 3 0 TOUCH PANEL CONTROL
  59. *
  60. * OUTPUT FROM A REGISTER
  61. * BIT 1 ENABLE CHARACTER READY INTERRUPT
  62. * BIT 2-8 UNUSED
  63. *
  64. * 3 1 SLIDE PROJECTOR CONTROL
  65. * OUTPUT FROM A REGISTER
  66. *
  67. * BIT 1 SHUTTER OPEN=/ CLOSED=1
  68. * BIT 2 LAMP OFF=0 ON=1
  69. *
  70. * 3 2 SLIDE PROJECTOR DATA
  71. *
  72. * OUTPUT FROM A REGISTER
  73. * BIT 1 Y IMAGE COORDINATE BIT 1
  74. * BIT 2 Y IMAGE COORDINATE BIT 2
  75. * BIT 3 Y IMAGE COORDINATE BIT 3
  76. * BIT 4 Y IMAGE COORDINATE BIT 4
  77. * BIT 5 X IMAGE COORDINATE BIT 1
  78. * BIT 6 X IMAGE COORDINATE BIT 2
  79. * BIT 7 X IMAGE COORDINATE BIT 3
  80. * BIT 8 X IMAGE COORDINATE BIT 4
  81. * 4 3 DISPLAY DATA
  82. *
  83. * OUTPUT FROM A REGISTER
  84. * BIT 1 CHARACTER DATA BIT
  85. * BIT 2-7 UNUSED
  86. * BIT 8 VECTOR DATA BIT
  87. *
  88. * 4 4 DISPLAY X COORDINATE
  89. *
  90. * OUTPUT FROM A REGISTER
  91. * BIT 1 X COORDINATE BIT 1
  92. * BIT 2 X COORDINATE BIT 2
  93. * BIT 3 X COORDINATE BIT 3
  94. * BIT 4 X COORDINATE BIT 4
  95. * BIT 5 X COORDINATE BIT 5
  96. * BIT 6 X COORDINATE BIT 6
  97. * BIT 7 X COORDINATE BIT 7
  98. * BIT 8 X COORDINATE BIT 8
  99. *
  100. * 4 5 DISPLAY Y COORDINATE
  101. *
  102. * OUTPUT FROM A REGISTER
  103. * BIT 1 Y COORDINATE BIT 1
  104. * BIT 2 Y COORDINATE BIT 2
  105. * BIT 3 Y COORDINATE BIT 3
  106. * BIT 4 Y COORDINATE BIT 4
  107. * BIT 5 Y COORDINATE BIT 5
  108. * BIT 6 Y COORDINATE BIT 6
  109. * BIT 7 Y COORDINATE BIT 7
  110. * BIT 8 Y COORDINATE BIT 8
  111. *
  112. * 4 6 DISPLAY CONTROL 1
  113. *
  114. * OUTPUT FROM A REGISTER
  115. * BIT 1 X COORDINATE BIT 9
  116. * BIT 2 Y COORDINATE BIT 9
  117. * BIT 3 ENABLE LOAD X/Y COORDINATE BITS
  118. * BIT 4 X DIRECTION DEC EQUALS 1
  119. * BIT 5 Y DIRECTION DEC EQUALS 1
  120. * BIT 6 SHORT AXIS Y AXIS EQUALS 1
  121. * BIT 7 INHIBIT WRITE/ERASE INHIBIT EQUAL 1
  122. * BIT 8 VECTOR/CHARACTER VECTOR EQUALS 1
  123. *
  124. * 4 7 DISPLAY CONTROL 2
  125. *
  126. * OUTPUT FROM A REGISTER
  127. * BIT 1 BULK ERASE
  128. * BIT 2 W/E0
  129. * BIT 3 W/E1
  130. * BIT 4 ENABLE SELECT INVERSE VIDEO
  131. * BIT 5 SELECT INVERSE VIDEO
  132. * BIT 6 ENABLE CHARACTER ORIENTATION
  133. * BIT 7 CHARACTER ORIENTATION
  134. * BIT 8 UNUSED
  135. *
  136. ************************************************************************
  137. ************************************************************************
  138. *
  139. * INPUT FUNCTION DEFINITIONS
  140. *
  141. ************************************************************************
  142. *
  143. * CHANNEL FUNCTION DESCRIPTION
  144. *
  145. * 0 1 OPERATORS PANEL DATA
  146. *
  147. * BIT 1 INPUT REGISTER BIT 1
  148. * BIT 2 INPUT REGISTER BIT 2
  149. * BIT 3 INPUT REGISTER BIT 3
  150. * BIT 4 INPUT REGISTER BIT 4
  151. * BIT 5 INPUT REGISTER BIT 5
  152. * BIT 6 INPUT REGISTER BIT 6
  153. * BIT 7 UNUSED
  154. * BIT 8 UNUSED
  155. *
  156. * 1 0 COMMUNICATION CHANNEL DATA
  157. *
  158. * BIT 1 COMMUNICATION INPUT BIT 13
  159. * BIT 2 COMMUNICATION INPUT BIT 14
  160. * BIT 3 COMMUNICATION INPUT BIT 15
  161. * BIT 4 COMMUNICATION INPUT BIT 16
  162. * BIT 5 COMMUNICATION INPUT BIT 17
  163. * BIT 6 COMMUNICATION INPUT BIT 18
  164. * BIT 7 COMMUNICATION INPUT PARITY BIT
  165. * BIT 8 COMMUNICATION INPUT BIT 19
  166. *
  167. *
  168. * 1 1 COMMUNICATION CHANNEL DATA
  169. *
  170. * BIT 1 COMMUNICATION INPUT BIT 7
  171. * BIT 2 COMMUNICATION INPUT BIT 8
  172. * BIT 3 COMMUNICATION INPUT BIT 9
  173. * BIT 4 COMMUNICATION INPUT BIT 10
  174. * BIT 5 COMMUNICATION INPUT BIT 11
  175. * BIT 6 COMMUNICATION INPUT BIT 12
  176. * BIT 7 ZERO
  177. * BIT 8 ZERO
  178. *
  179. * 1 2 COMMUNICATION CHANNEL DATA
  180. *
  181. * BIT 1 COMMUNICATION INPUT BIT 1
  182. * BIT 2 COMMUNICATION INPUT BIT 2
  183. * BIT 3 COMMUNICATION INPUT BIT 3
  184. * BIT 4 COMMUNICATION INPUT BIT 4
  185. * BIT 5 COMMUNICATION INPUT BIT 5
  186. * BIT 6 COMMUNICATION INPUT BIT 6
  187. * BIT 7 UNUSED
  188. * BIT 8 UNUSED
  189. *
  190. * 1 3 COMMUNICATION CHANNEL STATUS
  191. *
  192. * BIT 1-4 UNUSED
  193. * BIT 5 OVERRUN
  194. * BIT 6 PARITY ERROR
  195. * BIT 7 CHARACTER REQUEST
  196. * BIT 8 CHARACTER READY
  197. *
  198. * 2 2 KEYBOARD DATA
  199. *
  200. * BIT 1 KEYBOARD INPUT DATA BIT 1
  201. * BIT 2 KEYBOARD INPUT DATA BIT 2
  202. * BIT 3 KEYBOARD INPUT DATA BIT 3
  203. * BIT 4 KEYBOARD INPUT DATA BIT 4
  204. * BIT 5 KEYBOARD INPUT DATA BIT 5
  205. * BIT 6 KEYBOARD INPUT DATA BIT 6
  206. * BIT 7 KEYBOARD INPUT DATA BIT 7
  207. * BIT 8 ZERO
  208. *
  209. * 2 1 KEYBOARD STATUS
  210. *
  211. * BIT 1 CHARACTER READY
  212. * BIT 2-8 UNUSED
  213. *
  214. * 3 0 TOUCH PANEL DATA
  215. *
  216. * BIT 1 Y POSITION BIT 1
  217. * BIT 2 Y POSITION BIT 2
  218. * BIT 3 Y POSITION BIT 3
  219. * BIT 4 Y POSITION BIT 4
  220. * BIT 5 X POSITION BIT 1
  221. * BIT 6 X POSITION BIT 2
  222. * BIT 7 X POSITION BIT 3
  223. * BIT 8 X POSITION BIT 4
  224. *
  225. * 3 1 TOUCH PANEL STATUS
  226. *
  227. * BIT 1 CHARACTER READY
  228. * BIT 2-8 UNUSED
  229. *
  230. * 4 0 DISPLAY READ X REGISTER
  231. *
  232. * BIT 1 X REGISTER BIT 1
  233. * BIT 2 X REGISTER BIT 2
  234. * BIT 3 X REGISTER BIT 3
  235. * BIT 4 X REGISTER BIT 4
  236. * BIT 5 X REGISTER BIT 5
  237. * BIT 6 X REGISTER BIT 6
  238. * BIT 7 X REGISTER BIT 7
  239. * BIT 8 X REGISTER BIT 8
  240. *
  241. * 4 1 DISPLAY READ Y REGISTER
  242. *
  243. * BIT 1 Y REGISTER BIT 1
  244. * BIT 2 Y REGISTER BIT 2
  245. * BIT 3 Y REGISTER BIT 3
  246. * BIT 4 Y REGISTER BIT 4
  247. * BIT 5 Y REGISTER BIT 5
  248. * BIT 6 Y REGISTER BIT 6
  249. * BIT 7 Y REGISTER BIT 7
  250. * BIT 8 Y REGISTER BIT 8
  251. *
  252. * 4 2 DISPLAY READ X/Y
  253. *
  254. * BIT 1 X REGISTER BIT 9
  255. * BIT 2 Y REGISTER BIT 9
  256. * BIT 3-8 UNUSED
  257. ************************************************************************
  258. ************************************************************************
  259. *
  260. * EQUATE STATEMENTS
  261. *
  262. ************************************************************************
  263. * VIDEO DISPLAY
  264. DISCHAN EQU 4 DISPLAY CHANNEL NUMBER
  265. DISDATA EQU 3 DISPLAY DATA
  266. DISCON1 EQU 6 DISPLAY CONTROL 1 FUNCTION
  267. DISCON2 EQU 7 DISPLAY CONTROL 2 FUNCTION
  268. YCOORD EQU 5 DISPLAY Y COORDINATE DATA
  269. XCOORD EQU 4 DISPLAY X COORDINATE DATA
  270. XYREAD EQU 2 DISPLAY READ XY BIT 9 FUNCTION
  271. ************************************************************************
  272. *
  273. * INTERRUPT AREA
  274. *
  275. * THE TERMINAL HAS EIGHT PRIORITY ENCODED INTERRUPT LINES.
  276. * LOWER NUMBERED INTERRUPT LINES HAVE A HIGHER PRIORITY THAN
  277. * HIGHER NUMBERED INTERRUPT LINES. THE PROCESSOR RECOGNIZES THE
  278. * INTERRUPT AT THE END OF THE CURRENT INSTRUCTION. THE
  279. * CURRENT VALUE OF THE PROGRAM COUNTER IS PUSHED INTO THE
  280. * PUSHDOWN STACK AND THE PROGRAM COUNTER IS SET TO THE TRAP
  281. * LOCATION DEFINED BY THE ACTIVATED INTERRUPT LINE.
  282. *
  283. * INTERRUPT LOCATION DEVICE
  284. * 0 HEX 00 MASTER CLEAR
  285. * 1 HEX 08 COMMUNICATION CHANNELS
  286. * 2 HEX 10 KEYBOARD
  287. * 3 HEX 18 TOUCH PANEL
  288. * 4 HEX 20 RESERVED
  289. * 5 HEX 28 EXTERNAL INTERFACE
  290. * 6 HEX 30 OPTIONS
  291. * 7 HEX 38 OPTIONS
  292. *
  293. ************************************************************************
  294. START EQU $
  295. *
  296. TRAP0 EQU $
  297. DI
  298. JMP RST.SEC0 MASTER RESET
  299. DB #00,#00,#00,#00
  300. *
  301. TRAP1 EQU $
  302. IN RSF.COMM*32+COMMSTAT
  303. XRA A TURN OFF THIS INT.
  304. OUT RSF.COMM*32+COMMCONT
  305. EI ENABLE SYSTEM INT.S
  306. RET
  307. DB #00
  308. *
  309. TRAP2 EQU $
  310. PUSH PSW KEYBOARD
  311. PUSH B
  312. PUSH D
  313. PUSH H
  314. JMP KEYINP
  315. *
  316. DB #00
  317. *
  318. TRAP3 EQU $
  319. PUSH PSW TOUCH PANEL
  320. PUSH B
  321. PUSH D
  322. PUSH H
  323. JMP TOUCHINP
  324. *
  325. DB #00
  326. *
  327. TRAP4 EQU $
  328. RET UNASSIGNED
  329. *
  330. DB #00,#00,#00,#00,#00,#00,#00
  331. *
  332. TRAP5 EQU $
  333. PUSH PSW
  334. PUSH B
  335. PUSH D
  336. PUSH H
  337. JMP EXT.PR EXTERNAL INTERRUPT
  338. DB #00
  339. *
  340. TRAP6 EQU $
  341. PUSH PSW
  342. PUSH B
  343. PUSH D
  344. PUSH H
  345. JMP EXT.PR EXTERNAL INTERRUPT
  346. DB #00
  347. *
  348. TRAP7 EQU $
  349. PUSH PSW
  350. PUSH B
  351. PUSH D
  352. PUSH H
  353. JMP EXT.PR EXTERNAL INTERRUPT
  354. DB #00
  355. * * * * * * * * * * * * * * * * * * * * * * * *
  356. *
  357. * USER JUMP TABLE TO ACCESS RESIDENT ROUTINES.
  358. *
  359. * * * * * * * * * * * * * * * * * * * * * * * *
  360. R.INIT JMP #4051 PLATO INITIALIZE
  361. R.DOT JMP #4003 WRITE/ERASE DOT
  362. R.LINE JMP #4006 DRAW LINE
  363. R.CHARS JMP CHARS DISPLAY CHARACTERS
  364. R.BLOCK JMP #400C BLOCK WRITE/ERASE
  365. R.INPX JMP #400F READ DISPLAY X COORD
  366. R.INPY JMP #4012 READ DISPLAY Y COORD
  367. R.OUTX JMP OUTX SETS NEW X COORD
  368. R.OUTY JMP OUTY SETS NEW Y COORD
  369. R.XMIT JMP #401B TRANSMIT DATA TO HLP
  370. R.MODE JMP MODESET SETS MODE,W/E,BULK ERASE
  371. R.STEPX JMP #4021 STEPS X AXIS COORD
  372. R.STEPY JMP #4024 STEPS Y AXIS COORD
  373. R.WE JMP #4027 W/E CURRENT POSITION
  374. R.DIR JMP #402A SET DIRECTION OF XY STEP
  375. R.INPUT JMP #402D DIRECTS DEVICE INPUT
  376. R.SSF JMP #4030 SELECT SPECIAL FUNCTION
  377. R.CCR JMP CCR SET CHARACTER INFO.
  378. R.EXTOUT JMP #4036 TO R.RETURN FOR NOW
  379. R.EXEC JMP #4039
  380. R.GJOB JMP #403C
  381. R.XJOB JMP #403F
  382. R.RETURN JMP #4042 RESTORE, ENABLE, RETURN
  383. JMP #4045 EXPANSION
  384. EXT.PR JMP #4048
  385. KEYINP JMP #404B
  386. TOUCHINP JMP #404E
  387. A.INIT JMP #4000 ASCII INITIALIZE
  388. DB #00,#00
  389. M0ADR DW M0CODE00
  390. M1ADR DW M1CODE00
  391. *
  392. * EXTERNAL ENTRY TO VARIOUS ROUTINES
  393. * BEGINNING AT ADDRESS #009A
  394. JMP SUPER
  395. JMP SUB
  396. JMP SELECTM0
  397. JMP SELECTM1
  398. JMP SELECTMM
  399. JMP HORZ
  400. JMP VERTICAL
  401. JMP FORWARD
  402. JMP REVERSE
  403. JMP SIZE.1
  404. JMP SIZE.2
  405. JMP BKSPACE
  406. JMP RETURN
  407. JMP TAB
  408. JMP LINEFEED
  409. JMP VERTAB
  410. JMP FORMFEED
  411. * MODE 3 - CHARACTER MODE USER ENTRY
  412. *
  413. CHARS EQU $
  414. MOV A,M LOAD DATA BYTE.
  415. INX H INCREMENT ADDRESS TO NEXT BYTE.
  416. SHLD M.ORG AND STORE FOR NEXT BYTE.
  417. ANI #7F MASK FOR SEVEN BIT CHARACTER CODES.
  418. MOV C,A SAVE CHARACTER CODE
  419. CPI #1B TEST FOR ESCAPE SEQ.
  420. JZ CHARACT4 SET FLAG FOR CONTROL CODE.
  421. *
  422. LXI H,M.CCR LOAD ADDRESS OF UNCOVER FLAG
  423. MVI A,#80 AND TEST FOR
  424. ANA M UNCOVER CODE IN PREVIOUS CHARACTER
  425. JZ CHARACT3 NOT CONTROL, PROCESS DATA.
  426. MVI A,#7F CLEAR ESCAPE FLAG
  427. ANA M
  428. MOV M,A
  429. MOV A,C EXIT IF ESC ASCII ZERO
  430. CPI #30
  431. RZ
  432. *
  433. * EXECUTE CONTROL FUNCTION DEFINED BY CHARACTER CODE
  434. *
  435. MOV A,C LOAD CHARACTER CODE
  436. CPI #40
  437. JC CHARACT2 CHARACT2, SEQ OUT OF RANGE
  438. CPI #50
  439. JNC CHARACT2 CHARACT2, SEQ OUT OF RANGE
  440. SUI #40 IN RANGE
  441. LXI H,CHARESC BASE ADDR ESC TBL
  442. CALL CONTROL
  443. JMP CHARACT2
  444. CHARACT2 EQU $
  445. LHLD M.ORG LOAD FWA OF DATA
  446. JMP CHARS LOAD NEXT CHARACTER CODE.
  447. *
  448. *
  449. CHARACT3 EQU $
  450. MOV A,C LOAD CHARACTER CODE
  451. CPI #20
  452. JNC CHAR3.A CHAR3.A, NOT CTL CODE
  453. CPI #08 TEST FOR CTL RANGE
  454. JC CHARACT2 CHARACT2, CTL OUT OF RANGE
  455. CPI #0E
  456. JP CHARACT2 CHARACT2, CTL OUT OF RANGE
  457. SUI #08 IN RANGE
  458. LXI H,CHARCTL BASE ADDR CTL TBL
  459. CALL CONTROL
  460. JMP CHARACT2
  461. CHAR3.A EQU $
  462. SUI #20
  463. CALL CHAREN AND DISPLAY CHARACTER.
  464. JMP CHARACT2
  465. *
  466. CHARACT4 EQU $
  467. LXI B,#7F80
  468. CALL UD.CCR
  469. JMP CHARACT2
  470. CHARCTL EQU $
  471. DW BKSPACE
  472. DW TAB
  473. DW LINEFEED
  474. DW VERTAB
  475. DW FORMFEED
  476. DW RETURN
  477. *
  478. CHARESC EQU $
  479. DW SUPER
  480. DW SUB
  481. DW SELECTM0
  482. DW SELECTM1
  483. DW SELECT SELECT M2, M3
  484. DW SELECT
  485. DW SELECT M4, M5, M6, OR M7
  486. DW SELECT
  487. DW SELECT CHARACTER SET.
  488. DW SELECT
  489. DW HORZ
  490. DW VERTICAL
  491. DW FORWARD
  492. DW REVERSE
  493. DW SIZE.1 8 X 16 CHARACTERS
  494. DW SIZE.2 16 X 32 CHARACTERS
  495. *
  496. CONTROL EQU $
  497. RLC
  498. MVI B,#00 CLEAR REGISTER B
  499. MOV C,A LOAD CHARACTER CODE
  500. DAD B FORM JUMP TABLE TABLE POINTER
  501. MOV E,M LOAD LEAST SIGN BYTE
  502. INX H INCREMENT ADDRESS
  503. MOV D,M LOAD MOST SIGN BYTE
  504. XCHG
  505. LXI D,HOR LOAD HOR PLOT FLAG ADDRESS.
  506. PCHL
  507. BKSPACE EQU $
  508. LDA FWD.REV LOAD FORWARD REVERSE FLAG
  509. CMA AND COMPLIMENT IT.
  510. STA FWD.REV
  511. CALL CH.PLOT CALCULATE VARIABLES FOR OPPOSITE PLOT
  512. CALL DISP.TAB TAB TO NEXT CHARACTER POSITION.
  513. LDA FWD.REV LOAD FORWARD REVERSE FLAG
  514. CMA AND RESTORE TO
  515. STA FWD.REV THE ORIGINAL .
  516. JMP CH.PLOT RESET PLOTTING VARIABLES.
  517. *
  518. TAB EQU $
  519. JMP DISP.TAB TAB TO NEXT CHARACTER POSITION.
  520. *
  521. LINEFEED EQU $
  522. LDAX D LOAD HOR. PLOT FLAG
  523. ANA A AND TEST FOR ZERO.
  524. LXI B,#FFF0 LOAD TAB ADJUSTMENT
  525. JNZ V.ADJ ADJUST VERTICAL
  526. LXI B,16 LOAD HOR. ADJUST
  527. JMP H.ADJ AMD ADJUST HOR.
  528. *
  529. VERTAB EQU $
  530. LDAX D LOAD HOR. PLOT FLAG
  531. ANA A AND TEST.
  532. LXI B,16 LOAD TAB ADJUST
  533. JNZ V.ADJ AND ADJUST VERT.
  534. LXI B,#FFF0 LOAD TAB ADJUST
  535. JMP H.ADJ AND ADJUST HOR.
  536. *
  537. FORMFEED EQU $
  538. LXI H,0000 LOAD COORDINATE 00
  539. LDA FWD.REV TEST FLAG FOR
  540. ORA A FORWARD OR REVRESE PLOT.
  541. CNZ FF.3 LOAD REVERSE PLOT COORDINATE.
  542. *
  543. * FORWARD PLOT SETTING.
  544. *
  545. LDAX D LOAD HOR. PLOT FLAG
  546. ORA A OR HORIZONTAL PLOT.
  547. JZ FF.2 GO TO VERTICAL SETTING.
  548. *
  549. * HORIZONTAL PLOT SETTING.
  550. *
  551. FF.1 EQU $
  552. CALL OUTX OUTPUT X COORDINATE.
  553. LXI H,512 LOAD FULL SCREEN COORDINATE
  554. LXI B,#FFF0 LOAD 2 " SIZE
  555. CALL SIZE.ADJ AND ADJUST FOR CHARACTER SIZE.
  556. JMP OUTY OUTPUT Y COORDINATE.
  557. *
  558. * VERTICAL PLOT SETTING.
  559. *
  560. FF.2 EQU $
  561. CALL OUTY OUTPUT Y COORDINATE.
  562. LXI H,#FFFF LOAD ADJUST VALUE
  563. LXI B,16 LOAD 2 X SIZE.
  564. CALL SIZE.ADJ ADJUST FOR CHARACTER SIZE.
  565. JMP OUTX OUTPUT X COORDINATE
  566. *
  567. * REVERSE PLOT SETTING.
  568. *
  569. FF.3 EQU $
  570. LXI H,512 LOAD FULL SCREEN COORDINATE.
  571. LXI B,#FFF8 LOAD NEGATIVE SIZE
  572. JMP SIZE.ADJ ADJUST FOR CHARACTER SIZE.
  573. *
  574. RETURN EQU $
  575. LHLD M.MARGIN LOAD DISPLAY MARGIN.
  576. LDAX D LOAD HOR. PLOT FLAG
  577. ANA A AND TEST.
  578. JZ RETURN1 NOT HORIZONTAL.
  579. *
  580. CALL OUTX OUTPUT X COORDINATE.
  581. LXI B,#FFF0 LOAD VERTICAL ADJUST
  582. JMP V.ADJ
  583. *
  584. RETURN1 EQU $
  585. CALL OUTY OUTPUT Y COORDINATE.
  586. LXI B,16 LOAD HORIZONTAL ADJUST VALUE.
  587. JMP H.ADJ
  588. *
  589. SUPER EQU $
  590. LDAX D LOAD HOR. PLOT FLAG
  591. ANA A AND TEST
  592. LXI B,05 LOAD SUPERSCRIPT ADJUST FOR HOR.
  593. JNZ V.ADJ ADJUST VERT.
  594. LXI B,#FFFB LOAD SUPERSCRIPT ADJUST
  595. JMP H.ADJ
  596. *
  597. SUB EQU $
  598. LDAX D LOAD HOR. PLOT FLAG
  599. ANA A AND TEST.
  600. LXI B,#FFFB LOAD SUBSCRIPT ADJUST
  601. JNZ V.ADJ ADJUST VERT.
  602. LXI B,05 LOAD ADJUST FOR SUBSCRIPT FOR VERT.
  603. JMP H.ADJ GO ADJUST HOR.
  604. *
  605. SELECTM0 EQU $
  606. LHLD M0ADR LOAD ADDRESS OF M0
  607. JMP SELECT.1
  608. SELECTM1 EQU $
  609. LHLD M1ADR LOAD ADDRESS OF M1
  610. JMP SELECT.1
  611. *
  612. SELECTMM EQU $
  613. MOV A,C
  614. SUI #44
  615. RLC
  616. JMP SELECT.0
  617. *
  618. SELECT EQU $
  619. RRC ADJUST CODE FOR INDEX
  620. SUI #08
  621. SELECT.0 EQU $
  622. MOV E,A ADDRESS STORE.
  623. *
  624. LXI H,MEMORY.2 LOAD ADDR. OF MEM2 POINTER
  625. MVI D,00
  626. DAD D AND ADD INDEX.
  627. *
  628. MOV E,M LOAD CHARACTER SET
  629. INX H ADDRESS FROM
  630. MOV D,M STORE AREA.
  631. XCHG
  632. *
  633. SELECT.1 EQU $
  634. SHLD MEMSEL CHARACTER SET
  635. MOV A,C GET BIT PATTERN SET UP
  636. ADI #0C FOR SETTING M.CCR WITH
  637. MOV C,A CORRECT CHARACTER SET
  638. MVI A,#0E MASK BITS
  639. ANA C FOR MEMORY SELECTED.
  640. MOV C,A
  641. MVI B,#F1
  642. JMP UD.CCR GO SET FLAG.
  643. HORZ EQU $
  644. XCHG LOAD HOR FLAG ADDRESS
  645. MVI M,#FF AND SET TO ALL ONES FOR HOR. PLOT.
  646. INX H INCREMENT ADDRESS TO VERT.
  647. MVI M,00 AND CLEAR VERT PLOT FLAG.
  648. *
  649. CALL CH.PLOT CALL ROUTINE TO CALCULATE PLOTTING.
  650. LXI B,#FE00 LOAD MASK AND HOR BITS
  651. CALL UD.CCR GO UPDATE PLOT FLAG
  652. MVI A,#20 SET HORIZONTAL CHARACTER ORIENTATION.
  653. JMP VERTICA1
  654. VERTICAL EQU $
  655. XCHG LOAD HOR FLAG ADDRESS
  656. MVI M,00 CLEAR HOR PLOT FLAG.
  657. INX H INCREMENT ADDRESS
  658. MVI M,#FF AND SET FLAG FOR VERT. PLOT.
  659. CALL CH.PLOT CALL ROUTINE TO CALCULATE PLOTTING.
  660. LXI B,#FE01 LOAD MASK AND VERT BIT
  661. CALL UD.CCR GO UPDATE PLOT FLAG
  662. XRA A CLEAR A REGISTER.
  663. VERTICA1 EQU $
  664. ORI #40 SET ORIENTATION ENABLE BIT
  665. MOV B,A SAVE ORIENTATION BITS
  666. LDA D.CNTL2 LOAD DISPLAY CONTROL 2
  667. ANI 06 AND MASK WRITE EREASE BITS.
  668. ORA B ADD ORIENTATION BITS TO CONTROL
  669. STA D.CNTL2 AND STORE FOR CHARACTER GENERATOR.
  670. RET
  671. REVERSE EQU $
  672. MVI A,#FF LOAD REVERSE FLAG
  673. JMP FRWD.1
  674. FORWARD EQU $
  675. XRA A LOAD FORWARD FLAG
  676. *
  677. FRWD.1 EQU $
  678. STA FWD.REV STORE FORWARD REVERSE FLAG
  679. LXI B,#BF40 LOAD MASK AND REVERSE BIT
  680. ANA C SET REVERSE FOR FORWARD OR REVERSE
  681. MOV C,A
  682. CALL UD.CCR GO UPDATE PLOT FLAG
  683. JMP CH.PLOT CALL ROUTINE TO CALCULATE PLOTTING.
  684. SIZE.2 EQU $
  685. MVI A,16 LOAD SIZE TWO
  686. LXI H,CHAR.S2 LOAD CHARACTER GENERATOR FOR SIZE 2
  687. JMP SIZE.11
  688. SIZE.1 EQU $
  689. MVI A,8 LOAD SIZE ONE.
  690. LXI H,CHAR.S1 LOAD CHARACTER GENERATOR FOR SIZE 1
  691. SIZE.11 EQU $
  692. SHLD CHAR.GEN STORE CHARACTER GENERATOR ADDRESS.
  693. STA SIZE IN SIZE REGISTER.
  694. MVI B,#DF LOAD MASK
  695. RLC ROTATE SIZE BIT
  696. ANI #20 AND MASK FOR SIZE TWO
  697. MOV C,A
  698. CALL UD.CCR GO UPDATE PLOT FLAG
  699. JMP CH.PLOT CALL ROUTINE TO CALCULATE PLOTTING.
  700. *
  701. * UPDATE OF M.CCR
  702. *
  703. UD.CCR EQU $
  704. LDA M.CCR LOAD CURRENT FLAG.
  705. ANA B MASK BIT BEING CHANGED
  706. ORA C SET NEW VALUE OF BIT
  707. STA M.CCR STORE UPDATED FLAG.
  708. RET RETURN TO CALLER
  709. ************************************************************************
  710. *
  711. * CHARACTER GENERATOR
  712. *
  713. ************************************************************************
  714. * THE FORMAT OF MODE 3 DATA WORDS CONTAINS THREE 6 BIT CHARACTER
  715. * THESE CODES DEFINES THE MEMORY ADDRESSES OF THE CHARACTERS TO B
  716. * PLOTTED. FOUR 64 CHARACTER MEMORIES ARE CONTAINED IN THE TERMI
  717. * MEMORIES M0 AND M1 CONTAIN FIXED CHARACTERS AND MEMORIES M2 AND
  718. * CONTAIN VARIABLE CHARACTERS LOADED BY MODE 1 WORDS AND ARE PROC
  719. * BY MODE 3 AS 64 ARRAYS OF 8X16 MATRIX. THE TOP THREE ROWS AND T
  720. * BOTTOM ROW OF THE MATRICES FOR ALL CHARACTERS FROM M0 AND M1 AR
  721. * ALWAYS UNFILLED. LIKEWISE THE EIGHTH COLOMN IS ALSO UNFILLED T
  722. * PROVIDE INTERCHARACTER SPACING. AS A RESULT THE BASIC CHARACTE
  723. * IS 7X9 FOR THE CHARACTERS FROM M0 AND M1 MEMORIES
  724. *
  725. * CHARACTER WRITE/ERASE IS CONTROLLED BY THE WRITE/ERASE BITS IN
  726. * LDM INSTRUCTION WORD. IF BIT 2=1,CHARACTERS ARE WRITTEN IN
  727. * ACCORDANCE WITH DATA STORED IN M0 AND M1.IF BIT 2=0,CHARACTERS
  728. * ARE ERASED. IF BIT 3=0,THE BACKGROUND OF EACH CHARACTER MATRIX
  729. * ERASED.IF BIT 3=1,THE BACKGROUND REMAINS UNALTERED(OVERSTRIKE).
  730. *
  731. * WHEN A CHARACTER HAS BEEN COMPLETELY PLOTTED THE X/Y ADDRESS IS
  732. * AT THE LOWER LEFT HAND CORNER OF THE NEXT MATRIX READY FOR THE
  733. * PLOT. IN THIS WAY,CHARACTER PLOTTING PROCEEDS FROM LEFT TO RIG
  734. * ACROSS THE SCREEN. UP TO 32 LINES OF 64 CHARACTERS EACH MAY BE
  735. * FOR A TOTAL OF 2048 CHARACTERS
  736. *
  737. ************************************************************************
  738. *
  739. * INITIALIZE MEMORY ADDRESS OF CHARACTER
  740. *
  741. CHAREN MVI H,#00 CLEAR H REGISTER
  742. MOV L,A PLACE CHARACTER CODE IN REGISTER
  743. DAD H SHIFT LEFT ONE PLACE
  744. DAD H SHIFT LEFT ONE PLACE
  745. DAD H SHIFT LEFT ONE PLACE
  746. DAD H SHIFT LEFT ONE PLACE
  747. XCHG SAVE CHARACTER INDEX
  748. LHLD MEMSEL LOAD CHARACTER MEMORY.
  749. DAD D ADD INDEX FOR CHARACTER ADDRESS
  750. XCHG SAVE CHARACTER ADDRESS IN DE
  751. *
  752. *
  753. LDA FWD.REV LOAD FORWARD REVERSE FLAG
  754. ANA A AND TEST PLOTTING DIRECTION.
  755. JZ CHAR6 FORWARD, CONTINUE.
  756. PUSH D SAVE DE REGISTERS
  757. CALL DISP.TAB AND TAB TO REVERSE CHARACTER
  758. POP D POSITION BEFORE CHARACTER.
  759. CHAR6 EQU $
  760. LDA D.CNTL2 LOAD CONTROL 2 FOR CHARACTER
  761. OUT DISCHAN*32+DISCON2 ND OUT PUT ORIENTATION AND W/E
  762. LDA VER LOAD VERTICAL PLOT FLAG
  763. ANI 08 AND MASK FOR VERTICAL PLOT BIT.
  764. OUT DISCHAN*32+DISCON1 ND OUTPUT FOR CHARACTER PLOT.
  765. RLC
  766. MOV B,A SAVE X DIRECTION BIT
  767. LHLD YREG LOAD CURRENT Y COORD.
  768. SHLD YSAVE AND SAVE
  769. MOV C,L SAVE LOWER 8 BITS OF Y
  770. LHLD XREG LOAD CURRENT X COORD.
  771. SHLD XSAVE AND SAVE
  772. IN DISCHAN*32+XYREAD READ UPPER X,Y BITS
  773. ANI #3
  774. MOV H,A TEMP SAVE
  775. RLC SHIFT Y BIT UP 1 POSITION
  776. XRA H INSERT X BIT
  777. ANI #5 MASK FOR X,Y BITS ONLY
  778. XRI #08 AND ENABLE BIT,SETS NZ FLG
  779. XRA B ADD X DIRECTION BIT
  780. MOV H,A
  781. LDA SIZE LOAD CHARACTER SIZE
  782. MOV B,A AND SAVE AS COLUMN COUNT
  783. ************************************************************
  784. *
  785. * CHARACTER GENERATOR ENTRY
  786. * REG B COLUMN COUNT
  787. * REG C LOWER 8 BITS OF Y COORDINATE
  788. * REG L LOWER 8 BITS OF X COORDINATE
  789. * REG H ENABLE,Y,0,X
  790. * REG DE CHARACTER DATA WORD ADDRESS
  791. ************************************************************
  792. CHAR7 EQU $
  793. PUSH H
  794. LHLD CHAR.GEN LOAD CHARACTER GENERATOR ADDRESS
  795. CALL INDIRECT
  796. POP H
  797. *
  798. LDA VER TEST FOR VERTICAL OR
  799. RAL HORIZONTAL CHARACTER PLOT.
  800. JC CHAR9 GO TO VERTICAL PLOT.
  801. *
  802. * HORIZONTAL CHARACTER PLOTTING
  803. *
  804. INX H INCREMENT X COORDINATE
  805. CHARH MOV A,L
  806. OUT DISCHAN*32+XCOORD OUTPUT LOWER 8 OF X
  807. MOV A,C
  808. OUT DISCHAN*32+YCOORD OUTPUT LOWER 8 OF Y
  809. MOV A,H
  810. ANI #1D CLEAR X OVERFLOW BIT
  811. INR A MOVES X BIT RIGHT 1
  812. RAR MOVE WORD RIGHT ONE
  813. OUT DISCHAN*32+DISCON1 OUTPUT UPPER X,Y BITS
  814. DCR B DECREMENT COLUMN COUNT
  815. JNZ CHAR7 CHECK FOR CHAR. COMPLETE
  816. * LOCATE FOR NEXT CHARACTER.
  817. CHAR10 EQU $
  818. MOV E,C SAVE LOWER 8 OF Y COORD.
  819. MOV A,H
  820. RRC
  821. RRC
  822. ANI 1
  823. MOV D,A SAVE UPPER BIT OF Y COORD.
  824. MOV A,H
  825. ANI 1
  826. MOV H,A SAVE UPPER X COORD.
  827. SHLD XREG
  828. XCHG
  829. SHLD YREG
  830. LDA FWD.REV TEST FOR FORWARD OR REVERSE
  831. ANA A CHARACTER PLOTTING.
  832. RZ FORWARD, GET NEXT CHARACTER.
  833. *
  834. LHLD YSAVE LOAD Y AND X
  835. XCHG COORDINATES FOR
  836. LHLD XSAVE FOR POSITIONING
  837. JMP OUTCOORD FOR REVERSE PLOTTING.
  838. *
  839. * VERTICAL CHARACTER PLOTTING.
  840. *
  841. CHAR9 EQU $
  842. INR C INCREMENT Y COORD.
  843. JNZ CHARH JUMP IF NO OVERFLOW
  844. MOV A,H
  845. XRI #04 TOGGLE UPPER BIT OF Y
  846. MOV H,A SAVE UPPER BITS
  847. JMP CHARH
  848. ************************************************************************
  849. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  850. *
  851. * S U B R O U T I N E S
  852. *
  853. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  854. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  855. *
  856. * SIZE ONE CHARACTER GENERATOR
  857. *
  858. * THIS ROUTINE OUTPUTS TWO BYTES OF A 8 X 16 CHARACTER
  859. * TO THE DISPLAY.
  860. *
  861. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  862. TWICE XRA A SET ZERO FLAG
  863. CHAR.S1 EQU $
  864. LDAX D LOAD BYTE OF CHARACTER DATA
  865. INX D INCREMENT CHARACTER ADDRESS
  866. OUT DISCHAN*32+DISDATA OUTPUT BYTE
  867. RAR
  868. OUT DISCHAN*32+DISDATA OUTPUT
  869. RAR
  870. OUT DISCHAN*32+DISDATA CHARACTER
  871. RAR
  872. OUT DISCHAN*32+DISDATA DATA
  873. RAR
  874. OUT DISCHAN*32+DISDATA
  875. RAR
  876. OUT DISCHAN*32+DISDATA
  877. RAR
  878. OUT DISCHAN*32+DISDATA
  879. RAR
  880. OUT DISCHAN*32+DISDATA
  881. RZ RETURN AFTER SECOND PASS
  882. JMP TWICE
  883. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  884. *
  885. * SIZE TWO CHARACTER GENERATOR
  886. *
  887. * THIS ROUTINE OUTPUTS TWO BYTES OF A 16 X 32 CHARACTER
  888. * TO THE DISPLAY.
  889. *
  890. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  891. TWICE1 XRA A SET ZERO FLAG
  892. CHAR.S2 EQU $
  893. LDAX D LOAD CHARACTER DATA BYTE
  894. INX D INCREMENT DATA ADDRESS
  895. OUT DISCHAN*32+DISDATA
  896. OUT DISCHAN*32+DISDATA
  897. RAR
  898. OUT DISCHAN*32+DISDATA
  899. OUT DISCHAN*32+DISDATA
  900. RAR
  901. OUT DISCHAN*32+DISDATA
  902. OUT DISCHAN*32+DISDATA
  903. RAR
  904. OUT DISCHAN*32+DISDATA
  905. OUT DISCHAN*32+DISDATA
  906. RAR
  907. OUT DISCHAN*32+DISDATA
  908. OUT DISCHAN*32+DISDATA
  909. RAR
  910. OUT DISCHAN*32+DISDATA
  911. OUT DISCHAN*32+DISDATA
  912. RAR
  913. OUT DISCHAN*32+DISDATA
  914. OUT DISCHAN*32+DISDATA
  915. RAR
  916. OUT DISCHAN*32+DISDATA
  917. OUT DISCHAN*32+DISDATA
  918. JNZ TWICE1 CHECK FOR SECOND PASS
  919. MOV A,B LOAD COLUMN COUNT
  920. RAR AND TEST FOR
  921. RC
  922. DCX D DECREMENT THE DATA
  923. DCX D POINTER
  924. RET
  925. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  926. *
  927. * DISPLAY TAB ROUTINE.
  928. *
  929. * THIS ROUTINE SET THE X AND Y REGISTERS TO TAB FOR
  930. * THE NEXT CHARACTER POSITION.
  931. *
  932. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  933. DISP.TAB EQU $
  934. LHLD XREG LOAD CURRENT X
  935. XCHG AND SAVE IN DE
  936. LHLD X.PLOT LOAD X CHARACTER PLOT
  937. DAD D ADD TO CURRENT X
  938. CALL OUTX OUTPUT X COORDINATE.
  939. LHLD YREG LOAD CURREMT Y
  940. XCHG AND SAVE IN DE
  941. LHLD Y.PLOT LOAD Y CHARACTER PLOT
  942. DAD D ADD TO CURRENT Y
  943. JMP OUTY OUTPUT Y COORDINATE.
  944. *
  945. *
  946. * HORIZONTAL AND VERTICAL COORDINATE ADJUST ROUTINE
  947. *
  948. V.ADJ EQU $
  949. LHLD YREG LOAD CURRENT Y COORDINATE
  950. CALL SIZE.ADJ AND ADJUST WITH CHARACTER SIZE.
  951. JMP OUTY OUTPUT Y COORDINATE.
  952. *
  953. H.ADJ EQU $
  954. LHLD XREG LOAD CURRENT X COORDINATE
  955. CALL SIZE.ADJ AND ADJUST WITH CHARACTER SIZE.
  956. JMP OUTX OUTPUT X COORDINATE.
  957. *
  958. SIZE.ADJ EQU $
  959. LDA SIZE LOAD CHARACTER SIZE
  960. CPI 08 AND TEST FOR SIZE 1.
  961. JZ S.ADJ.1 SIZE 1 , CONTINUE.
  962. MOV A,C LOAD LOWER BYTE OF ADJUST
  963. ADD A AND DOUBLE IT.
  964. MOV C,A
  965. *
  966. S.ADJ.1 EQU $
  967. DAD B ADD ADJUST TO COORDINATE
  968. RET
  969. * * * * * * * * * * * * * * * * * * * * *
  970. *
  971. * INITIALIZE PLOTTING FLAG FOR HORIZONTAL, SIZE 0
  972. * CHARACTERS IN THE FORWARD DIRECTION.
  973. *
  974. INIT.PLT EQU $
  975. MVI L,#1A SET CHARACTER MODE
  976. CALL R.MODE AND WRITE BITS
  977. MVI L,00 SET CHAR. PLOT PARAMS
  978. *
  979. * * * * * * * * * * * * * * * * * * * * * * * *
  980. *
  981. * M.CCR AND CHARACTER PLOTTING PARAMETERS ARE SET IN ACCORDANCE
  982. * WITH THE CONTENTS OF HL REGISTERS.
  983. *
  984. * BIT FUNCTION
  985. * 1 1=VERTICAL, 0=HORIZONTAL
  986. * 2,3,4 CHARACTER MEMORY SELECTED, 0-7
  987. * 5 UNUSED
  988. * 6 1=SIZE TWO CHARACTERS, 0=SIZE ONE CHARACTERS
  989. * 7 1=REVERSE, 0=FORWARD
  990. * 8 UNUSED
  991. *
  992. * * * * * * * * * * * * * * * * * * * * * * * *
  993. CCR EQU $
  994. SHLD M.CCR STORE PARAMETERS
  995. MOV A,L
  996. *
  997. ANI 01 MASK HOR/VERT BIT
  998. ADI #0A ADD CONSTANT TO RUN
  999. LXI H,CHARESC THIS THRU CONTROL
  1000. CALL CONTROL
  1001. *
  1002. LDA M.CCR LOAD FLAG BITS
  1003. RRC ADD ROTATE TO CHAR SET BITS.
  1004. ANI 07 MASK OFF CHAR SET BITS
  1005. ADI #02 ADD CONSTANT TO RUN
  1006. LXI H,CHARESC THIS THRU CONTROL AGAIN
  1007. CALL CONTROL
  1008. *
  1009. LDA M.CCR LOAD UP BITS AGAIN
  1010. RLC AND ROTATE
  1011. RLC TO FORWARD/REVERSE BITS
  1012. ANI 01 MASK FORWARD/REVERSE BIT
  1013. ADI #0C ADD CONSTANT TO RUN
  1014. LXI H,CHARESC THIS THRU CONTROL AGAIN
  1015. CALL CONTROL
  1016. *
  1017. LDA M.CCR LOAD FLAG BITS
  1018. RLC NOW ROTATE
  1019. RLC TO THE
  1020. RLC SIZE BIT
  1021. ANI 01 MASK HIM OFF
  1022. ADI #0E ADD CONSTANT TO RUN
  1023. LXI H,CHARESC THIS THRU CONTROL AGAIN
  1024. CALL CONTROL
  1025. RET
  1026. * LOAD TERMINAL OPERATING MODE INSTRUCTION
  1027. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  1028. *
  1029. * CHARACTER PLOTTING CALCULATIONS.
  1030. *
  1031. * THIS SUBROUTINE CALCULATES THE VALUES TO PLOT CHARACTERS
  1032. * AS TO HORIZONTAL, VERTICAL, FORWARD, REVERSE, AND SIZE.
  1033. *
  1034. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  1035. CH.PLOT EQU $
  1036. MVI B,#FF
  1037. LXI H,SIZE LOAD CHARACTER
  1038. MOV A,M SIZE AND ADD
  1039. INX H TO FORWARD/REVERSE
  1040. ADD M TO SET DIRECTION OF PLOT.
  1041. JNC CH.PLOT1 IF CARRY IS SET
  1042. CMA COMPLIMENT RESULT FOR NEGATIVE.
  1043. CH.PLOT1 EQU $
  1044. MOV C,A SAVE RESULT.
  1045. INX H
  1046. ANA M AND RESULT TO DETERMINE
  1047. MOV E,A VALUE OF X AXIS PLOTTING.
  1048. MOV D,B AND LOAD FOR STORING.
  1049. JM CH.PLOT2 IF RESULT IS POSITIVE,
  1050. INR D CLEAR UPPER BYTE.
  1051. CH.PLOT2 EQU $
  1052. XCHG STORE THE RESULT
  1053. SHLD X.PLOT FOR X AXIS
  1054. XCHG CHARACTER PLOTTING.
  1055. MOV A,C LOAD SIZE AND DIRECTION RESULT
  1056. INX H
  1057. ANA M AND RESULT TO DETERMINE
  1058. MOV E,A VALUE OF Y AXIS PLOTTING,
  1059. MOV D,B AND LOAD FOR STORE.
  1060. JM CH.PLOT3 IF RESULT IS POSITIVE
  1061. INR D CLEAR UPPER BYTE.
  1062. CH.PLOT3 EQU $
  1063. XCHG STORE RESULT FOR
  1064. SHLD Y.PLOT Y AXIS CHARACTER PLOTTING.
  1065. RET
  1066. *
  1067. * THIS INSTRUCTION PERFORMS THE FOLLOWING FOUR FUNCTIONS
  1068. *
  1069. * 1. INHIBIT TOUCH PANEL IF INHIBIT BIT IS SET
  1070. * 2. LOAD WORD COUNT IF WORD COUNT ENABLE BIT IS SET
  1071. * 3. BULK ERASE IF BULK ERASE BIT IS SET
  1072. * 4. LOAD MODE WORD
  1073. *
  1074. ************************************************************************
  1075. *
  1076. * MODE SELECTION
  1077. *
  1078. * BIT 1 BULK ERASE
  1079. *
  1080. * BIT 3 BIT 2
  1081. * 0 0 ERASE WRITE CHARACTER BACKGROUND
  1082. * 0 1 WRITE ERASE CHARACTER BACKGROUND
  1083. * 1 0 ERASE NO OPERATION
  1084. * 1 1 WRITE NO OPERATION
  1085. *
  1086. * BIT 6 BIT 5 BIT 4
  1087. * 0 0 0 MODE 0 POINT PLOT
  1088. * 0 0 1 MODE 1 DRAW LINE
  1089. * 0 1 0 MODE 2 LOAD MEMORY
  1090. * 0 1 1 MODE 3 CHARACTER
  1091. * 1 0 0 MODE 4 BLOCK ERASE
  1092. * 1 0 1 MODE 5 USER PROGRAM
  1093. * 1 1 0 MODE 6 USER PROGRAM
  1094. * 1 1 1 MODE 7 USER PROGRAM
  1095. *
  1096. * BIT 7-13 WORD COUNT
  1097. *
  1098. * BIT 14 LOAD WORD COUNT
  1099. *
  1100. * BIT 15 INHIBIT
  1101. *
  1102. ************************************************************************
  1103. MODESET EQU $
  1104. MOV A,L
  1105. ANI #07
  1106. OUT DISCHAN*32+DISCON2 OUTPUT DISPLAY CONTROL 2
  1107. ANI 06 SAVE WRITE ERASE BITS
  1108. MOV B,A IN B REG.
  1109. LDA D.CNTL2 LOAD DISPLAY CONTROL 2
  1110. ANI #60 AND MASK ORIENTATION BITS.
  1111. ORA B ADD WRITE ERASE BITS
  1112. STA D.CNTL2 AND STORE FOR CHARACTER GENERATOR
  1113. *
  1114. MVI A,#3E MASK MODE AND
  1115. ANA L W/E BITS
  1116. RRC
  1117. STA M.MODE AND STORE.
  1118. RET
  1119. * * * * * * * * * * * * * * * * * * * * * * * *
  1120. OUTX EQU $
  1121. MVI A,01 CHOP OFF UNWANTED
  1122. ANA H BITS THAT WILL
  1123. MOV H,A SCREW THINGS UP.
  1124. SHLD XREG STORE NEW X COORDINATE.
  1125. MOV A,L LOAD LOWER 8 BITS
  1126. OUT DISCHAN*32+XCOORD ND OUTPUT TO DISPLAY.
  1127. IN DISCHAN*32+XYREAD PUT UPPER BITS OF X AND Y
  1128. ANI 02 MASK Y
  1129. ORA H INCLUDE NEW X BIT
  1130. ORI 04 SET LOAD ENABLE
  1131. OUT DISCHAN*32+DISCON1 OUTPUT UPPER BITS OF X AND Y.
  1132. RET RETURN TO CALLER
  1133. * * * * * * * * * * * * * * * * * * * * * * * *
  1134. *
  1135. * SUBROUTINE TO OUTPUT Y COORDINATE TO THE DISPLAY.
  1136. *
  1137. * * * * * * * * * * * * * * * * * * * * * * * *
  1138. OUTY EQU $
  1139. MVI A,01 CHOP OFF UNWANTED
  1140. ANA H BITS THAT WILL
  1141. MOV H,A SCREW THINGS UP.
  1142. SHLD YREG STORE NEW Y COORDINATE.
  1143. MOV A,L LOAD LOWER 8 BITS
  1144. OUT DISCHAN*32+YCOORD ND OUTPUT TO DISPLAY.
  1145. IN DISCHAN*32+XYREAD NPUT CURRENT UPPER BITS
  1146. ANI 01 MASK X COORDINATE BIT
  1147. RRC SHIFT IN
  1148. ORA H NEW Y BIT
  1149. RLC
  1150. ORI 04 SET LOAD ENABLE BIT
  1151. OUT DISCHAN*32+DISCON1 OUTPUT NEW UPPER BITS
  1152. RET RETURN TO CALLER.
  1153. * * * * * * * * * *
  1154. *
  1155. * OUTPUT X AND Y COORDINATES
  1156. * Y COORDINATE DE REGISTER PAIR
  1157. * X COORDINATE HL REGISTER PAIR
  1158. *
  1159. * * *@*@ * * * * * * *
  1160. OUTCOORD EQU $
  1161. CALL OUTX SET X COORDINATE
  1162. XCHG
  1163. JMP OUTY SET Y COORDINATE
  1164. * * * * * * * * * *
  1165. *
  1166. * USED TO CALL A ROUTINE WITH CONTENTS OF HL REGISTER
  1167. *
  1168. * * * * * * * * * *
  1169. *
  1170. INDIRECT EQU $
  1171. PCHL
  1172. *
  1173. ***
  1174. * 1.0 GENERAL-
  1175. *
  1176. * RIST - RESIDENT DIAGNOSTIC FOR INFORMATION SYSTEMS
  1177. * TERMINAL (IST)
  1178. *
  1179. * COPYRIGHT CONTROL DATA CORP., 1975
  1180. *
  1181. * M.C. FEGELY
  1182. * SUPAL ASSEMBLY LANGUAGE
  1183. * FIELD DIAGNOSTIC
  1184. *
  1185. * 2.0 PURPOSE-
  1186. *
  1187. * THIS DIAGNOSTIC WILL VERIFY CORRECT OPERATION OF THE
  1188. * SUB-MINI CONTROLLER (SMC) AND THE IST TERMINAL. THE
  1189. * TESTING WILL PERFORM A COMMAND TEST
  1190. * TEST THE DISPLAY INTERFACE, TEST THE
  1191. * KEYBOARD AND TOUCH PANEL.
  1192. *
  1193. * 3.0 APPLICABLE DOCUMENTS
  1194. *
  1195. * 16031600 PROCESSOR MODULE SPECIFICATION
  1196. * - IST DIAGNOSTIC PLAN
  1197. * ARH750 - EXTERNAL REFERENCE SPECIFICATION - SUPAL
  1198. * ASSEMBLER
  1199. * - INTEL 8080 PROGRAMMING MANUAL
  1200. * 16040600 EXTERNAL SPECIFICATION - INFORMATION
  1201. * SYSTEMS TERMINAL (REV. C)
  1202. * 62964500 QLIA - QUICKLOOK CONFIDENCE TEST FOR
  1203. * THE SMC (SUB-MINI CONTROLLER) - ERS
  1204. *
  1205. *
  1206. * 4.0 REQUIREMENTS
  1207. *
  1208. * 4.1 HARDWARE-
  1209. *
  1210. * IST CONFIGURATION:
  1211. *
  1212. * PROCESSOR MODULE
  1213. * 16K RAM BOARD
  1214. * ROM MODULE (6K)
  1215. * DISPLAY INTERFACE
  1216. * MAINTENANCE PANEL FOR EXECUTION SELECTION AND
  1217. * DISPLAYING OF ERRORS
  1218. * KEYBOARD/TOUCH PANNEL
  1219. *
  1220. * 4.2 SOFTWARE-
  1221. *
  1222. * THE DIAGNOSTIC WILL TEST THE HARDWARE OF THE IST
  1223. * TERMINAL. IF AN ERROR OCCURS, THE ERROR
  1224. * CODE WILL BE DISPLAYED ON THE
  1225. * MAINENANCE PANEL LEDS.
  1226. *
  1227. * UPON SUCCESSFUL EXECUTION OF THE RESIDENT DIAGNOSTIC,
  1228. * CONTROL WILL BE GIVEN TO THE CONTROLWARE.
  1229. *
  1230. * 4.3 ACCESORIES-
  1231. *
  1232. * NONE
  1233. *
  1234. * 4.4 TIME LIMIT
  1235. *
  1236. * EXECUTION TIME SHALL NOT EXCEED 1 MIN. EXCLUDING
  1237. * THE MANUAL INTERVENTION SECTION (SEC. 4 - KEYBOARD/
  1238. * TOUCH PANEL TEST).
  1239. *
  1240. * 4.5 DETECTION/ISOLATION
  1241. *
  1242. * THE DETECTION LEVEL WILL BE 95 PER CENT. THE
  1243. * ISOLATION WILL BE 90 PER CENT.
  1244. *
  1245. * 5.0 OPERATIONAL PROCEDURE-
  1246. *
  1247. * 5.1 LOADING-
  1248. *
  1249. * NO LOADING IS REQUIRED IN THAT THE DIAGNOSTIC
  1250. * RESIDES IN ROM.
  1251. *
  1252. * 5.2 PARAMETERS-
  1253. *
  1254. * MAINTENANCE SWITCHES MAY BE SELECTED AS DESCRIBED
  1255. * IN 5.4 (EXECUTION) BELOW.
  1256. *
  1257. * SWITCH SUMMARY
  1258. *
  1259. * SWITCH 1 OFF - EXECUTE DIAGNOSTIC
  1260. * ON - BYPASS DIAGNOSTIC
  1261. *
  1262. * SWITCH 2 OFF - 300 BAUD
  1263. * ON - 1200 BAUD
  1264. *
  1265. * SWITCH 3 OFF - BYPASS KYBD-TOUCH PANEL SECTION
  1266. * ON - EXECUTE KYBD-TOUCH PANEL SECTION
  1267. *
  1268. * SWITCH 4 OFF - DO NOT LOOP DIAGNOSTIC
  1269. * ON - LOOP ENTIRE DIAGNOSTIC
  1270. *
  1271. * SWITCH 5 OFF - CHECK KYBD ONLY
  1272. * ON - CHECK KYBD AND TOUCH PANEL
  1273. *
  1274. * 5.3 SECTION DESCRIPTION INDEX-
  1275. *
  1276. * SECTION 1 COMMAND TEST
  1277. * SECTION 3 DISPLAY INTERFACE TEST
  1278. * SECTION 4 KEYBOARD/TOUCH PANEL TEST
  1279. *
  1280. * 5.4 EXECUTION-
  1281. *
  1282. * THERE ARE TWO (2) WAYS TO EXECUTE THE RESIDENT
  1283. * DIAGNOSTIC:
  1284. * 1) POWER-ON
  1285. * 2) MASTER CLEAR
  1286. *
  1287. * TO BY-PASS THE RESIDENT TEST COMPLETLY, SET SWITCH 1
  1288. * ON THE MAINTENANCE SWITCHES BEFORE MASTER CLEAR.
  1289. *
  1290. *
  1291. * TO EXECUTE THE KEYBOARD-TOUCH PANEL TEST, SET
  1292. * SWITCHES 3,5 ON THE MAINTENANCE SWITCHES
  1293. * SET SWITCH 3 ONLY TO BYPASS THE TOUCH PANEL
  1294. *
  1295. * 6.0 OPERATOR COMMUNICATION-
  1296. *
  1297. * 6.1 ERRORS AND RESPONSES-
  1298. *
  1299. * WHEN AN ERROR IS ENCOUNTERED, THE RESIDENT TEST
  1300. * WILL EXECUTE A HALT INSTRUCTION. ERROR CODES WILL
  1301. * BE DISPLAYED ON THE MAINTENANCE PANEL LEDS WHICH
  1302. * WILL INDICATE WHICH BOARD IS BELIEVED TO BE BAD
  1303. * VIA THE MOST SIGNIFICANT DIGIT OF THE ERROR CODE
  1304. * DESCRIBED BELOW INDICATING THE LOCATION OF THE
  1305. * BOARD BELIEVED TO BE BAD.
  1306. *
  1307. * OCTAL CODE FAILURE
  1308. * ADDRESS
  1309. * RANGE
  1310. *
  1311. * 30 COMMAND FAILURE
  1312. *
  1313. *
  1314. * 42 TOUCH PANEL ERROR
  1315. *
  1316. * 70 DISPLAY INTERFACE ERROR
  1317. * 71 KEYBOARD ERROR
  1318. *
  1319. * 77 INDICATES TERMINATION OF THE DIAGNOSTIC
  1320. *
  1321. *E
  1322. * 7.0 DESCRIPTION
  1323. *
  1324. * 7.1 GENERAL
  1325. *
  1326. * THIS PROGRAM CONSISTS OF 3 SECTIONS OF
  1327. * RESIDENT DIAGNOSTICS. THE TESTING
  1328. * INCLUDES THE COMMAND REPERTOIRE,
  1329. * DISPLAY INTERFACE TEST, KEYBOARD AND
  1330. * TOUCH PANEL TESTS.
  1331. * 7.2 SECTION 1 COMMAND TEST
  1332. *
  1333. * THIS SECTION WILL EXECUTE ALL OF THE COMMAND
  1334. * REPERTOIRE OF THE SUB-MINI CONTROLLER EXCLUDING THE
  1335. * EIN,DIN,RST,HLT INSTRUCTIONS. THE TESTING OF THE
  1336. * INSTRUCTIONS IS BASIC AND DOES NOT DIAGNOSE THE
  1337. * SETTING OR CLEARING OF ALL POSSIBLE FLAG CONDITIONS
  1338. * FOR A PARTICULAR INSTRUCTION.
  1339. *
  1340. * ERROR CODES ARE:
  1341. * 30 COMMAND FAILURE
  1342. *
  1343. *E
  1344. * 7.3 SECTION 2 DISPLAY INTERFACE TEST
  1345. *
  1346. * THIS SECTION PERFORMS A BASIC CHECK ON THE DISPLAY
  1347. * INTERFACE TEST. THE DISPLAY INTERFACE MODULE
  1348. * CONTAINS TWO REGISTERS, ONE FOR THE X-COORDINATE
  1349. * AND ONE FOR THE Y-COORDINATE. THESE REGISTERS CAN
  1350. * BE LOADED, INCREMENTED AND DECREMENTED, AND
  1351. * READ VIA ISSUING FUNCTION COMMANDS TO THE MODULE.
  1352. * THE FOLLOWING TYPE OF CHECKS SHALL BE MADE IN THIS
  1353. * SECTION CONSISTING OF THREE DISTINCT CONDITIONS:
  1354. *
  1355. * 1) LOAD X AND Y REGISTERS, READ BACK AND COMPARE
  1356. *
  1357. * OUTPUT - CH=4,DV=0,FN=7 (BULK ERASE, WRITE/ERASE)
  1358. * * OUTPUT - ,FN=4 (X COOR.)
  1359. * * OUTPUT - ,FN=5 (Y COOR.)
  1360. * * OUTPUT - ,FN=6 (X/Y 2-8)
  1361. * * INPUT - ,FN=0 (X COOR.)
  1362. * * INPUT - ,FN=1 (Y COOR.)
  1363. * * INPUT - ,FN=2 (X/Y 2-8)
  1364. * ... CONTINUE THRU DATA TABLE - DEFINED IN SEC 2
  1365. *
  1366. *
  1367. *
  1368. *
  1369. * 2) INCREMENT/DECREMENT X,Y REGISTERS IN VECTOR MODE
  1370. *
  1371. * C
  1372. * <.................
  1373. * . .>.
  1374. * . . .
  1375. * . F . .
  1376. * . . . .
  1377. * D . . .E . B
  1378. * .< . .
  1379. * . . .
  1380. * . . .
  1381. * . . .
  1382. * .................>
  1383. * A
  1384. *
  1385. *
  1386. * MOVE TO LOWER LEFT CORNER
  1387. *
  1388. * OUTPUT - CH=4,DV=0,FN=7 (BULK ERASE, WRITE/ERASE)
  1389. * OUTPUT - ,FN=4 (X COOR. = 00)
  1390. * OUTPUT - ,FN=5 (Y COOR. = 00)
  1391. *
  1392. *
  1393. * A) OUTPUT - ,FN=6 (Y SHT VTR,X/Y 2-8,INC X,
  1394. * VECTOR MODE)
  1395. * * OUTPUT - ,FN=3 (DATA) VECTOR BIT (A=00)
  1396. * * INPUT - ,FN=0 (X REG)
  1397. * COMPARE
  1398. * * INPUT - ,FN=1 (Y REG)
  1399. * COMPARE
  1400. * * INPUT - ,FN=2 (X/Y 2-8)
  1401. * COMPARE
  1402. * ... CONTINUE TO END OF VECTOR
  1403. *
  1404. *
  1405. * B) OUTPUT - ,FN=6 (X SHT VTR, INC Y,
  1406. * VECTOR MODE)
  1407. * * OUTPUT - ,FN=3 (DATA) VECTOR BIT (A=00)
  1408. * * INPUT - ,FN=0 (X REG)
  1409. * COMPARE
  1410. * * INPUT - ,FN=1 (Y REG)
  1411. * COMPARE
  1412. * * INPUT - ,FN=2 (X/Y 2-8)
  1413. * COMPARE
  1414. * ... CONTINUE TO END OF VECTOR
  1415. *
  1416. *
  1417. * C) OUTPUT - ,FN=6 (Y SHT VTR, DEC X,
  1418. * VECTOR MODE)
  1419. * * OUTPUT - ,FN=3 (DATA) VECTOR BIT (A=00)
  1420. * * INPUT - ,FN=0 (X REG)
  1421. * COMPARE
  1422. * * INPUT - ,FN=1 (Y REG)
  1423. * COMPARE
  1424. * * INPUT - ,FN=2 (X/Y 2-8)
  1425. * COMPARE
  1426. * ... CONTINUE TO END OF VECTOR
  1427. *
  1428. *
  1429. * D) OUTPUT - ,FN=6 (X SHT VTR, DEC Y,
  1430. * VECTOR MODE)
  1431. * * OUTPUT - ,FN=3 (DATA) VECTOR BIT (A=00)
  1432. * * INPUT - ,FN=0 (X REG)
  1433. * COMPARE
  1434. * * INPUT - ,FN=1 (Y REG)
  1435. * COMPARE
  1436. * * INPUT - ,FN=2 (X/Y 2-8)
  1437. * COMPARE
  1438. * ... CONTINUE TO END OF VECTOR
  1439. *
  1440. *
  1441. * E) OUTPUT - ,FN=6 (Y SHT VTR,INC,X,INC Y,
  1442. * VECTOR MODE)
  1443. * * OUTPUT - ,FN=3 (DATA) VECTOR BIT (A=80)
  1444. * * INPUT - ,FN=0 (X REG)
  1445. * COMPARE
  1446. * * INPUT - ,FN=1 (Y REG)
  1447. * COMPARE
  1448. * * INPUT - ,FN=2 (X/Y 2-8)
  1449. * COMPARE
  1450. * ... CONTINUE TO END OF VECTOR
  1451. *
  1452. *
  1453. * F) OUTPUT ,FN=6 (Y SHT VTR,DEC X,VTR MODE
  1454. * DEC Y EVERY OTHER TIME)
  1455. * * OUTPUT - ,FN=3 (DATA) VECTOR BIT (A=80)
  1456. * * INPUT - ,FN=0 (X REG)
  1457. * COMPARE
  1458. * * INPUT - ,FN=1 (Y REG)
  1459. * COMPARE
  1460. * * INPUT - ,FN=2 (X/Y 2-8)
  1461. * COMPARE
  1462. * ... CONTINUE TO END OF VECTOR
  1463. *
  1464. *
  1465. *
  1466. *
  1467. * 3) INCREMENT/DECREMENT X,Y REGISTERS IN CHARACTER
  1468. * MODE.
  1469. *
  1470. *
  1471. *
  1472. * MOVE TO LOWER LEFT
  1473. *
  1474. * OUTPUT - ,FN=4 (X COOR. = 00)
  1475. * OUTPUT - ,FN=5 (Y COOR. = 00)
  1476. *
  1477. * A) OUTPUT - ,FN=6 (X/Y 2-8,INC X,CHAR MODE)
  1478. * OUTPUT - ,FN=7 (BULK ERASE, 90 DEG ORNT,
  1479. * WRITE/ERASE)
  1480. * * OUTPUT - ,FN=3 (DATA) CHAR BIT (A=01)
  1481. * * INPUT - ,FN=0 (X REG)
  1482. * COMPARE
  1483. * * INPUT - ,FN=1 (Y REG)
  1484. * COMPARE
  1485. * * INPUT - ,FN=2 (X/Y 2-8)
  1486. * COMPARE
  1487. * ... CONTINUE TO END OF VECTOR
  1488. *
  1489. *
  1490. * B) OUTPUT - ,FN=7 (NORMAL ORNT,WRITE/ERASE)
  1491. * OUTPUT - ,FN=6 (INC Y, CHAR MODE)
  1492. * * OUTPUT - ,FN=3 (DATA) CHAR BIT (A=01)
  1493. * * INPUT - ,FN=0 (X REG)
  1494. * COMPARE
  1495. * * INPUT - ,FN=1 (Y REG)
  1496. * COMPARE
  1497. * * INPUT - ,FN=2 (X/Y 2-8)
  1498. * COMPARE
  1499. * ... CONTINUE TO END OF VECTOR
  1500. *
  1501. *
  1502. * C) OUTPUT - ,FN=7 (90 DEG ORNT,WRITE/ERASE)
  1503. * OUTPUT - ,FN=6 (DEC X, CHAR MODE)
  1504. * * OUTPUT - ,FN=3 (DATA) CHAR BIT (A=01)
  1505. * * INPUT - ,FN=0 (X REG)
  1506. * COMPARE
  1507. * * INPUT - ,FN=1 (Y REG)
  1508. * COMPARE
  1509. * * INPUT - ,FN=2 (X/Y 2-8)
  1510. * COMPARE
  1511. * ... CONTINUE TO END OF VECTOR
  1512. *
  1513. *
  1514. * D) OUTPUT - ,FN=7 (NORMAL ORNT,WRITE/ERASE)
  1515. * OUTPUT - ,FN=6 (DEC Y, CHAR MODE)
  1516. * * OUTPUT - ,FN=3 (DATA) CHAR BIT (A=01)
  1517. * * INPUT - ,FN=0 (X REG)
  1518. * COMPARE
  1519. * * INPUT - ,FN=1 (Y REG)
  1520. * COMPARE
  1521. * * INPUT - ,FN=2 (X/Y 2-8)
  1522. * COMPARE
  1523. * ... CONTINUE TO END OF VECTOR
  1524. *
  1525. * ERROR CODES ARE:
  1526. * 70 DISPLAY INTERFACE ERROR
  1527. *
  1528. *
  1529. *E
  1530. * 7.6 SECTION 4 - KEYBOARD/TOUCH PANEL TEST
  1531. *
  1532. * THIS SECTION PERFORMS A BASIC CHECK ON THE KEYBOARD
  1533. * AND TOUCH PANEL BY INPUTTING THE CODE AFTER A
  1534. * CHARACTER READY HAD BEEN DETECTED. THE CODE IS THEN
  1535. * DISPLAYED ON THE LEDS LOCATED ON THE MAINTENANCE
  1536. * PANEL. THIS SECTION OF THE TEST WILL BE BY-PASSED
  1537. * IF SWITCH 3 OF THE MAINTENANCE SWITCHES IS OFF.
  1538. * IF SWITCH 5 IS OFF ONLY THE KEYBOARD WILL BE CHECKED.
  1539. *
  1540. *
  1541. * 1. CHECK IF SWITCH 3 IS SET ON MAINT PANEL
  1542. * 2. IF NOT, THEN EXIT SECTION
  1543. * 3. IF SWITCH 5 IS OFF CONTINUE AT STEP 7
  1544. * ELSE STATUS TOUCH PANEL
  1545. * IF NO CHAR ROY, THEN CONTINUE AT STEP 7
  1546. * 4. ELSE INPUT TOUCH PANEL X,Y DATA
  1547. * 5. DISPLAY SAME DATA VIA CONTROLWARE ON DISPLAY
  1548. * 6. CONTINUE AT STEP 3
  1549. * 7. STATUS KEYBOARD
  1550. * IF NO CHAR ROY, THEN CONTINUE AT STEP 3
  1551. * 8. ELSE INPUT KEYBOARD DATA
  1552. * 9. DISPLAY KYEBOARD DATA AS TWO (2) HEX DIGITS VIA
  1553. * CONTROLWARE ON DISPLAY
  1554. * 10. IF KEYBOARD DATA IS A SHIFT/STOP CODE
  1555. * THEN EXIT SECTION (EXIT DIAGNOSTIC)
  1556. * 11. ELSE CONTINUE AT STEP 3
  1557. *
  1558. * ERROR CODES ARE:
  1559. * 42 TOUCH PANEL ERROR
  1560. * 71 KEYBOARD ERROR
  1561. *
  1562. *E
  1563. * 7.7 END OF DIAGNOSTIC
  1564. *
  1565. * CODE 77 IS DISPLAYED ON MAINTENANCE PANEL LEDS
  1566. * INDICATING COMPLETION OF DIAGNOSTIC.
  1567. *
  1568. * CONTROL IS THEN GIVEN TO CONTROLWARE WHICH WILL
  1569. * BEGIN BY INDICATING TERMIANL IS READY ON DISPLAY.
  1570. *
  1571. RST.SEC0 EQU $
  1572. IN RSF.PANL*32+PANLSWCH
  1573. ANI RSM.EXIT CHECK FOR EXIT DIAG.
  1574. JNZ RST.DONE SET, EXIT DIAGNOSTICS
  1575. JMP RST.S000 DO ROM/RAM TESTS
  1576. * RST.VXY VERIFY X,Y REGISTERS
  1577. *
  1578. * ENTRY BY CALL FROM SECTION THREE
  1579. *
  1580. * CALLS NONE
  1581. *
  1582. * ALTERS A,B,C REGISTERS
  1583. *
  1584. * EXIT BY RETURN TO CALLER
  1585. *
  1586. * ERRORS REPORTED
  1587. * NONE
  1588. RST.VXY SHLD RSV.SRAM SAVE HL
  1589. XCHG
  1590. SHLD RSV.SRAM+2 SAVE DE
  1591. POP H GET RETURN ADDRESS
  1592. POP D GET X COR
  1593. POP B GET Y COR
  1594. IN RSF.DISP*32+DISPXREG
  1595. CMP E COMPARE X COR 0-7
  1596. JZ RST.VXY2
  1597. HLT ERROR HALT
  1598. RST.VXY2 IN RSF.DISP*32+DISPYREG
  1599. CMP C COMPARE Y COR 0-7
  1600. JZ RST.VXY4
  1601. HLT ERROR HALT
  1602. RST.VXY4 PUSH B RESTORE Y
  1603. PUSH D RESTORE X
  1604. PUSH H RESTORE RETURN ADDRESS
  1605. MOV A,B
  1606. ANI 1 SAVE Y COR 2**8
  1607. RLC
  1608. MOV B,A
  1609. MOV A,D
  1610. ANI 1 SAVE X COR 2**8
  1611. ORA B
  1612. MOV B,A SAVE EXPECTED XY 2**8
  1613. LHLD RSV.SRAM+2
  1614. XCHG RESTORE DE
  1615. LHLD RSV.SRAM RESTORE HL
  1616. IN RSF.DISP*32+DISPXY28
  1617. ANI 3
  1618. CMP B COMPARE XY 2**8
  1619. RZ RETURN IF EQUAL
  1620. HLT ERROR HALT
  1621. RST.DATT DB #04,#00
  1622. DB #84,#01
  1623. DB #84,#02
  1624. DB #84,#04
  1625. DB #84,#08
  1626. DB #84,#10
  1627. DB #84,#20
  1628. DB #84,#40
  1629. DB #84,#80
  1630. DB #85,#00
  1631. DB #86,#00
  1632. DB #07,#FF
  1633. DB #04,#00
  1634. DB #85,#55
  1635. DB #86,#AA
  1636. DB #04,#00
  1637. RST.MSG DB #14,#22,#0B,#0D,#36,#1D,#19,#36,#1D,#0E,#1C,#1D
  1638. RST.CON1 DB 255
  1639. RST.CON2 DB 1,0
  1640. RST.CON3 DB 255
  1641. RST.CON4 DB 0,0
  1642. RST.TPAL LXI H,40 OUTPUT X,Y = 1,15
  1643. LXI D,488 TO ALLIGN
  1644. MVI C,#1F TOUCH PANEL
  1645. CALL RST.OCHR
  1646. LXI H,296 OUTPUT X,Y = 9,7
  1647. LXI D,232
  1648. MVI C,#97
  1649. CALL RST.OCHR
  1650. LXI H,456 OUTPUT X,Y = 14,0
  1651. LXI D,8
  1652. MVI C,#E0
  1653. CALL RST.OCHR
  1654. RET
  1655. INDI.1 JMP INIT.PLT INDIRECT TO INITIALIZE CHARACTER PLOT.
  1656. INDI.2 JMP OUTCOORD INDIRECT TO OUTPUT COORDINATES.
  1657. INDI.3 JMP CHAREN INDIRECT TO CHARACTER GENERATOR.
  1658. DB #00,#00,#00,#00
  1659. DB #00,#00,#00
  1660. EJECT
  1661. **
  1662. *E
  1663. * RST.SEC1 COMMAND TEST
  1664. *
  1665. * ENTRY CONTROL IS GIVEN TO SECTION ONE UPON
  1666. * COMPLETION OF SECTION ZERO.
  1667. *
  1668. * CALLS NONE
  1669. *
  1670. * ALTERS ALL REGISTERS
  1671. *
  1672. * EXIT TO RST.SEC3 UPON COMPLETION
  1673. *
  1674. * ERRORS REPORTED (OCTAL CODE)
  1675. *
  1676. * 30 - COMMAND FAILURE
  1677. RST.SEC1 MVI A,#18
  1678. OUT RSF.PANL*32+PANLDATA UT ERROR CODE FOR COMMAND FAIL
  1679. MVI A,#55 A=55
  1680. MOV B,A LOAD ALL REGISTERS FROM A
  1681. MOV C,A
  1682. MOV D,A
  1683. MOV E,A
  1684. MOV H,A
  1685. MOV L,A
  1686. RLC A=AA
  1687. ORA B A=FF
  1688. XRA C A=AA
  1689. ANA D A=00
  1690. SUB E A=AB
  1691. XRI #AB A=00
  1692. INR H H=56
  1693. DCR L L=54
  1694. ADD H A=56
  1695. ADD L A=AA
  1696. ADI #55 A=FF
  1697. SUI #AA A=55
  1698. ORI #22 A=77
  1699. ANI #AA A=22
  1700. XRI #22 A=0
  1701. STC SET CARRY
  1702. ACI #0E A=0F
  1703. CMA A=F0
  1704. RRC A=78 CARRY=0
  1705. CMC CARRY=1
  1706. ADC B A=CE
  1707. CMC CARRY=1
  1708. SBB B A=78
  1709. CMC CARRY=1
  1710. SBI #07 A=70
  1711. CMC CARRY=1
  1712. RAR A=B8 CARRY=0
  1713. RAL A=70 CARRY=1
  1714. NOP
  1715. JC RST.S105 IF CARRY NOT SET REPORT ERROR
  1716. *
  1717. * ERROR 50 - COMMAND FAILURE
  1718. *
  1719. HLT ERROR HALT
  1720. RST.S105 CPI #70
  1721. JZ RST.S110
  1722. HLT ERROR HALT
  1723. RST.S110 MVI A,#EE
  1724. STA RST.CON5
  1725. MVI B,#EE
  1726. LXI H,RST.CON5+1
  1727. MOV M,B
  1728. CMP M VERIFY B STORED CORRECTLY
  1729. JZ RST.S112
  1730. HLT ERROR HALT
  1731. RST.S112 LDA RST.CON5
  1732. CPI #EE VERIFY A STORED CORRECTLY
  1733. JZ RST.S114
  1734. HLT ERROR HALT
  1735. RST.S114 LXI B,RST.CON1
  1736. LXI H,RST.CON3
  1737. LXI SP,RST.STAK
  1738. LDAX B
  1739. CMP M
  1740. JZ RST.S116
  1741. HLT ERROR HALT
  1742. RST.S116 LHLD RST.CON1 LOAD HL
  1743. SHLD RST.CON5 STORE HL INTO MEMORY
  1744. PUSH H STORE HL INTO STACK
  1745. LXI H,RST.STAK LOAD HL WITH STACK ADDRESS
  1746. SPHL
  1747. DCX SP DECREMENT SP
  1748. DCX SP DECREMENT SP
  1749. DCX SP DECREMENT SP
  1750. INX SP INCREMENT SP
  1751. POP D LOAD DE FROM STACK
  1752. LDA RST.CON5
  1753. CMP E
  1754. JZ RST.S118
  1755. HLT ERROR HALT
  1756. RST.S118 LDA RST.CON5+1
  1757. CMP D
  1758. JZ RST.S120
  1759. HLT ERROR HALT
  1760. RST.S120 LXI H,#AAAA LOAD HL
  1761. LXI D,#5555 LOAD DE
  1762. PUSH D STORE DE INTO STACK
  1763. XTHL EXCHANGE STACK AND HL
  1764. POP D
  1765. MOV A,D
  1766. CPI #AA VERIFY EXCHANGE
  1767. JZ RST.S122
  1768. HLT ERROR HALT
  1769. RST.S122 MOV A,H
  1770. CPI #55 VERIFY EXCHANGE
  1771. JZ RST.S124
  1772. HLT ERROR HALT
  1773. RST.S124 LHLD RST.CON2 LOAD HL FROM MEMORY HL=0001
  1774. LXI D,#0001
  1775. DAD D HL=0002
  1776. INX H HL=0003
  1777. MOV A,H
  1778. CPI 0 VERIFY H=0
  1779. JZ RST.S126
  1780. HLT ERROR HALT
  1781. RST.S126 MOV A,L
  1782. CPI 3 VERIFY L=3
  1783. JZ RST.S128
  1784. HLT ERROR HALT
  1785. RST.S128 LXI H,#0001 HL=0001
  1786. SHLD RST.CON6 STORE HL INTO MEMORY
  1787. LXI H,RST.CON6 SET HL TO ADDRESS
  1788. MVI A,0
  1789. ADD M A=1
  1790. STC
  1791. ADC M A=3
  1792. INR M MEMORY = 2
  1793. SUB M A=1
  1794. DCR M
  1795. DCR M MEMORY=0
  1796. STC
  1797. SBB M A=0
  1798. ADI #0F A=0F
  1799. ORA M A=0F
  1800. MVI M,#01 MEMORY=1
  1801. ANA M A=1
  1802. XRA M A=0
  1803. CPI 0 VERIFY A = 0
  1804. JZ RST.SEC3
  1805. HLT ERROR HALT
  1806. * EXIT SECTION ONE
  1807. * RST.SEC3 DISPLAY INTERFACE TEST
  1808. *
  1809. * ENTRY CONTROL IS GIVEN TO SECTION THREE UPON
  1810. * COMPLETION OF SECTION ONE
  1811. *
  1812. * CALLS RST.VXY VERIFY X,Y REGISTERS
  1813. *
  1814. * ALTERS ALL REGISTERS
  1815. *
  1816. * EXIT TO RST.SEC4 UPON COMPLETION
  1817. *
  1818. * ERRORS REPORTED (OCTAL CODE)
  1819. *
  1820. * 70 - DISPLAY INTERFACE ERROR
  1821. RST.SEC3 MVI A,#38 ERROR CODE FOR DISPLAY TEST
  1822. OUT RSF.PANL*32+PANLDATA
  1823. *
  1824. * CONDITION 1
  1825. *
  1826. MVI A,#03 BULK ERASE, WRITE/ERASE
  1827. OUT RSF.DISP*32+DISPCON2
  1828. LXI H,RST.DATT SET UP TABLE POINTER
  1829. MVI E,16 SET UP COUNTER
  1830. RST.S305 MOV B,M DO UNTIL COUNTER=0
  1831. INX H
  1832. MOV C,M FORM X COR IN BC
  1833. INX H
  1834. LXI SP,RST.STAK SET STACK POINTER
  1835. PUSH B SAVE Y COR IN STACK
  1836. PUSH B SAVE X COR IN STACK
  1837. MOV A,C
  1838. OUT RSF.DISP*32+DISPXCOR TPUT XCOR 0-7
  1839. OUT RSF.DISP*32+DISPYCOR TPUT YCOR 0-7
  1840. MOV A,B
  1841. ANI 1 SAVE XCOR 2**8
  1842. MOV B,A
  1843. RLC
  1844. ORA B
  1845. ADI #04 FORM - ENABLE XY 2**8 LOAD
  1846. OUT RSF.DISP*32+DISPCON1
  1847. CALL RST.VXY GO VERIFY XY
  1848. DCR E UPDATE COUNTER
  1849. JNZ RST.S305 END DO
  1850. *
  1851. * CONDITION 2
  1852. *
  1853. MVI A,#03 BULK ERASE, WRITE/ERASE
  1854. OUT RSF.DISP*32+DISPCON2
  1855. LXI H,0
  1856. PUSH H STORE Y COR
  1857. PUSH H STORE X COR
  1858. MVI A,#A4 VECTOR,Y=SHORT,INC X,LOAD XY
  1859. OUT RSF.DISP*32+DISPCON1
  1860. LXI H,511 SET UP COUNTER
  1861. RST.S310 MVI A,0 DO UNTIL COUNTER=0
  1862. OUT RSF.DISP*32+DISPDATA TPUT INC X COMMAND
  1863. POP D GET X COR
  1864. INX D UPDATE
  1865. PUSH D SAVE X
  1866. CALL RST.VXY GO VERIFY XY
  1867. DCX H UPDATE COUNTER
  1868. MOV A,H
  1869. ORA L
  1870. JNZ RST.S310 END DO
  1871. MVI A,#80 VECTOR,X=SHORT,INC Y
  1872. OUT RSF.DISP*32+DISPCON1
  1873. LXI H,511 SET UP COUNTER
  1874. RST.S315 MVI A,0 DO UNTIL COUNTER=0
  1875. OUT RSF.DISP*32+DISPDATA TPUT INC Y COMMAND
  1876. POP D GET X COR
  1877. POP B GET Y COR
  1878. INX B MODIFY Y
  1879. PUSH B SAVE Y
  1880. PUSH D SAVE X
  1881. CALL RST.VXY GO VERIFY XY
  1882. DCX H UPDATE COUNTER
  1883. MOV A,H
  1884. ORA L
  1885. JNZ RST.S315 END DO
  1886. MVI A,#A8 VECTOR,Y=SHORT,DEC X
  1887. OUT RSF.DISP*32+DISPCON1
  1888. LXI H,511 SET UP COUNTER
  1889. RST.S320 MVI A,0 DO UNTIL COUNTER=0
  1890. OUT RSF.DISP*32+DISPDATA TPUT DEC X COMMAND
  1891. POP D GET X COR
  1892. DCX D MODIFY
  1893. PUSH D SAVE
  1894. CALL RST.VXY GO VERIFY XY
  1895. DCX H
  1896. MOV A,H
  1897. ORA L
  1898. JNZ RST.S320 END DO
  1899. MVI A,#90 VECTOR,X=SHORT,DEC Y
  1900. OUT RSF.DISP*32+DISPCON1
  1901. LXI H,511 SET UP COUNTER
  1902. RST.S325 MVI A,0 DO UNTIL COUNTER=0
  1903. OUT RSF.DISP*32+DISPDATA TPUT DEC Y COMMAND
  1904. POP D GET X COR
  1905. POP B GET Y COR
  1906. DCX B MODIFY Y
  1907. PUSH B SAVE Y
  1908. PUSH D SAVE X
  1909. CALL RST.VXY GO VERIFY XY
  1910. DCX H UPDATE COUNTER
  1911. MOV A,H
  1912. ORA L
  1913. JNZ RST.S325 END DO
  1914. MVI A,#A0 VECTOR,Y=SHORT,INC X,INC Y
  1915. OUT RSF.DISP*32+DISPCON1
  1916. LXI H,511 SET UP COUNTER
  1917. RST.S330 MVI A,#80 DO UNTIL COUNTER=0
  1918. OUT RSF.DISP*32+DISPDATA TPUT INC X, INC Y COMMAND
  1919. POP D GET X COR
  1920. POP B GET Y COR
  1921. INX D
  1922. INX B
  1923. PUSH B SAVE Y
  1924. PUSH D SAVE X
  1925. CALL RST.VXY GO VERIFY XY
  1926. DCX H UPDATE COUNTER
  1927. MOV A,H
  1928. ORA L
  1929. JNZ RST.S330 END DO
  1930. MVI A,#B8 VECTOR,Y=SHORT,DECX,(DEC Y)
  1931. OUT RSF.DISP*32+DISPCON1
  1932. LXI H,511 SET UP COUNTER
  1933. RST.S335 MOV A,L DO UNTIL COUNTER=0
  1934. ANI 1
  1935. RRC FORM DATA OUTPUT CONTROL
  1936. OUT RSF.DISP*32+DISPDATA
  1937. POP D GET X COR
  1938. POP B GET Y COR
  1939. DCX D MODIFY X COR
  1940. JNC RST.S340
  1941. DCX B CONDITIONALLY MODIFY Y
  1942. RST.S340 PUSH B SAVE Y
  1943. PUSH D SAVE X
  1944. CALL RST.VXY GO VERIFY XY
  1945. DCX H MODIFY COUNTER
  1946. MOV A,H
  1947. ORA L
  1948. JNZ RST.S335 END DO
  1949. *
  1950. * CONDITION 3
  1951. *
  1952. MVI A,0
  1953. OUT RSF.DISP*32+DISPXCOR UT XCOR=0
  1954. OUT RSF.DISP*32+DISPYCOR UT YCOR=0
  1955. MVI A,#43 BULK ERASE, WRITE/ERASE, 90 DEG
  1956. OUT RSF.DISP*32+DISPCON2
  1957. MVI A,#04 CHAR, INC X, LOAD XY 2**8
  1958. OUT RSF.DISP*32+DISPCON1
  1959. LXI H,0
  1960. PUSH H INIT. Y COR
  1961. PUSH H INIT. X COR
  1962. LXI H,511 SET UP COUNTER
  1963. RST.S345 MVI A,1 DO UNTIL COUNTER=0
  1964. OUT RSF.DISP*32+DISPDATA TPUT INC X COMMAND
  1965. POP D GET X COR
  1966. INX D UPDATE
  1967. PUSH D SAVE X COR
  1968. CALL RST.VXY GO VERIFY XY
  1969. DCX H UPDATE COUNTER
  1970. MOV A,H
  1971. ORA L
  1972. JNZ RST.S345 END DO
  1973. MVI A,#62 WRITE/ERASE, NORMAL
  1974. OUT RSF.DISP*32+DISPCON2
  1975. MVI A,#00 CHAR, INC Y
  1976. OUT RSF.DISP*32+DISPCON1
  1977. LXI H,511 SET UP COUNTER
  1978. RST.S350 MVI A,1 DO UNTIL COUNTER=0
  1979. OUT RSF.DISP*32+DISPDATA TPUT INC Y COMMAND
  1980. POP D GET X COR
  1981. POP B GET Y COR
  1982. INX B UPDATE Y
  1983. PUSH B SAVE Y
  1984. PUSH D SAVE X
  1985. CALL RST.VXY GO VERIFY XY
  1986. DCX H UPDATE COUNTER
  1987. MOV A,H
  1988. ORA L
  1989. JNZ RST.S350 END DO
  1990. MVI A,#42 WRITE/ERASE, 90 DEG
  1991. OUT RSF.DISP*32+DISPCON2
  1992. MVI A,#08 CHAR, DEC X
  1993. OUT RSF.DISP*32+DISPCON1
  1994. LXI H,511 SET UP COUNTER
  1995. RST.S355 MVI A,1 DO UNTIL COUNTER=0
  1996. OUT RSF.DISP*32+DISPDATA TPUT DEC X COMMAND
  1997. POP D GET X COR
  1998. DCX D UPDATE
  1999. PUSH D SAVE X
  2000. CALL RST.VXY GO VERIFY XY
  2001. DCX H UPDATE COUNTER
  2002. MOV A,H
  2003. ORA L
  2004. JNZ RST.S355 END DO
  2005. MVI A,#62 WRITE/ERASE, NORMAL
  2006. OUT RSF.DISP*32+DISPCON2
  2007. MVI A,#10 CHAR, DEC Y
  2008. OUT RSF.DISP*32+DISPCON1
  2009. LXI H,511 SET UP COUNTER
  2010. RST.S360 MVI A,1 DO UNTIL COUNTER=0
  2011. OUT RSF.DISP*32+DISPDATA TPUT DEC Y COMMAND
  2012. POP D GET X COR
  2013. POP B GET Y COR
  2014. DCX B MODIFY Y
  2015. PUSH B SAVE Y
  2016. PUSH D SAVE X
  2017. CALL RST.VXY GO VERIFY XY
  2018. DCX H UPDATE COUNTER
  2019. MOV A,H
  2020. ORA L
  2021. JNZ RST.S360 END DO
  2022. * EXIT SECTION THREE
  2023. **
  2024. *E
  2025. * RST.SEC4 KEYBOARD - TOUCH PANEL TEST
  2026. *
  2027. * ENTRY CONTROL IS GIVEN TO SECTION FOUR UPON
  2028. * COMPLETION OF SECTION THREE
  2029. *
  2030. * CALLS RST.OCHR OUTPUT CHAR. TO CONTROLWARE
  2031. *
  2032. * ALTERS ALL REGISTERS
  2033. * MODE FLAG IN CONTROLWARE
  2034. *
  2035. * EXIT TO RST.EXIT UPON COMPLETION
  2036. *
  2037. * ERRORS REPORTED
  2038. *
  2039. * 42 - TOUCH PANEL ERROR
  2040. * 71 - KEYBOARD ERROR
  2041. RST.SEC4 IN RSF.PANL*32+PANLSWCH
  2042. ANI RSM.SEC4 CHECK FOR BYPASS OF SECTION
  2043. JZ RST.EXIT IF NOT SET - BYPASS SECTION
  2044. LXI SP,IST.STK INITIALIZE STACK POINTER.
  2045. MVI A,0 OUTPUT X-YCORDS
  2046. OUT RSF.DISP*32+DISPXCOR
  2047. OUT RSF.DISP*32+DISPYCOR
  2048. MVI A,#A4 VECTOR Y%SHORT LOAD XY 2**8
  2049. OUT RSF.DISP*32+DISPCON1
  2050. LXI H,511 SET UP COUNTER
  2051. RST.S430 MVI A,#80 DO UNTIL COUNTER = 0
  2052. OUT RSF.DISP*32+DISPDATA C X - INC Y COMMAND
  2053. DCX H
  2054. MOV A,H
  2055. ORA L
  2056. JNZ RST.S430 END DO
  2057. MVI A,0
  2058. OUT RSF.DISP*32+DISPXCOR
  2059. MVI A,#FF
  2060. OUT RSF.DISP*32+DISPYCOR
  2061. MVI A,#B6
  2062. OUT RSF.DISP*32+DISPCON1
  2063. LXI H,511
  2064. RST.S440 MVI A,#80
  2065. OUT RSF.DISP*32+DISPDATA
  2066. DCX H
  2067. MOV A,H
  2068. ORA L
  2069. JNZ RST.S440
  2070. CALL INIT.PLT INITIALIZE FOR CHARACTER PLOT
  2071. LXI H,208 LOAD X COORDINATE
  2072. LXI D,80 LOAD Y COORDINATE.
  2073. CALL OUTCOORD SET DISPLAY COORDINATES
  2074. MVI D,12
  2075. LXI H,RST.MSG GET ADDRESS OF MSG
  2076. RST.S402 PUSH H SAVE HL
  2077. PUSH D SAVE DE
  2078. MOV A,M GET NEXT CODE
  2079. CALL RST.OUT OUTPUT TO FIRMWARE
  2080. POP D RESTORE DE
  2081. POP H RESTORE HL
  2082. INX H UPDATE INDEX
  2083. DCR D UPDATE COUNTER
  2084. JNZ RST.S402 LOOP FOR COMPLETE TABLE
  2085. CALL RST.TPAL
  2086. RST.S404 IN RSF.PANL*32+PANLSWCH PUT SWITCHES
  2087. ANI RSM.TOCH CHECK FOR TOUCH PANEL PRESENT
  2088. JZ RST.S420 JUMP IF NOT
  2089. RST.S405 MVI A,#22 OUTPUT TOUCH PANEL ERROR CODE
  2090. OUT RSF.PANL*32+PANLDATA
  2091. IN RSF.TOCH*32+TOCHSTAT PUT TOUCH PANEL STATUS
  2092. ANI 1 CHECK FOR CHAR RDY
  2093. JZ RST.S420 JUMP IF NOT
  2094. IN RSF.TOCH*32+TOCHDATA PUT DATA (X,Y)
  2095. MOV C,A SAVE DATA IN C
  2096. LXI H,244
  2097. LXI D,32
  2098. CALL RST.OCHR GO TO OUTPUT SUBROUTINE
  2099. MVI A,#1D
  2100. CALL RST.OUT OUTPUT -T- FOR TOUCH PANEL
  2101. JMP RST.S405 LOOP
  2102. RST.S420 MVI A,#39 OUTPUT KYBD ERROR CODE
  2103. OUT RSF.PANL*32+PANLDATA
  2104. IN RSF.KYBD*32+KYBDSTAT PUT KYBD STATUS
  2105. ANI 1 CHECK FOR CHAR RDY
  2106. JZ RST.S404 JUMP IF NOT SET
  2107. IN RSF.KYBD*32+KYBDDATA PUT DATA (KYBD CODE)
  2108. CMA
  2109. ANI #7F
  2110. MOV C,A SAVE IN C
  2111. CPI #3A CHECK FOR SHIFT-STOP
  2112. JZ RST.EXIT IF MATCH EXIT SECTION
  2113. LXI H,244
  2114. LXI D,32
  2115. CALL RST.OCHR GO TO OUTPUT SUBROUTINE
  2116. MVI A,#14
  2117. CALL RST.OUT OUTPUT -K- FOR KYBD
  2118. MOV A,C GET DATA
  2119. JMP RST.S404
  2120. EJECT
  2121. **
  2122. *E
  2123. * RST.EXIT DIAGNOSTIC EXIT ROUTINE
  2124. *
  2125. * ENTRY BY JUMP FROM SECTION ZERO OR SECTION FOUR
  2126. *
  2127. * CALLS NONE
  2128. *
  2129. * ALTERS A REGISTER
  2130. *
  2131. * EXIT CONTROL IS GIVEN TO -START1- IN CONTROLWARE
  2132. *
  2133. * ERRORS REPORTED
  2134. * NONE
  2135. RST.EXIT IN RSF.PANL*32+PANLSWCH PUT SWITCHES
  2136. ANI RSM.LOOP CHECK FOR LOOP OPTION
  2137. JNZ RST.SEC0 LOOP IF SET
  2138. RST.DONE MVI A,#3F OUTPUT TERMINATION CODE
  2139. OUT RSF.PANL*32+PANLDATA
  2140. IN RSF.PANL*32+PANLSWCH SWITCH SETTING
  2141. ANI #02
  2142. JZ RST.HI NOT SET, 1200 BAUD
  2143. MVI A,#3E SET, SO 300 BAUD
  2144. JMP RST.BD
  2145. RST.HI EQU *
  2146. MVI A,#7E SET UP FOR 1200
  2147. RST.BD EQU *
  2148. STA SC.OC
  2149. LXI SP,IST.STK
  2150. CALL INIT.PLT INITIALIZE CHAR. PLOT
  2151. MVI A,0
  2152. STA M.HALT INITIALIZE SOME VARAIBLES
  2153. STA M.STATUS
  2154. MVI A,3
  2155. STA M.SBTYPE
  2156. LXI H,M0CODE00
  2157. SHLD M.M0
  2158. *
  2159. * CHECKSUM RAM
  2160. * IF BAD, RELOAD AND JUMP TO ASCII INIT
  2161. * OTHERWISE, CHECK MODE AND GO TO CORRESPONDING INIT
  2162. *
  2163. RAMCK EQU *
  2164. MVI C,00 INITIALIZE SUM AND
  2165. LXI H,#3FFF RAM MEMORY ADDRESS POINTER.
  2166. LDA LWA+1 LOAD UPPER BITS FOR LWA
  2167. CMP H AND TEST FOR VALUE.
  2168. JC RST.LDR INCORRECT ADDRESS STORED.
  2169.  
  2170. CS1 EQU *
  2171. MOV A,C LOAD CHECKSUM RESULTS
  2172. INX H INCREMENT MEMORY POINTER
  2173. ADD M ADD BYTE TO CHECKSUM
  2174. MOV C,A AND SAVE
  2175. LDA LWA LOAD LOWER HALF OF LWA
  2176. DCR A
  2177. CMP L AND TEST.
  2178. JNZ CS1 JUMP IF NOT END.
  2179.  
  2180. MOV A,H TEST UPPER BITS OF LOADING
  2181. CPI #5F ADDRESS FOR MAX.
  2182. JZ RST.LDR ADDRESS TOO HIGH, LOAD.
  2183. LDA LWA+1 LOAD UPPER HALF OF ADDR.
  2184. CMP H AND TEST.
  2185. JNZ CS1 JUMP IF NOT END.
  2186.  
  2187. LDA CKSM LOAD CHECKSUM
  2188. CMP C AND TEST AGAINST CAL.
  2189. JNZ RST.LDR LOAD RAM IF NOT CORRECT.
  2190. *
  2191. * TEST FOR ASCII MODE OR PLATO
  2192. *
  2193. LDA MODE
  2194. ANI #80
  2195. JZ A.INIT
  2196. *
  2197. *
  2198. LXI H,IST.STK
  2199. PLATO.1 EQU $
  2200. MVI M,00
  2201. INX H
  2202. MVI A,#23
  2203. XRA H
  2204. JNZ PLATO.1
  2205. LDA #34
  2206. STA M.TYPE
  2207. JMP R.INIT
  2208. EJECT
  2209. *
  2210. * RAM RESIDENT LOAD ROUTINE
  2211. *
  2212. RST.LDR EQU $
  2213. LDA SC.OC LOAD SERIAL CHAN. CONTROL
  2214. OUT COMSTAT
  2215. * INITIALIZE FOR LOAD ROUTINE.
  2216. S100 XRA A
  2217. STA SEQ1
  2218. STA SEQ2
  2219. STA A1
  2220. STA A3
  2221. STA FLAGREG
  2222. STA CNTR
  2223. STA CHAR
  2224. STA CKSM CLEAR CHECKSUM
  2225. IN RSF.PANL*32+PANLSWCH
  2226. ANI #E0 GET LOAD NUMBER
  2227. RLC FROM THE TOP THREE
  2228. RLC SWITCH SETTINGS.
  2229. RLC
  2230. STA LDN
  2231. LXI H,DISP4 LOAD MESSAGE STORE ADDRESS
  2232. MVI M,SPACE
  2233. INX H LOAD BLOCK
  2234. MVI M,SPACE NUMBER DATA.
  2235. INX H
  2236. MVI M,SPACE
  2237. INX H
  2238. MVI M,SPACE
  2239. INX H
  2240. MVI M,ESC
  2241. INX H
  2242. MVI M,ASC0
  2243. INX H
  2244. MVI M,ASCL LOAD
  2245. INX H
  2246. INX H L,N,N,CR
  2247. INX H
  2248. MVI M,CR MESSAGE.
  2249. INX H
  2250. MVI M,DLE LOAD DLE,EOT
  2251. INX H
  2252. MVI M,EOT
  2253. INX H
  2254. MVI M,NAK LOAD NAK,XXYY MESSAGE.
  2255. MVI A,#40
  2256. STA A2
  2257. MVI L,#1B
  2258. CALL R.MODE BULK ERASE, MODE 05
  2259. *
  2260. * LXI H,SAVE
  2261. * MVI A,#3A LOAD SHIFT STOP CODE
  2262. * MOV M,A AND SEND FOUR TIMES
  2263. * MVI B,4 TO TAKE TERMINAL OUT
  2264. *S100A CALL OUTDATA OF PLATO MODE.
  2265. * DCR B
  2266. * JNZ S100A
  2267. *
  2268. S101 CALL S107 SEND LOAD REQUEST
  2269. S101A LXI H,0000 INITIALIZE 30 SEC TIME-OUT.
  2270. MVI B,#0F 30 SEC TIMEOUT
  2271. S102 CALL INDATA
  2272. JC S104
  2273. DAD D
  2274. JNC S102
  2275. DCR B
  2276. JZ S109
  2277. S103 JMP S102
  2278. S104 DAD D
  2279. JNC S105
  2280. DCR B
  2281. JZ S109
  2282. S105 LDA CHAR
  2283. CPI SLASH TEST FOR / CODE.
  2284. JNZ S102
  2285. D.LOOP INX H TIME DELAY
  2286. MOV A,L
  2287. ORA H
  2288. JNZ D.LOOP
  2289. LXI D,#00 DISP ',LOADING BLOCK',
  2290. LXI H,#B8
  2291. CALL R.OUTX
  2292. XCHG
  2293. CALL R.OUTY
  2294. MVI L,#1B
  2295. CALL R.MODE BULK ERASE AND MODE 5
  2296. LXI H,DISP1
  2297. CALL R.CHARS
  2298. CALL L.DISP DISPL BLOCK NO.
  2299. S106 EQU *
  2300. LDA FLAGREG
  2301. ANI #01
  2302. JNZ A.INIT EOT FLAG SET, JUMP
  2303. MVI A,#03
  2304. STA CNTR
  2305. CALL S107 SEND LOAD REQUEST
  2306. JNC TERLD LOADING TERMINATED
  2307. JMP S200
  2308.  
  2309. S109 LDA FLAGREG
  2310. ANI #01
  2311. JZ TERLD
  2312. LDA CNTR
  2313. ORA A
  2314. JZ TERLD
  2315. DCR A
  2316. STA CNTR
  2317. JMP E006
  2318.  
  2319. F000 EQU *
  2320. LDA CNTR
  2321. ORI #00
  2322. JZ TERLD
  2323. DCR A
  2324. STA CNTR
  2325. LDA FLAGREG
  2326. ANI #04 NAK FLAG
  2327. JNZ C000
  2328. CALL S107 SEND LOAD REQUEST.
  2329. JNC TERLD LOADING TERMINATED
  2330.  
  2331. S200 EQU * DLE-STX
  2332. MVI B,#0F 30 SEC TIMEOUT
  2333. LXI H,#0000
  2334. S201 CALL INDATA
  2335. JC S203
  2336. DAD D
  2337. JNC S201
  2338. DCR B
  2339. JZ F000 TIMEOUT, JUMP
  2340. JMP S201
  2341.  
  2342. S203 DAD D
  2343. JNC S204
  2344. DCR B
  2345. JZ F000
  2346. S204 LDA CHAR
  2347. S205 CPI DLE TEST FOR DLE CODE
  2348. JNZ S201
  2349. S206 CALL INDATA
  2350. JC S208
  2351. DAD D
  2352. JNC S206
  2353. DCR B
  2354. JZ F000
  2355. JMP S206
  2356.  
  2357. S208 DAD D
  2358. JNC S209
  2359. DCR B
  2360. JZ F000
  2361. S209 LDA CHAR
  2362. CPI STX TEST FOR STX CODE
  2363. JNZ S205
  2364. S210 XRA A
  2365. STA CRC1
  2366. STA CRC2
  2367. STA CNTR
  2368. STA FLAGREG
  2369. B000 EQU * HEADER ROUTINE
  2370. LXI H,SEQ1
  2371. MVI B,#06
  2372. MVI A,#02 LOAD DLE COUNT
  2373. STA SAVE
  2374. B001 CALL INDATA
  2375. JNC B001
  2376. MOV C,A SAVE CHAR.
  2377. CPI DLE TEST FOR DLE CODE
  2378. JZ B004
  2379. B002 LDA SAVE GET DLE COUNT
  2380. ORA A AND TEST FOR ZERO.
  2381. JNZ B005
  2382. MOV C,M
  2383. LDA CHAR
  2384. CMP C
  2385. JNZ C000
  2386. B003 CALL CRCGEN
  2387. DCR B
  2388. JZ D000
  2389. INX H
  2390. JMP B001
  2391. B004 CALL INDATA
  2392. JNC B004
  2393. MOV C,A SAVE CHAR.
  2394. CPI DLE TEST FOR DLE CODE
  2395. JZ B002
  2396. JMP E000
  2397.  
  2398. B005 MOV A,M
  2399. CMP C
  2400. JNZ B006
  2401. LDA SAVE GET DLE COUNT
  2402. DCR A AND DECREMENT IT.
  2403. STA SAVE
  2404. JMP B003
  2405.  
  2406. B006 EQU *
  2407. JNC S201
  2408.  
  2409. C000 EQU * NAK ARQ
  2410. LXI H,OUT4+1
  2411. LDA SEQ1
  2412. MOV M,A
  2413. CMA
  2414. MOV D,A
  2415. INX H
  2416. LDA SEQ2
  2417. MOV M,A
  2418. CMA
  2419. INX H
  2420. MOV M,D
  2421. INX H
  2422. MOV M,A
  2423. LXI H,OUT4
  2424. MVI B,#05
  2425. C001 CALL OUTDATA
  2426. JNC TERLD
  2427. INX H
  2428. DCR B
  2429. JNZ C001
  2430. LDA FLAGREG
  2431. ANI #04
  2432. JNZ C002
  2433. MVI A,#02
  2434. STA CNTR
  2435. LDA FLAGREG
  2436. ORI #04
  2437. STA FLAGREG
  2438. C002 JMP S200
  2439. EJECT
  2440. *
  2441. * LOAD RAM RESIDENT DATA
  2442. * B REG. BYTE COUNT
  2443. * HL REG. DATA STORE ADDR.
  2444. *
  2445. D000 EQU * DATA SECTION
  2446. LDA A3
  2447. MOV L,A
  2448. LDA A2
  2449. MOV H,A
  2450. XRA A
  2451. MOV B,A CLEAR BYTE COUNTER
  2452. STA CNTR
  2453. D001 CALL INDATA
  2454. JNC D001
  2455. CPI DLE TEST FOR DLE CODE
  2456. JZ D003
  2457. D002 MOV A,B
  2458. CPI #F0
  2459. JZ C000
  2460. LDA CHAR
  2461. MOV M,A
  2462. LDA CKSM LOAD CHECKSUM
  2463. ADD M AND ADD LAST BYTE
  2464. STA CKSM AND SAVE.
  2465. CALL CRCGEN
  2466. INX H
  2467. SHLD LWA SAVE LAST STORE ADDRESS
  2468. INR B
  2469. LDA CNTR
  2470. INR A
  2471. STA CNTR
  2472. JMP D001
  2473.  
  2474. D003 CALL INDATA
  2475. JNC D003
  2476. CPI DLE TEST FOR DLE CODE
  2477. JNZ D004 JUMP IF NOT DLE
  2478. INR B ELSE INC. BYTE COUNT.
  2479. JMP D002
  2480. D004 INX H INC. STORE ADDRESS
  2481. EJECT
  2482. E000 EQU * ETB/ETX DETECTION
  2483. CPI ETB TEST FOR ETB CODE
  2484. JNZ E005
  2485. MVI A,#02 SET ETB FLAG
  2486. STA FLAGREG
  2487. E001 CALL CRCGEN DO CRC CALCULATION
  2488. *
  2489. * TEST CRC CALCULATION WITH CRC RECEIVED
  2490. *
  2491. E001A CALL INDATA
  2492. JNC E001A
  2493. LXI H,CRC1 LOAD ADDRES OF CRC
  2494. CMP M AND TEST AGAINST REC.
  2495. JNZ C000 JUMP IF BAD CRC
  2496. E001B CALL INDATA
  2497. JNC E001B
  2498. LXI H,CRC2 LOAD ADDRESS OF CRC
  2499. CMP M AND TEST AGAINST REC
  2500. JNZ C000 JUMP IF BAD CRC
  2501. LDA CNTR
  2502. LXI H,A3
  2503. ADD M
  2504. MOV M,A
  2505. JNC E002
  2506. DCX H
  2507. INR M
  2508. E002 EQU * INCREMENT DATA STORE ADDR.
  2509. LDA SEQ2
  2510. ADI #01
  2511. STA SEQ2
  2512. JNC E003
  2513. LDA SEQ1
  2514. ADI #01
  2515. STA SEQ1
  2516.  
  2517. E003 LDA FLAGREG
  2518. ANI #02 TEST FOR ETB FLAG
  2519. JZ E003A
  2520. CALL L.DISP DISP LOADING BLOCK
  2521. JMP S200
  2522.  
  2523. E003A LDA FLAGREG
  2524. ORI #01
  2525. STA FLAGREG
  2526. MVI A,#02
  2527. STA CNTR
  2528. E006 LXI H,OUT3 OUTPUT ',DLE EOT',
  2529. MVI B,#02
  2530. E004 CALL OUTDATA
  2531. JNC TERLD
  2532. INX H
  2533. DCR B
  2534. JNZ E004
  2535. JMP E007
  2536. E005 CPI ETX TEST FOR ETX CODE
  2537. JZ E001
  2538. CPI STX TEST FOR STX CODE#
  2539. JNZ C000
  2540. JMP S210
  2541.  
  2542. E007 EQU *
  2543. MVI L,#1B DO BULK ERASE,
  2544. CALL R.MODE AND SET MODE 5.
  2545. JMP S101A RETURN TO LOOK FOR SLASHES
  2546.  
  2547. TERLD EQU *
  2548. LXI D,#00
  2549. LXI H,#B8
  2550. CALL R.OUTX OUTPUT COORDINATES
  2551. XCHG TO THE DISPLAY.
  2552. CALL R.OUTY
  2553. MVI L,#1B DO BULK ERASE,
  2554. CALL R.MODE AND SET MODE 5.
  2555. LXI H,DISP2 DISPLAY '7SYSTEM
  2556. CALL R.CHARS NOT ESTABLISHED'7.
  2557. JMP S101
  2558. EJECT
  2559.  
  2560. S107 LXI H,OUT1 OUTPUT ',LNN ',
  2561. INX H
  2562. LDA LDN
  2563. CALL CONVERT CONVERT HEX TO ASCII
  2564. LXI H,OUT1
  2565. MVI B,#04
  2566. S108 CALL OUTDATA
  2567. RNC ERROR, TERMINATE LOADING
  2568. INX H
  2569. DCR B
  2570. JNZ S108
  2571. RET
  2572.  
  2573. *
  2574. * INPUT COMM. DATA
  2575. * DATA INPUT IS DONE USING COMM. STATUS.
  2576. *
  2577. INDATA EQU *
  2578. LXI D,#0000
  2579. IN1 INX D
  2580. MVI A,#0A
  2581. SUB D
  2582. RZ
  2583. IN COMSTAT
  2584. ANI #04 TEST FOR CHAR. RDY. STATUS
  2585. JZ IN1
  2586. IN COMDATA
  2587. STA CHAR
  2588. STC SET '7RECEIVED DATA'7 FLAG.
  2589. RET
  2590.  
  2591. OUTDATA EQU *
  2592. LXI D,#0A00
  2593. O100 DCX D
  2594. MOV A,D
  2595. ORA E
  2596. RZ
  2597. IN COMSTAT
  2598. ANI #02 TEST FOR CHAR. REQ. STATUS
  2599. JZ O100
  2600. MOV A,M
  2601. OUT COMDATA
  2602. STC SET DATA TRANSMITTED FLAG.
  2603. RET
  2604.  
  2605. *
  2606. * CODE CONVERTION ROUTINE
  2607. * A BINARY BYTE IS CONVERTED TO TWO
  2608. * ASCII CHARACTERS.
  2609. *
  2610. CONVERT EQU *
  2611. MOV B,A
  2612. RAR
  2613. RAR
  2614. RAR
  2615. RAR
  2616. ANI #0F CONVERT LOWER 4 BITS
  2617. CALL C.CON BINARY TO ASCII
  2618. MOV M,A
  2619. INX H
  2620. MOV A,B
  2621. ANI #0F CONVERT UPPER 4 BITS
  2622. CALL C.CON
  2623. MOV M,A
  2624. RET
  2625. *
  2626. * ENTRY LOWER FOUR BITS OF A IS HEX CODE
  2627. * EXIT A REG IS ASCII EQUIVALENT
  2628. * C REG. IS CHANGED
  2629. *
  2630. C.CON EQU * BINARY TO ASCII
  2631. MOV C,A
  2632. SUI #09
  2633. JZ CON01
  2634. JP CON02
  2635. CON01 MOV A,C
  2636. ADI #30
  2637. JMP CON03
  2638. CON02 MOV A,C
  2639. ADI #37
  2640. CON03 JPE CON04
  2641. XRI #80
  2642. CON04 RET
  2643.  
  2644. *
  2645. * CRC GENERATOR
  2646. * THE POLYNOMIAL DIVISOR IS
  2647. * X**16+X**15+X**2+1
  2648. *
  2649. CRCGEN EQU *
  2650. LDA CRC1
  2651. MOV C,A
  2652. LDA CHAR
  2653. XRA C
  2654. MOV C,A
  2655. RAR
  2656. ANI #7F
  2657. XRA C
  2658. MOV C,A
  2659. RAR
  2660. RAR
  2661. XRA C
  2662. MOV D,A
  2663. RAR
  2664. RAR
  2665. RAR
  2666. RAR
  2667. XRA D
  2668. ANI #03
  2669. MOV D,A
  2670. MOV A,C
  2671. RLC
  2672. RLC
  2673. MOV E,A
  2674. ANI #FC
  2675. ORA D
  2676. MOV D,A
  2677. MOV A,E
  2678. RLC
  2679. ANI #06
  2680. MOV E,A
  2681. MOV A,D
  2682. RAR
  2683. MOV A,E
  2684. RAR
  2685. MOV C,A
  2686. LDA CRC2
  2687. XRA C
  2688. STA CRC1
  2689. MOV A,D
  2690. STA CRC2
  2691. RET
  2692. EJECT
  2693. L.DISP EQU * DISPL LOADING BLOCK
  2694. LXI D,#00
  2695. LXI H,#0120
  2696. CALL R.OUTX OUTPUT COORDINATES
  2697. XCHG TO THE DISPLAY.
  2698. CALL R.OUTY
  2699. LXI H,DISP4
  2700. LDA SEQ1
  2701. CALL CONVERT CONVERT HEX TO ASCII
  2702. INX H
  2703. LDA SEQ2
  2704. CALL CONVERT CONVERT HEX TO ASCII
  2705. LXI H,DISP4
  2706. CALL R.CHARS
  2707. RET
  2708. SPACE 6
  2709. BSSZ #0BF9+START-*
  2710. *
  2711. * ROM CHECKSUM TABLE
  2712. *
  2713. RST.CHP0 BSSZ 1 ROM 0 CHECKSUM
  2714. RST.CHP1 BSSZ 1 ROM 1 CHECKSUM
  2715. RST.CHP2 BSSZ 1 ROM 2 CHECKSUM
  2716. RST.CHP3 BSSZ 1 ROM 3 CHECKSUM
  2717. RST.CHP4 BSSZ 1 ROM 4 CHECKSUM
  2718. RST.CHP5 BSSZ 1 ROM 5 CHECKSUM
  2719. RST.CKSM BSSZ 1 ROM TABLE CHECKSUM
  2720. *
  2721. * * * * * * * * * * * *
  2722. *
  2723. * 'R'O'M 'CHECKSUM AND 'R'A'M 'TESTS
  2724. *
  2725. * 'THIS SECTION WILL CHECKSUM 6'K OF 'R'O'M WHICH INCLUDES
  2726. * LOADER, DIAGNOSTIC AND CHARACTER GENERATORS. 'THE
  2727. * CHECKSUM IS GENERATED AS FOLLOWS'; STARTING WITH THE
  2728. * HIGHEST 'R'O'M ADDRESS AND THE 'A REGISTER EQUAL TO ZERO
  2729. * AN EXCLUSIVE-OR BETWEEN THE CONTENTS OF MEMORY AND
  2730. * THE A REGISTER WILL BE PERFORMED. 'THE RESULT IS THEN
  2731. * LEFT-SHIFTED END-AROUND. 'THE 'R'O'M ADDRESS IS DECREMENTED
  2732. * AND THE PROCEDURE CONTINUES UNTIL A CHIP
  2733. * BOUNDARY IS REACHED. 'THE RESULTING CHECKSUM IS
  2734. * VERIFIED AGAINST A TABLE OF EXPECTED CHECKSUM
  2735. * BYTES. 'THIS PROCEDURE IS REPEATED FOR ALL SIX
  2736. * CHIPS.
  2737. *
  2738. * 'THE RAM MEMORY TEST WILL TEST A 2000H TO 3000H
  2739. * AND 4000H TO 8000H
  2740. *
  2741. * 'ERROR CODES ARE';
  2742. * 20 ROM FAILURE - CHIP 0
  2743. * 21 ROM FAILURE - CHIP 1
  2744. * 22 COMMAND/ROM FAILURE - CHIP 2
  2745. * 23 ROM FAILURE - CHIP 3
  2746. * 24 ROM FAILURE - CHIP 4
  2747. * 25 ROM FAILURE - CHIP 5
  2748. * 26 COMMAND/RAM FAILURE
  2749. *
  2750. * * * * * * * * * * * * *
  2751. *
  2752. RST.S000 EQU *
  2753. MVI A,#12 ERROR CODE FOR CHIP 2
  2754. OUT RSF.PANL*32+PANLDATA
  2755. LXI H,RST.CHP5 SET HL TO ADDR OF CHECKSUM TABLE
  2756. MVI D,6
  2757. MVI A,0
  2758. RST.S002 EQU *
  2759. XRA M DO UNTIL CHKSUM TABLE IS CHECKSUMMED
  2760. RLC
  2761. DCX H
  2762. DCR D
  2763. JNZ RST.S002
  2764. MOV C,A
  2765. LDA RST.CKSM GET EXPECTED RESULT
  2766. CMP C COMPARE
  2767. JZ RST.S004 JUMP IF CORRECT
  2768. HLT
  2769. RST.S004 EQU *
  2770. LXI H,RSV.HROM SET HL TO FIRST ADR. TO CHECKSUM
  2771. LXI D,RSV.ROML SET DE TO LENGTH OF CHECKSUM
  2772. LXI SP,RST.CHP5-1 SET SP TO EXPECTED CHECKSUM
  2773. RST.S005 EQU *
  2774. MOV A,H
  2775. ANI #1C
  2776. RRC
  2777. RRC FORM NUMBER OF CURRENT CHIP
  2778. ORI #10 FORM ERROR CODE
  2779. OUT RSF.PANL*32+PANLDATA OUTPUT ERROR CODE
  2780. MVI C,0 ZERO PARTIAL RESULT
  2781. RST.S010 EQU *
  2782. MOV A,C DO UNTIL CURRENT CHIP IS DONE
  2783. XRA M CHECKSUM NEXT BYTE
  2784. RLC
  2785. MOV C,A SAVE PARTIAL RESULT
  2786. DCX H UPDATE INDEX
  2787. DCX D UPDATE COUNTER
  2788. MOV A,D CHECK FOR CHIP BOUNDARY
  2789. ANI #03
  2790. ORA E
  2791. JNZ RST.S010 END DO
  2792. MOV A,C GET ACTUAL CHECK SUM
  2793. POP B GET EXPECTED CHECKSUM IN B
  2794. DCX SP
  2795. DCX SP MODIFY SP FOR NEXT CHIP
  2796. DCX SP
  2797. CMP B
  2798. JZ RST.S015
  2799. *
  2800. * ERROR 2X - CHECKSUM ERROR ON CHIP X
  2801. *
  2802. HLT
  2803. *
  2804. RST.S015 EQU *
  2805. MOV A,D END IF NEXT CHIP = 2
  2806. CPI #0C
  2807. JNZ RST.S016
  2808. DCX D
  2809. DCX D THEN UPDATE DE AND HL TO SKIP
  2810. DCX D OVER CHECKSUMMING LAST
  2811. DCX D 4 LOCATIONS OF CHIP 2
  2812. DCX D
  2813. DCX D
  2814. DCX D
  2815. DCX H
  2816. DCX H
  2817. DCX H
  2818. DCX H
  2819. DCX H
  2820. DCX H
  2821. DCX H
  2822. RST.S016 EQU *
  2823. MOV A,D END IF
  2824. ORA E CHECK FOR COUNT = 0
  2825. JNZ RST.S005
  2826. *
  2827. * 'R'A'M CHECK
  2828. *
  2829. MVI A,#16
  2830. OUT RSF.PANL*32+PANLDATA OUTPUT ERROR CODE
  2831. MVI B,#55 LOAD DATA PATTERN
  2832. RST.S030 EQU *
  2833. LXI H,#2000 STARTING ADDRESS
  2834. LXI D,#1000 LENGTH
  2835. RST.S020 EQU *
  2836. MOV M,B
  2837. MOV A,M
  2838. CMP B
  2839. JNZ RST.S050 JUMP IF ERROR
  2840. INX H
  2841. DCX D
  2842. MOV A,D
  2843. ORA E
  2844. JNZ RST.S020 REPEAT IF NOT DONE ALL BYTES
  2845. MOV A,H
  2846. XRI #80
  2847. JZ RST.S025 IF DONE HL = 8000H
  2848. LXI H,#4000
  2849. LXI D,#4000
  2850. JMP RST.S020
  2851.  
  2852. RST.S025 EQU *
  2853. LDA #7FFF
  2854. XRI #AA
  2855. JZ RST.SEC1
  2856. MVI B,#AA
  2857. JMP RST.S030
  2858.  
  2859.  
  2860. RST.S050 EQU *
  2861. HLT ERROR 26
  2862.  
  2863.  
  2864. EJECT
  2865. BSSZ #0D00-*+START
  2866. **
  2867. *E
  2868. * RST.OCHR DISPLAY CHAR ON DISPLAY VIA CONTROLWARE
  2869. *
  2870. * ENTRY BY CALL FROM SECTION FOUR
  2871. *
  2872. * CALLS CHAREN CONTROLWARE ENTRY POINT
  2873. *
  2874. * ALTERS MEMSEL FLAG IN CONTROLWARE
  2875. *
  2876. * EXIT BY RETURN TO CALLER
  2877. *
  2878. * ERRORS REPORTED
  2879. * NONE
  2880. RST.OCHR PUSH B SAVE BC
  2881. CALL OUTCOORD SET DISPLAY COORDINATES
  2882. MOV A,C GET CHAR TO OUTPUT
  2883. RRC
  2884. RRC
  2885. RRC
  2886. RRC
  2887. ANI #0F SAVE UPPER DIGIT
  2888. CALL RST.OUT GO TO COMMON CODE
  2889. POP B RESTORE BC
  2890. PUSH B
  2891. MOV A,C
  2892. ANI #0F SAVE LOWER DIGIT
  2893. CALL RST.OUT
  2894. POP B RESTORE BC
  2895. RET RETURN TO CALLER
  2896. RST.OUT EQU $
  2897. LHLD M0ADR LOAD ADDRESS OF M0
  2898. SHLD MEMSEL CHARACTER SET.
  2899. CPI #0A
  2900. JC RST.OUT5 JUMP IF 0-9
  2901. CPI #36
  2902. JNZ RST.OUT3
  2903. XRA A SET TO 00 FOR SPACE
  2904. JMP RST.OUT4
  2905. RST.OUT3 EQU $
  2906. ADI #17
  2907. RST.OUT4 EQU $
  2908. CALL CHAREN CALL CHARACTER GENERATOR
  2909. RET RETURN TO CALLER
  2910. RST.OUT5 EQU $
  2911. ADI #10
  2912. CALL CHAREN CALL CHARACTER GENERATOR
  2913. RET RETURN TO CALLER
  2914. RSV.HROM EQU #17FF LWA OF ROM
  2915. RSV.ROML EQU #1800 LENGTH OF ROM
  2916. RSV.RAML EQU #1000 LENGTH OF 4K RAM
  2917. RSV.SRAM EQU #2000 FWA OF RAM
  2918. RST.STAK EQU #205D
  2919. RST.CON5 EQU #2055
  2920. RST.CON6 EQU #2056
  2921. RSM.EXIT EQU #01
  2922. RSM.RAM EQU #02
  2923. RSM.SEC4 EQU #04
  2924. RSM.LOOP EQU #08
  2925. RSM.TOCH EQU #10
  2926. RSM.CCLR EQU #02
  2927. RSM.CSET EQU #D7
  2928. RSF.PANL EQU 0
  2929. RSF.COMM EQU 1
  2930. RSF.KYBD EQU 2
  2931. RSF.TOCH EQU 3
  2932. RSF.DISP EQU 4
  2933. COMMDAT1 EQU 0
  2934. COMMDAT2 EQU 1
  2935. COMMDAT3 EQU 2
  2936. COMMCONT EQU 2
  2937. COMMSTAT EQU 3
  2938. KYBDCONT EQU 0
  2939. KYBDSTAT EQU 1
  2940. KYBDDATA EQU 2
  2941. TOCHCONT EQU 0
  2942. TOCHSTAT EQU 1
  2943. TOCHDATA EQU 0
  2944. DISPDATA EQU 3
  2945. DISPXCOR EQU 4
  2946. DISPYCOR EQU 5
  2947. DISPCON1 EQU 6
  2948. DISPCON2 EQU 7
  2949. DISPXREG EQU 0
  2950. DISPYREG EQU 1
  2951. DISPXY28 EQU 2
  2952. PANLDATA EQU #10
  2953. PANLSWCH EQU #11
  2954. * EQUATES USED FOR LOADER
  2955. CONT1 EQU #A1
  2956. COMSTAT EQU #E3
  2957. COMDATA EQU #E2
  2958. DUMPY EQU #00
  2959. ETX EQU #03 ETX CODE
  2960. ETB EQU #17 ETB CODE
  2961. ESC EQU #1B ESCAPE CODE
  2962. SPACE EQU #20 SPACE CODE
  2963. DLE EQU #90 DLE CODE
  2964. STX EQU #82 STX CODE
  2965. EOT EQU #84 EOT CODE
  2966. CR EQU #8D CR CODE
  2967. NAK EQU #95 NAK CODE
  2968. ASCL EQU #CC ASCII L
  2969. ASC0 EQU #30 ASCII 0
  2970. SLASH EQU #AF / CODE
  2971. EJECT
  2972. FIX EQU *
  2973. BSSZ #0DAB-*+START
  2974. *
  2975. * LOADER DISPLAY MESSAGES
  2976. *
  2977. SPACE 2
  2978. DISP3 EQU *
  2979. DB #4C,#4F,#41,#44 L O A D
  2980. DB #49,#4E,#47,#20 I N G
  2981. DB #44,#4F,#4E,#45 D O N E
  2982. DB #1B,#30
  2983.  
  2984. DISP2 EQU *
  2985. DB #4C,#4F,#41,#44 'L 'O 'A 'D
  2986. DB #49,#4E,#47,#20 'I 'N 'G SP
  2987. DB #46,#41,#49,#4C 'F 'A 'I 'L
  2988. DB #55,#52,#45,#20 'U 'R 'E SP
  2989. DB #1B,#30
  2990.  
  2991. DISP1 EQU *
  2992. DB #4C,#4F,#41,#44 L O A D
  2993. DB #49,#4E,#47,#20 I N G
  2994. DB #42,#4C,#4B,#20 B L K
  2995. DB #20,#1B,#30
  2996. EJECT
  2997.  
  2998. *
  2999. * PLATO M0 CHARACTER SET
  3000. *
  3001. M0CODE00 DB #00,#00,#00,#00 SPACE
  3002. DB #00,#00,#00,#00
  3003. DB #00,#00,#00,#00
  3004. DB #00,#00,#00,#00
  3005. M0CODE01 DB #00,#00,#00,#00 EXCLAMATION MARK
  3006. DB #00,#00,#90,#1F
  3007. DB #00,#00,#00,#00
  3008. DB #00,#00,#00,#00
  3009. M0CODE02 DB #00,#00,#00,#00 DOUBLE QUOTES
  3010. DB #00,#1C,#00,#00
  3011. DB #00,#1C,#00,#00
  3012. DB #00,#00,#00,#00
  3013. M0CODE03 DB #00,#05,#00,#05 NUMBER SIGN
  3014. DB #C0,#1F,#00,#05
  3015. DB #C0,#1F,#00,#05
  3016. DB #00,#05,#00,#00
  3017. M0CODE04 DB #40,#06,#20,#09 DOLLAR SIGN
  3018. DB #20,#09,#F0,#1F
  3019. DB #20,#09,#20,#09
  3020. DB #C0,#04,#00,#00
  3021. M0CODE05 DB #20,#0C,#40,#12 PERCENT SIGN
  3022. DB #80,#0C,#00,#01
  3023. DB #60,#02,#90,#04
  3024. DB #60,#08,#00,#00
  3025. M0CODE06 DB #E0,#00,#10,#0D AMPER SIGN
  3026. DB #10,#13,#90,#0C
  3027. DB #60,#00,#60,#00
  3028. DB #90,#01,#00,#00
  3029. M0CODE07 DB #00,#00,#00,#00 SINGLE QUOTE
  3030. DB #00,#00,#00,#1C
  3031. DB #00,#00,#00,#00
  3032. DB #00,#00,#00,#00
  3033. M0CODE08 DB #00,#00,#00,#00 LEFT PAREN
  3034. DB #00,#00,#00,#00
  3035. DB #E0,#07,#10,#08
  3036. DB #08,#10,#00,#00
  3037. M0CODE09 DB #08,#10,#10,#08 RIGHT PAREN
  3038. DB #E0,#07,#00,#00
  3039. DB #00,#00,#00,#00
  3040. DB #00,#00,#00,#00
  3041. M0CODE0A DB #00,#00,#40,#02 ASTERISK
  3042. DB #80,#01,#60,#06
  3043. DB #80,#01,#40,#02
  3044. DB #00,#00,#00,#00
  3045. M0CODE0B DB #00,#00,#80,#00 PLUS
  3046. DB #80,#00,#E0,#03
  3047. DB #80,#00,#80,#00
  3048. DB #00,#00,#00,#00
  3049. M0CODE0C DB #00,#00,#00,#00 COMMA
  3050. DB #34,#00,#38,#00
  3051. DB #00,#00,#00,#00
  3052. DB #00,#00,#00,#00
  3053. M0CODE0D DB #00,#00,#80,#00 MINUS
  3054. DB #80,#00,#80,#00
  3055. DB #80,#00,#80,#00
  3056. DB #00,#00,#00,#00
  3057. M0CODE0E DB #00,#00,#00,#00 PERIOD
  3058. DB #30,#00,#30,#00
  3059. DB #00,#00,#00,#00
  3060. DB #00,#00,#00,#00
  3061. M0CODE0F DB #10,#00,#20,#00 SLASH
  3062. DB #40,#00,#80,#00
  3063. DB #00,#01,#00,#02
  3064. DB #00,#04,#00,#00
  3065. M0CODE10 DB #10,#00,#E0,#07 NUMERAL ZERO
  3066. DB #50,#08,#90,#09
  3067. DB #10,#0A,#E0,#07
  3068. DB #00,#08,#00,#00
  3069. M0CODE11 DB #00,#00,#00,#00 NUMERAL ONE
  3070. DB #10,#04,#F0,#0F
  3071. DB #10,#00,#00,#00
  3072. DB #00,#00,#00,#00
  3073. M0CODE12 DB #00,#00,#30,#04 NUMERAL TWO
  3074. DB #50,#08,#90,#08
  3075. DB #10,#09,#10,#06
  3076. DB #00,#00,#00,#00
  3077. M0CODE13 DB #00,#00,#20,#04 NUMERAL THREE
  3078. DB #10,#08,#10,#09
  3079. DB #10,#09,#E0,#06
  3080. DB #00,#00,#00,#00
  3081. M0CODE14 DB #00,#00,#80,#00 NUMERAL FOUR
  3082. DB #80,#01,#80,#02
  3083. DB #80,#04,#F0,#0F
  3084. DB #80,#00,#00,#00
  3085. M0CODE15 DB #00,#00,#10,#0F NUMERAL FIVE
  3086. DB #10,#09,#10,#09
  3087. DB #20,#09,#C0,#08
  3088. DB #00,#00,#00,#00
  3089. M0CODE16 DB #00,#00,#E0,#03 NUMERAL SIX
  3090. DB #10,#05,#10,#09
  3091. DB #10,#09,#E0,#00
  3092. DB #00,#00,#00,#00
  3093. M0CODE17 DB #00,#00,#00,#08 NUMERAL SEVEN
  3094. DB #30,#08,#C0,#08
  3095. DB #00,#0B,#00,#0C
  3096. DB #00,#00,#00,#00
  3097. M0CODE18 DB #00,#00,#E0,#06 NUMERAL EIGHT
  3098. DB #10,#09,#10,#09
  3099. DB #10,#09,#E0,#06
  3100. DB #00,#00,#00,#00
  3101. M0CODE19 DB #00,#00,#00,#07 NUMERAL NINE
  3102. DB #90,#08,#90,#08
  3103. DB #A0,#08,#C0,#07
  3104. DB #00,#00,#00,#00
  3105. M0CODE1A DB #00,#00,#00,#00 COLON
  3106. DB #30,#03,#30,#03
  3107. DB #00,#00,#00,#00
  3108. DB #00,#00,#00,#00
  3109. M0CODE1B DB #00,#00,#00,#00 SEMICOLON
  3110. DB #34,#03,#38,#03
  3111. DB #00,#00,#00,#00
  3112. DB #00,#00,#00,#00
  3113. M0CODE1C DB #00,#00,#80,#00 LESS THAN
  3114. DB #40,#01,#20,#02
  3115. DB #10,#04,#00,#00
  3116. DB #00,#00,#00,#00
  3117. M0CODE1D DB #00,#00,#40,#01 EQUALS
  3118. DB #40,#01,#40,#01
  3119. DB #40,#01,#40,#01
  3120. DB #00,#00,#00,#00
  3121. M0CODE1E DB #00,#00,#00,#00 GREATER THAN
  3122. DB #10,#04,#20,#02
  3123. DB #40,#01,#80,#00
  3124. DB #00,#00,#00,#00
  3125. M0CODE1F DB #00,#00,#00,#0C QUESTION MARK
  3126. DB #00,#10,#D0,#10
  3127. DB #00,#11,#00,#0E
  3128. DB #00,#00,#00,#00
  3129. M0CODE20 DB #E0,#01,#10,#02 COMMERCIAL AT
  3130. DB #C8,#04,#28,#05
  3131. DB #E8,#05,#20,#02
  3132. DB #C0,#01,#00,#00
  3133. M0CODE21 DB #F0,#07,#00,#09 UPPER CASE A
  3134. DB #00,#11,#00,#11
  3135. DB #00,#11,#00,#09
  3136. DB #F0,#07,#00,#00
  3137. M0CODE22 DB #F0,#1F,#10,#12 UPPER CASE B
  3138. DB #10,#12,#10,#12
  3139. DB #10,#12,#10,#0E
  3140. DB #E0,#01,#00,#00
  3141. M0CODE23 DB #C0,#07,#20,#08 UPPER CASE C
  3142. DB #10,#10,#10,#10
  3143. DB #10,#10,#10,#10
  3144. DB #20,#08,#00,#00
  3145. M0CODE24 DB #F0,#1F,#10,#10 UPPER CASE D
  3146. DB #10,#10,#10,#10
  3147. DB #10,#10,#20,#08
  3148. DB #C0,#07,#00,#00
  3149. M0CODE25 DB #F0,#1F,#10,#11 UPPER CASE E
  3150. DB #10,#11,#10,#11
  3151. DB #10,#10,#10,#10
  3152. DB #10,#10,#00,#00
  3153. M0CODE26 DB #F0,#1F,#00,#11 UPPER CASE F
  3154. DB #00,#11,#00,#11
  3155. DB #00,#10,#00,#10
  3156. DB #00,#10,#00,#00
  3157. M0CODE27 DB #C0,#07,#20,#08 UPPER CASE G
  3158. DB #10,#10,#10,#10
  3159. DB #90,#10,#90,#10
  3160. DB #E0,#08,#00,#00
  3161. M0CODE28 DB #F0,#1F,#00,#01 UPPER CASE H
  3162. DB #00,#01,#00,#01
  3163. DB #00,#01,#00,#01
  3164. DB #F0,#1F,#00,#00
  3165. M0CODE29 DB #00,#00,#10,#10 UPPER CASE I
  3166. DB #10,#10,#F0,#1F
  3167. DB #10,#10,#10,#10
  3168. DB #00,#00,#00,#00
  3169. M0CODE2A DB #20,#00,#10,#00 UPPER CASE J
  3170. DB #10,#10,#10,#10
  3171. DB #E0,#1F,#00,#10
  3172. DB #00,#10,#00,#00
  3173. M0CODE2B DB #F0,#1F,#80,#00 UPPER CASE K
  3174. DB #00,#01,#80,#02
  3175. DB #40,#04,#20,#08
  3176. DB #10,#10,#00,#00
  3177. M0CODE2C DB #F0,#1F,#10,#00 UPPER CASE L
  3178. DB #10,#00,#10,#00
  3179. DB #10,#00,#10,#00
  3180. DB #10,#00,#00,#00
  3181. M0CODE2D DB #F0,#1F,#00,#08 UPPER CASE M
  3182. DB #00,#04,#00,#02
  3183. DB #00,#04,#00,#08
  3184. DB #F0,#1F,#00,#00
  3185. M0CODE2E DB #F0,#1F,#00,#08 UPPER CASE N
  3186. DB #00,#06,#00,#01
  3187. DB #C0,#00,#20,#00
  3188. DB #F0,#1F,#00,#00
  3189. M0CODE2F DB #C0,#07,#20,#08 UPPER CASE O
  3190. DB #10,#10,#10,#10
  3191. DB #10,#10,#20,#08
  3192. DB #C0,#07,#00,#00
  3193. M0CODE30 DB #F0,#1F,#00,#11 UPPER CASE P
  3194. DB #00,#11,#00,#11
  3195. DB #00,#11,#00,#11
  3196. DB #00,#0E,#00,#00
  3197. M0CODE31 DB #C0,#07,#20,#08 UPPER CASE Q
  3198. DB #10,#10,#18,#10
  3199. DB #14,#10,#24,#08
  3200. DB #C0,#07,#00,#00
  3201. M0CODE32 DB #F0,#1F,#00,#11 UPPER CASE R
  3202. DB #00,#11,#80,#11
  3203. DB #40,#11,#20,#11
  3204. DB #10,#0E,#00,#00
  3205. M0CODE33 DB #20,#0E,#10,#11 UPPER CASE S
  3206. DB #10,#11,#10,#11
  3207. DB #10,#11,#10,#11
  3208. DB #E0,#08,#00,#00
  3209. M0CODE34 DB #00,#10,#00,#10 UPPER CASE T
  3210. DB #00,#10,#F0,#1F
  3211. DB #00,#10,#00,#10
  3212. DB #00,#10,#00,#00
  3213. M0CODE35 DB #E0,#1F,#10,#00 UPPER CASE U
  3214. DB #10,#00,#10,#00
  3215. DB #10,#00,#10,#00
  3216. DB #E0,#1F,#00,#00
  3217. M0CODE36 DB #00,#18,#00,#07 UPPER CASE V
  3218. DB #C0,#00,#30,#00
  3219. DB #C0,#00,#00,#07
  3220. DB #00,#18,#00,#00
  3221. M0CODE37 DB #E0,#1F,#10,#00 UPPER CASE W
  3222. DB #20,#00,#C0,#03
  3223. DB #20,#00,#10,#00
  3224. DB #E0,#1F,#00,#00
  3225. M0CODE38 DB #30,#18,#40,#04 UPPER CASE X
  3226. DB #80,#02,#00,#01
  3227. DB #80,#02,#40,#04
  3228. DB #30,#18,#00,#00
  3229. M0CODE39 DB #00,#18,#00,#04 UPPER CASE Y
  3230. DB #00,#02,#F0,#01
  3231. DB #00,#02,#00,#04
  3232. DB #00,#18,#00,#00
  3233. M0CODE3A DB #30,#18,#50,#10 UPPER CASE Z
  3234. DB #90,#10,#10,#11
  3235. DB #10,#12,#10,#14
  3236. DB #30,#18,#00,#00
  3237. M0CODE3B DB #00,#00,#00,#00 LEFT BRACKET
  3238. DB #00,#00,#00,#00
  3239. DB #F8,#1F,08,#10
  3240. DB 08,#10,00,00
  3241. M0CODE3C DB #00,#04,#00,#02 REVERSE SLASH
  3242. DB #00,#01,#80,#00
  3243. DB #40,#00,#20,#00
  3244. DB #10,#00,#00,#00
  3245. M0CODE3D DB #08,#10,#08,#10 RIGHT BRACKET
  3246. DB #F8,#1F,#00,#00
  3247. DB #00,#00,#00,#00
  3248. DB #00,#00,#00,#00
  3249. M0CODE3E DB #00,#00,#00,#10 HAT
  3250. DB #00,#20,#00,#40
  3251. DB #00,#20,#00,#10
  3252. DB #00,#00,#00,#00
  3253. M0CODE3F DB #04,#00,#04,#00 UNDERLINE
  3254. DB #04,#00,#04,#00
  3255. DB #04,#00,#04,#00
  3256. DB #04,#00,#00,#00
  3257. M0CODE40 DB #00,#00,#00,#40 SINGLE LEFT QUOTE
  3258. DB #00,#20,#00,#10
  3259. DB #00,#00,#00,#00
  3260. DB #00,#00,#00,#00
  3261. M0CODE41 DB #60,#00,#90,#02 LOWER CASE A
  3262. DB #90,#02,#90,#02
  3263. DB #90,#02,#E0,#01
  3264. DB #10,#00,#00,#00
  3265. M0CODE42 DB #F0,#1F,#20,#01 LOWER CASE B
  3266. DB #10,#02,#10,#02
  3267. DB #10,#02,#20,#01
  3268. DB #C0,#00,#00,#00
  3269. M0CODE43 DB #C0,#00,#20,#01 LOWER CASE C
  3270. DB #10,#02,#10,#02
  3271. DB #10,#02,#10,#02
  3272. DB #20,#01,#00,#00
  3273. M0CODE44 DB #C0,#00,#20,#01 LOWER CASE D
  3274. DB #10,#02,#10,#02
  3275. DB #10,#02,#20,#01
  3276. DB #F0,#1F,#00,#00
  3277. M0CODE45 DB #C0,#00,#A0,#01 LOWER CASE E
  3278. DB #90,#02,#90,#02
  3279. DB #90,#02,#90,#02
  3280. DB #90,#01,#00,#00
  3281. M0CODE46 DB #00,#00,#00,#00 LOWER CASE F
  3282. DB #10,#02,#F0,#0F
  3283. DB #10,#12,#00,#10
  3284. DB #00,#08,#00,#00
  3285. M0CODE47 DB #A8,#01,#54,#02 LOWER CASE G
  3286. DB #54,#02,#54,#02
  3287. DB #54,#02,#94,#01
  3288. DB #08,#02,#00,#00
  3289. M0CODE48 DB #00,#10,#F0,#1F LOWER CASE H
  3290. DB #00,#01,#00,#02
  3291. DB #00,#02,#00,#02
  3292. DB #F0,#01,#00,#00
  3293. M0CODE49 DB #00,#00,#00,#00 LOWER CASE I
  3294. DB #10,#02,#F0,#13
  3295. DB #10,#00,#00,#00
  3296. DB #00,#00,#00,#00
  3297. M0CODE4A DB 00,00,02,00 LOWER CASE J
  3298. DB 02,02,#FC,#13
  3299. DB #00,#00,#00,#00
  3300. DB #00,#00,#00,#00
  3301. M0CODE4B DB #10,#10,#F0,#1F LOWER CASE K
  3302. DB #80,#00,#40,#01
  3303. DB #20,#02,#10,#02
  3304. DB #10,#00,#00,#00
  3305. M0CODE4C DB 00,00,00,00 LOWER CASE L
  3306. DB #10,#10,#F0,#1F
  3307. DB #10,00,00,00
  3308. DB #00,#00,#00,#00
  3309. M0CODE4D DB #F0,#03,#00,#02 LOWER CASE M
  3310. DB #00,#02,#F0,#01
  3311. DB #00,#02,#00,#02
  3312. DB #F0,#01,#00,#00
  3313. M0CODE4E DB #00,#02,#F0,#03 LOWER CASE N
  3314. DB #00,#01,#00,#02
  3315. DB #00,#02,#00,#02
  3316. DB #F0,#01,#00,#00
  3317. M0CODE4F DB #C0,#00,#20,#01 LOWER CASE O
  3318. DB #10,#02,#10,#02
  3319. DB #10,#02,#20,#01
  3320. DB #C0,#00,#00,#00
  3321. M0CODE50 DB #FE,#03,#20,#01 LOWER CASE P
  3322. DB #10,#02,#10,#02
  3323. DB #10,#02,#20,#01
  3324. DB #C0,#00,#00,#00
  3325. M0CODE51 DB #C0,#00,#20,#01 LOWER CASE Q
  3326. DB #10,#02,#10,#02
  3327. DB #10,#02,#20,#01
  3328. DB #FE,#03,#00,#00
  3329. M0CODE52 DB #00,#02,#F0,#03 LOWER CASE R
  3330. DB #00,#01,#00,#02
  3331. DB #00,#02,#00,#02
  3332. DB #00,#01,#00,#00
  3333. M0CODE53 DB #20,#01,#90,#02 LOWER CASE S
  3334. DB #90,#02,#90,#02
  3335. DB #90,#02,#90,#02
  3336. DB #60,#00,#00,#00
  3337. M0CODE54 DB #00,#02,#00,#02 LOWER CASE T
  3338. DB #E0,#1F,#10,#02
  3339. DB #10,#02,#10,#02
  3340. DB #00,#00,#00,#00
  3341. M0CODE55 DB #E0,#03,#10,#00 LOWER CASE U
  3342. DB #10,#00,#10,#00
  3343. DB #10,#00,#E0,#03
  3344. DB #10,#00,#00,#00
  3345. M0CODE56 DB #00,#02,#00,#03 LOWER CASE V
  3346. DB #C0,#00,#30,#00
  3347. DB #C0,#00,#00,#03
  3348. DB #00,#02,#00,#00
  3349. M0CODE57 DB #E0,#03,#10,#00 LOWER CASE W
  3350. DB #20,#00,#C0,#01
  3351. DB #20,#00,#10,#00
  3352. DB #E0,#03,#00,#00
  3353. M0CODE58 DB #00,#02,#10,#02 LOWER CASE X
  3354. DB #20,#01,#C0,#00
  3355. DB #C0,#00,#20,#01
  3356. DB #10,#02,#00,#00
  3357. M0CODE59 DB #82,#03,#44,#00 LOWER CASE Y
  3358. DB #28,#00,#10,#00
  3359. DB #20,#00,#40,#00
  3360. DB #80,#03,#00,#00
  3361. M0CODE5A DB #10,#03,#30,#02 LOWER CASE Z
  3362. DB #50,#02,#90,#02
  3363. DB #10,#03,#30,#02
  3364. DB #00,#00,#00,#00
  3365. M0CODE5B DB #00,#00,#00,#00 LEFT BRACE
  3366. DB #00,#00,#80,#00
  3367. DB #78,#0F,#04,#10
  3368. DB #04,#10,#00,#00
  3369. M0CODE5C DB #00,#00,#E0,#3D ELONGATED COLON
  3370. DB #E0,#3D,#E0,#3D
  3371. DB #00,#00,#00,#00
  3372. DB #00,#00,#00,#00
  3373. M0CODE5D DB #04,#10,#04,#10 RIGHT BRACE
  3374. DB #78,#0F,#80,#00
  3375. DB #00,#00,#00,#00
  3376. DB #00,#00,#00,#00
  3377. M0CODE5E DB #00,#00,#80,#00 APPROXIMATE
  3378. DB #00,#01,#00,#01
  3379. DB #80,#00,#80,#00
  3380. DB #00,#01,#00,#00
  3381. M0CODE5F DB #F0,#1F,#F0,#1F RUBOUT
  3382. DB #F0,#1F,#F0,#1F
  3383. DB #F0,#1F,#F0,#1F
  3384. DB #F0,#1F,#F0,#1F
  3385. M0CODE60 DB #01,#00,#01,#00 CURSOR
  3386. DB #01,#00,#01,#00
  3387. DB #01,#00,#01,#00
  3388. DB #01,#00,#01,#00
  3389. M0CODE61 DB #00,#00,#00,#00 CHCURSOR
  3390. DB #00,#00,#00,#01
  3391. DB #80,#03,#00,#01
  3392. DB #00,#00,#00,#00
  3393. *
  3394. * PLATO M1 CHARACTER SET
  3395. *
  3396. M1CODE00 DB #00,#00,#00,#00 SPACE
  3397. DB #00,#00,#00,#00
  3398. DB #00,#00,#00,#00
  3399. DB #00,#00,#00,#00
  3400. M1CODE01 DB #00,#00,#40,#00 SHORTER SLASH
  3401. DB #80,#00,#00,#01
  3402. DB #00,#02,#00,#04
  3403. DB #00,#08,#00,#00
  3404. M1CODE02 DB #00,#00,#A0,#02 EQUIVALENT
  3405. DB #A0,#02,#A0,#02
  3406. DB #A0,#02,#A0,#02
  3407. DB #00,#00,#00,#00
  3408. M1CODE03 DB #00,#00,#00,#10 SPANISH N
  3409. DB #00,#20,#00,#20
  3410. DB #00,#10,#00,#10
  3411. DB #00,#20,#00,#00
  3412. M1CODE04 DB #80,#00,#40,#01 REPLACEMENT ARROW
  3413. DB #20,#02,#70,#07
  3414. DB #40,#01,#40,#01
  3415. DB #40,#01,#00,#00
  3416. M1CODE05 DB #50,#01,#60,#01 NOT EQUAL
  3417. DB #40,#01,#C0,#01
  3418. DB #40,#01,#40,#03
  3419. DB #40,#05,#00,#00
  3420. M1CODE06 DB #00,#00,#00,#01 UP ARROW
  3421. DB #00,#03,#F0,#07
  3422. DB #00,#03,#00,#01
  3423. DB #00,#00,#00,#00
  3424. M1CODE07 DB #80,#00,#80,#00 RIGHT ARROW
  3425. DB #80,#00,#80,#00
  3426. DB #E0,#03,#C0,#01
  3427. DB #80,00,00,00
  3428. M1CODE08 DB #00,#00,#40,#00 DOWN ARROW
  3429. DB #60,#00,#F0,#07
  3430. DB #60,#00,#40,#00
  3431. DB #00,#00,#00,#00
  3432. M1CODE09 DB #80,#00,#C0,#01 LEFT ARROW
  3433. DB #E0,#03,#80,#00
  3434. DB #80,#00,#80,#00
  3435. DB #80,#00,#00,#00
  3436. M1CODE0A DB #00,#00,#00,#00 STAR
  3437. DB #40,#02,#80,#01
  3438. DB #80,#01,#40,#02
  3439. DB #00,#00,#00,#00
  3440. M1CODE0B DB #10,#10,#30,#18 CAPITAL SIGMA
  3441. DB #50,#14,#90,#12
  3442. DB #10,#11,#10,#10
  3443. DB #10,#10,#00,#00
  3444. M1CODE0C DB #30,#00,#D0,#00 CAPITAL DELTA
  3445. DB #10,#03,#10,#0C
  3446. DB #10,#03,#D0,#00
  3447. DB #30,#00,#00,#00
  3448. M1CODE0D DB #00,#00,#80,#03 CUP
  3449. DB #40,#00,#40,#00
  3450. DB #40,#00,#80,#03
  3451. DB #00,#00,#00,#00
  3452. M1CODE0E DB #00,#00,#C0,#01 CAP
  3453. DB #00,#02,#00,#02
  3454. DB #00,#02,#C0,#01
  3455. DB #00,#00,#00,#00
  3456. M1CODE0F DB #00,#00,#80,#00 DIVIDE
  3457. DB #80,#00,#A0,#02
  3458. DB #80,#00,#80,#00
  3459. DB #00,#00,#00,#00
  3460. M1CODE10 DB #E0,#01,#10,#02 ALPHA
  3461. DB #10,#02,#A0,#01
  3462. DB #60,#00,#90,#00
  3463. DB #10,#03,#00,#00
  3464. M1CODE11 DB #02,#00,#FC,#03 BETA
  3465. DB #10,#05,#10,#09
  3466. DB #10,#09,#90,#06
  3467. DB #60,#00,#00,#00
  3468. M1CODE12 DB #00,#00,#E0,#0C SMALL DELTA
  3469. DB #10,#13,#10,#11
  3470. DB #90,#08,#60,#04
  3471. DB #00,#00,#00,#00
  3472. M1CODE13 DB #00,#00,#30,#10 LAMDA
  3473. DB #C0,#0C,#00,#03
  3474. DB #C0,#00,#30,#00
  3475. DB #00,#00,#00,#00
  3476. M1CODE14 DB #02,#00,#02,#00 MU
  3477. DB #FC,#03,#10,#00
  3478. DB #10,#00,#E0,#03
  3479. DB #10,#00,#00,#00
  3480. M1CODE15 DB #00,#01,#00,#02 PI
  3481. DB #F0,#03,#00,#02
  3482. DB #F0,#03,#00,#02
  3483. DB #00,#04,#00,#00
  3484. M1CODE16 DB #06,#00,#38,#00 RHO
  3485. DB #E0,#00,#10,#01
  3486. DB #10,#02,#20,#02
  3487. DB #C0,#01,#00,#00
  3488. M1CODE17 DB #E0,#00,#10,#01 SMALL SIGMA
  3489. DB #10,#02,#10,#03
  3490. DB #E0,#02,#00,#02
  3491. DB #00,#02,#00,#00
  3492. M1CODE18 DB #E0,#01,#10,#02 OMEGA
  3493. DB #10,#00,#E0,#00
  3494. DB #10,#00,#10,#02
  3495. DB #E0,#01,#00,#00
  3496. M1CODE19 DB #20,#02,#20,#02 LESSOR OR EQUAL
  3497. DB #20,#05,#20,#05
  3498. DB #A0,#08,#A0,#08
  3499. DB #00,#00,#00,#00
  3500. M1CODE1A DB #00,#00,#A0,#08 GREATER OR EQUAL
  3501. DB #A0,#08,#20,#05
  3502. DB #20,#05,#20,#02
  3503. DB #20,#02,#00,#00
  3504. M1CODE1B DB #C0,#07,#20,#09 THETA
  3505. DB #10,#11,#10,#11
  3506. DB #10,#11,#20,#09
  3507. DB #C0,#07,#00,#00
  3508. M1CODE1C DB 00,00,#80,00 EMBEDDED LEFT PAREN
  3509. DB #40,01,#20,02
  3510. DB #F0,07,#10,08
  3511. DB #08,#10,00,00
  3512. M1CODE1D DB #00,#00,#00,#0C DEGREE SIGN
  3513. DB #00,#12,#00,#12
  3514. DB #00,#0C,#00,#00
  3515. DB #00,#00,#00,#00
  3516. M1CODE1E DB 08,#10,#10,08 EMBEDDED RIGHT PAREN
  3517. DB #F0,07,#20,02
  3518. DB #40,01,#80,00
  3519. DB #00,00,00,00
  3520. M1CODE1F DB #1C,#1C,#24,#12 RIGHT ARROW HEAD
  3521. DB #48,#09,#90,#04
  3522. DB #20,#02,#40,#01
  3523. DB #80,#00,#00,#00
  3524. M1CODE20 DB #84,#21,#44,#22 PART OF COPYRIGHT
  3525. DB #24,#24,#24,#24 CENTER
  3526. DB #24,#24,#24,#24
  3527. DB #44,#22,#00,#00
  3528. M1CODE21 DB #00,#00,#00,#00 2 DOTS
  3529. DB #00,#10,#00,#00
  3530. DB #00,#10,#00,#00
  3531. DB #00,#00,#00,#00
  3532. M1CODE22 DB #00,#00,#C0,#03 SQUARE
  3533. DB #40,#02,#40,#02
  3534. DB #40,#02,#C0,#03
  3535. DB #00,#00,#00,#00
  3536. M1CODE23 DB 00,00,#80,01 MATRIX MULTIPLY
  3537. DB #40,02,#40,02
  3538. DB #80,01,00,00
  3539. DB #00,00,00,00
  3540. M1CODE24 DB #80,#00,#C0,#01 DIAMOND
  3541. DB #E0,#03,#F0,#07
  3542. DB #E0,#03,#C0,#01
  3543. DB #80,#00,#00,#00
  3544. M1CODE25 DB #10,04,#20,02 VECTOR PRODUCT
  3545. DB #40,01,#80,00
  3546. DB #40,01,#20,02
  3547. DB #10,04,00,00
  3548. M1CODE26 DB 00,00,00,00 SINGLE RIGHT QUOTE
  3549. DB 00,00,00,#10
  3550. DB 00,#20,00,#40
  3551. DB 00,00,00,00
  3552. M1CODE27 DB 00,00,00,00 CEDILLA
  3553. DB 00,00,08,00
  3554. DB #10,00,#20,00
  3555. DB #00,00,00,00
  3556. M1CODE28 DB #00,00,00,#40 MAD HAT
  3557. DB 00,#20,00,#10
  3558. DB 00,#20,00,#40
  3559. DB 00,00,00,00
  3560. M1CODE29 DB 00,00,#40,01 UP AND DOWN ARROWS
  3561. DB #60,03,#F0,#07
  3562. DB #60,#03,#40,01
  3563. DB 00,00,00,00
  3564. M1CODE2A DB 00,00,00,00 VERTICAL LINE
  3565. DB 00,00,#F0,#1F
  3566. DB 00,00,00,00
  3567. DB 00,00,00,00
  3568.  
  3569. BSSZ #2000-*+START
  3570.  
  3571.  
  3572.  
  3573. ORG #2000
  3574. LWA BSS 2 LWA OF RAM RESIDENT
  3575. CKSM BSS 1 RAM RESIDENT CHECKSUM
  3576. BSS 36
  3577. BSS 41 STACK STORAGE AREA
  3578. IST.STK EQU $ *****STACK INITIALIZATION ADDRESS*****
  3579. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  3580. * TERMINAL VARIABLES AND SCRATCH AREA
  3581. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  3582. D.CNTL2 BSS 1 DISPLAY CONTROL 2 FOR CHARACTER GEN.
  3583. SIZE BSS 1 CHARACTER SIZE REGISTER
  3584. FWD.REV BSS 1 CHARACTER PLOT FORWARD OR REVERSE
  3585. HOR BSS 1 HORIZONTAL PLOTTING FLAG
  3586. VER BSS 1 VERTICAL PLOTTING FLAG.
  3587. X.PLOT BSS 2 X CONSTANT FOR NEXT CHARACTER.
  3588. Y.PLOT BSS 2 Y CONSTANT FOR NEXT CHARACTER.
  3589. CHAR.GEN BSS 2 CHARACTER GENERATOR ADDRESS
  3590. XREG BSS 2 CURRENT X COORDINATE
  3591. YREG BSS 2 CURRENT Y POSITION
  3592. XSAVE BSS 2 X POSITION SCRATCH REGISTER
  3593. YSAVE BSS 2 Y POSITION SCRATCH REGISTER
  3594. MEMSEL BSS 2 CHARACTER MEMORY SELECTED ADDRESS
  3595. M.ORG BSS 2 BASE ADDRESS OF DATA
  3596. ORG #22E6
  3597. * * * * * * * * * * * * * * * * * * * * * * * *
  3598. M.SBTYPE DB 03
  3599. M.CONFIG DB 0
  3600. M.M0 DW M0CODE00
  3601. M.VERS DB 01
  3602. M.TYPE BSS 1 TERMINAL TYPE
  3603. M.CLOCK BSS 2 CLOCK
  3604. M.EXTPA BSS 2 EXTERNAL INTERRUPT PROCESSOR ADDRESS
  3605. M.MARGIN BSS 2 MARGIN USED FOR CARRIAGE RETURNS
  3606. M.DIFF BSS 2 INPUT FIFO DIFFERANCE COUNT.
  3607. M.CCR BSS 2
  3608. M.MODE BSS 2 WRITE/ERASE/MODE
  3609. M.DIR BSS 2 DIRECTION OF STEPY/X, 0=FWD, 1=REV
  3610. M.KSW BSS 2
  3611. M.ENAB BSS 2
  3612. M.SELECT BSS 2
  3613. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  3614. * COMPUTER LOADED MODE ADDRESSES
  3615. MODE5A BSS 2 MODE 5 ADDRESS
  3616. MODE6A BSS 2 MODE 6 ADDRESS
  3617. MODE7A BSS 2 MODE 6 ADDRESS
  3618. * COMPUTER LOADED CHARACTER SET STORAGE
  3619. MEMORY.2 BSS 2 CHARACTER SET M2 STORE ADDRESS
  3620. MEMORY.3 BSS 2 CHARACTER SET M3 STORE ADDRESS
  3621. MEMORY.4 BSS 2 CHARACTER SET M4 STORE ADDRESS
  3622. MEMORY.5 BSS 2 CHARACTER SET M5 STORE ADDRESS
  3623. MEMORY.6 BSS 2 CHARACTER SET M6 STORE ADDRESS
  3624. MEMORY.7 BSS 2 CHARACTER SET M7 STORE ADDRESS
  3625. BSS 2
  3626. M.HALT DW 0000
  3627. M.STATUS DW 0000
  3628.  
  3629. MODE BSSZ 1
  3630. SC.OC BSSZ 1
  3631. *
  3632. *FOLLOWING FLAGS USED FOR LOAD AND MUST BE IN THIS ORDER
  3633. *
  3634. FLAGREG BSSZ 1
  3635. CNTR BSSZ 1
  3636. CHAR BSSZ 1 INPUT DATA SAVE
  3637. CRC1 BSSZ 1 16 BIT CYCLIC
  3638. CRC2 BSSZ 1 REDUNDENCY CHECK.
  3639. SEQ1 BSSZ 1 16 BIT LOAD BLOCK
  3640. SEQ2 BSSZ 1 SEQUEANCE NUMBER.
  3641. LDN BSSZ 1 LOAD FILE IDENTIFIER.
  3642. A1 BSSZ 1 24 BIT STARTING
  3643. A2 BSSZ 1 ADDRESS OF THE
  3644. A3 BSSZ 1 LOAD DATA.
  3645. SAVE BSSZ 1 SAVE DLE COUNT
  3646. *
  3647. * OUTPUT MESSAGE STORE FOR LOAD PROTOCOL
  3648. *
  3649. DISP4 EQU *
  3650. BSS 6 BLOCK NUMDER
  3651. OUT1 EQU *
  3652. BSS 4 MSG L,N,N,CR
  3653. OUT3 EQU *
  3654. BSS 2 MSG DLE,EOT
  3655. OUT4 EQU *
  3656. BSS 5 MSG NAK,XXYY
  3657. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  3658. END START
plato.source/plaopl/asc1rom.txt ยท Last modified: 2021/02/06 16:21 by 127.0.0.1