User Tools

Site Tools


cdc:nos2.source:opl871:chd

Table of Contents

CHD

Table Of Contents

  • [00008] CHD - CHESS DISPLAY DRIVER.
  • [00110] LCMA - LOAD AN 18 BIT CENTRAL MEMORY ADDRESS INTO
  • [00128] SCMA - STORE AN 18 BIT CM ADDRESS.
  • [00145] TCMA - TRANSFER THE CM ADDRESS IN (A1 - A1+1) TO
  • [00204] MAIN ROUTINE.
  • [00225] PAUSE - PAUSE FOR RELOCATION.
  • [00292] FNC - PROCESS FUNCTION CODES.
  • [00450] TFNC - TABLE OF FUNCTION CODES.
  • [00482] ERR - ERROR IN KEYIN - SET ERROR FLAG.
  • [00503] SFF - SET FLASH FLAG TO FLASH PIECE.
  • [00513] SET - SET CLOCKS.
  • [00538] STP - STOP CLOCKS.
  • [00549] SCA - START CLOCK A.
  • [00562] SCB - START CLOCK B.
  • [00575] EPR - ENTER PRIORITY.
  • [00595] ABT - ABORT JOB.
  • [00602] DRP - DROP PP.
  • [00609] SB0 - SET THE COMPLETE BIT IN THE STATUS WORD (BIT 0).
  • [00632] RKE - READ KEYBOARD ENTRY.
  • [00744] DKE - DISPLAY KEYBOARD ENTRY.
  • [00770] DBD - DISPLAY CHESS BOARD.
  • [00872] DHL - DISPLAY A HORIZONTAL LINE.
  • [00889] DPC - DISPLAY PIECES.
  • [00936] DOE - DISPLAY OUTPUT AND ERROR MESSAGES.
  • [00965] DLM - DISPLAY LIMITS AND CURRENT TREE POSITION.
  • [01024] DGC - DISPLAY GAME CLOCKS.
  • [01036] DOS - DISPLAY OPTIONS AND GAME SCORE.
  • [01126] DSS - DISPLAY SYSTEM STATUS.
  • [01138] DPM - DISPLAY PERIPHERAL MEMORY.
  • [01153] MDC - MODIFY CHANNEL INSTRUCTIONS.
  • [01192] TCHS - TABLE OF CHANNEL INSTRUCTIONS.
  • [01209] PFP - PROCESS FLASHING PIECE.
  • [01245] SKE - STORE KEYBOARD BUFFER.
  • [01294] UGC - UPDATE GAME CLOCKS.
  • [01350] TUP - TIME IS UP FOR A PLAYER.
  • [01384] ABS - CONVERT RELATIVE ADDRESS TO ABSOLUTE.
  • [01408] CDD - CONVERT OCTAL TO DISPLAY CODED DECIMAL.
  • [01474] PRS - PRESET. (WILL BE OVERLAID)

Source Code

CHD.txt
  1. IDENT CHD,CHD
  2. PERIPH
  3. BASE MIXED
  4. SST RDS
  5. SYSCOM
  6. *COMMENT CHD - CHESS DISPLAY DRIVER.
  7. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  8. TITLE CHD - CHESS DISPLAY DRIVER.
  9. SPACE 4
  10. *** AUTHOR:
  11. * K. E. GORLEN
  12. * VOGELBACK COMPUTING CENTER
  13. * NORTHWESTERN UNIVERSITY
  14. * 6400/6500/6600 SCOPE 3 03/20/69
  15.  
  16.  
  17. *** CONVERSION TO KRONOS -
  18. * G. R. MANSFIELD.
  19. * E. W. HOBBS. 70/03/06.
  20. SPACE 4
  21. ** COMMON DECKS.
  22.  
  23.  
  24. *CALL COMDMAC
  25. *CALL COMPMAC
  26. *CALL COMSCPS
  27. SPACE 4
  28. **** DIRECT STORAGE LOCATION ASSIGNMENTS.
  29.  
  30.  
  31. NC EQU 15 NUMBER OF CP-S (FOR *COMDSYS*)
  32. XC EQU 16 X-COORDINATE
  33. YC EQU 17 Y-COORDINATE
  34. CN EQU 20 - 24 CM WORD BUFFER
  35. CC EQU 25 CHARACTER COUNT
  36. KM EQU 26 MESSAGE ADDRESS
  37. CR EQU 27 CARRIAGE RETURN FLAG
  38. SW EQU 30 - 34 STATUS WORD
  39. WF EQU 35 WAITING FOR CPU FLAG
  40. LF EQU 36 LIMIT FLAG
  41. A.SW EQU 37 - 40 STATUS WORD ABSOLUTE ADDRESS
  42. A.TR EQU 41 - 42 ADDRESS OF TREE POSITION
  43. A.OP EQU 43 - 44 ADDRESS OF OPTION DISPLAY
  44. A.GS EQU 45 - 46 ADDRESS OF GAME SCORE DISPLAY
  45. * EQU 47
  46. WC EQU 57 KEYBOARD ENTRY WORD COUNT
  47. FT EQU 60 - 61 FIRST
  48. SC EQU 62 REAL TIME SECOND CLOCK
  49. GC EQU 63 GAME CLOCK STATUS
  50. OT EQU 64 - 65 OUT
  51. LM EQU 66 - 67 LIMIT
  52. SPACE 4
  53. ** ASSEMBLY CONSTANTS.
  54.  
  55.  
  56. NAME MICRO 1,, CHESS
  57. CH EQU CHDS DISPLAY CHANNEL
  58. CPF EQU 3 LOOP CYCLES/FLASH
  59. FPM EQU 6 FLASHES/MOVE
  60. DSCT EQU 20D DISPLAY CYCLE (MS)
  61. LOPT EQU 6 LENGTH OF OPTION LIST
  62. LSCR EQU 18D*4 LENGTH OF GAME SCORE (CM WORDS)
  63. LLIM EQU 8D LENGTH OF LIMIT LIST
  64. XLIM EQU 6000 LIMIT AND TREE COORDINATES
  65. YLIM EQU 7650
  66. XBRD EQU 6020 BOARD COORDINATES
  67. YBRD EQU 7120
  68. XOPT EQU 6000 OPTIONS COORDINATES
  69. YOPT EQU 7610
  70. XSCR EQU 6060 GAME SCORE COORDINATES
  71. YSCR EQU 7350
  72. XCLK EQU 6000 GAME CLOCK COORDINATES
  73. YCLK EQU 7440
  74. XNAM EQU 6070 PLAYER NAMES COORDINATES
  75. YNAM EQU 7520
  76. SPACE 4
  77. ** DISPLAY ENVIRONMENT TABLE POINTERS.
  78.  
  79.  
  80. P.PD EQU 1 PIECE DISPLAY BUFFER
  81. P.IM EQU 2 MESSAGE INPUT BUFFER
  82. P.EM EQU 3 ERROR MESSAGE BUFFER
  83. P.OM EQU 4 OUTPUT MESSAGE BUFFER
  84. P.LM EQU 5 LIMIT SETTING
  85. P.TR EQU 6 CURRENT POSITION IN TREE
  86. P.BD EQU 7 PACKED BOARD
  87. P.OP EQU 10 OPTION DISPLAY
  88. P.GS EQU 11 GAME SCORE DISPLAY
  89. P.NM EQU 12 PLAYER NAMES
  90. P.RO EQU 13 TEMPORARY ROLLOUT STORAGE
  91. SPACE 4
  92. ** FUNCTION MNEMONICS.
  93.  
  94.  
  95. F.DUM EQU 2 DUMMY FUNCTION
  96. F.AKL EQU 4 ACCEPT KEYBOARD LINE
  97. F.ERR EQU 6 DISPLAY ERROR MESSAGE
  98. F.FLA EQU 10 FLASH PIECE
  99. F.SET EQU 12 SET CLOCKS
  100. F.STP EQU 14 STOP CLOCKS
  101. F.SCA EQU 16 START CLOCK A
  102. F.SCB EQU 20 START CLOCK B
  103. F.EPR EQU 22 ENTER PRIORITY
  104. F.EFL EQU 24 ENTER FIELD LENGTH
  105. F.DRP EQU 26 DROP PP
  106. F.ABT EQU 30 KILL JOB
  107.  
  108. ****
  109. LCMA TITLE MACROS
  110. ** LCMA - LOAD AN 18 BIT CENTRAL MEMORY ADDRESS INTO
  111. * THE A REGISTER.
  112. * THE HIGH ORDER BITS ARE IN BITS 0-5 OF (ADDR).
  113. * THE LOW ORDER BITS ARE IN (ADDR+1).
  114. * ADDR MAY BE EITHER A DIRECT OR MEMORY LOCATION.
  115.  
  116.  
  117. LCMA MACRO ADDR LOAD CM ADDRESS
  118. LOCAL N
  119. N SET 1
  120. IFGT ADDR,77,1
  121. N SET 2
  122. K MICRO N,1,*DM*
  123. LD_"K" ADDR
  124. SHN 14
  125. AD_"K" ADDR+1
  126. ENDM
  127. SPACE 4
  128. ** SCMA - STORE AN 18 BIT CM ADDRESS.
  129. * HIGH ORDER BITS IN (ADDR).
  130. * LOW ORDER BITS IN (ADDR+1).
  131. * ADDR MAY BE DIRECT OR MEMORY.
  132.  
  133.  
  134. SCMA MACRO ADDR
  135. LOCAL N
  136. N SET 1
  137. IFGT ADDR,77,1
  138. N SET 2
  139. K MICRO N,1,*DM*
  140. ST_"K" ADDR+1
  141. SHN -14
  142. ST_"K" ADDR
  143. ENDM
  144. SPACE 4
  145. ** TCMA - TRANSFER THE CM ADDRESS IN (A1 - A1+1) TO
  146. * (A2 - A2+1).
  147.  
  148.  
  149. TCMA MACRO A1,A2
  150. LOCAL N1,N2
  151. N1 SET 1
  152. N2 SET 1
  153. IFGT A1,77,1
  154. N1 SET 2
  155. IFGT A2,77,1
  156. N2 SET 2
  157. K1 MICRO N1,1,*DM*
  158. K2 MICRO N2,1,*DM*
  159. LD_"K1" A1
  160. ST_"K2" A2
  161. LD_"K1" A1+1
  162. ST_"K2" A2+1
  163. ENDM
  164. INDEX SPACE 4
  165. *** INDEX - GENERATE INDEXED TABLE.
  166. *
  167. *
  168. *NAME INDEX TYPE,ADDRESS
  169. * THIS MACRO IS INTENDED TO GENERATE TABLES WHICH ARE INDEXED
  170. * BY SYMBOLIC CONSTANTS.
  171. * IT HAS 3 CALLING SEQUENCES.
  172. * IF *NAME* IS PRESENT, THE FWA OF THE TABLE IS SET TO *NAME*
  173. * AND *TYPE* IS APPENDED AS A BIAS TO *TYPE* FOR ALL
  174. * SUBSEQUENT CALLS.
  175. *
  176. * IF *ADDRESS* IS MISSING, THE TABLE IS TERMINATED WITH AN
  177. * *ORG* TO THE END OF THE TABLE. THIS RESULTS IN ZERO ENTRIES
  178. * FOR UNDEFINED ENTRIES IN THE TABLE.
  179. *
  180. * OTHERWISE, A TABLE ENTRY IS MADE AT *INDEX* + *TYPE* OF
  181. * *ADDRESS*, WITH *TYPE* MODIFIED BY *TYPE* GIVEN IN THE
  182. * INITIALIZING CALL.
  183. *
  184. * USES SYMBOL NAME *INDEX*.
  185. * CALLS NONE.
  186.  
  187.  
  188. PURGMAC INDEX
  189. MACRO INDEX,A,B,C
  190. IFC NE,*A**
  191. A BSS 0
  192. .3 MICRO 1,, B
  193. .2 SET A
  194. ELSE 5
  195. ORG .2+B".3"
  196. IFC NE,*C**,2
  197. LOC B
  198. CON C
  199. BSS 0
  200. ENDM
  201. INDEX SPACE 4
  202. .3 MICRO 1,,
  203. CHD TITLE MAIN DISPLAY LOOP
  204. ** CHD - MAIN ROUTINE.
  205.  
  206. ORG PPFW
  207.  
  208. CHD RJM PRS PRESET
  209. CHD1 RJM PAUSE FOR RELOCATION
  210. RJM PFC PROCESS FUNCTION CODES
  211. RJM RKE READ KEYBOARD ENTRY
  212. RJM DKE DISPLAY KEYBOARD ENTRY
  213. RJM SKE STORE KEYBOARD ENTRY
  214. RJM DBD DISPLAY CHESS BOARD
  215. RJM DPC DISPLAY CHESS PIECES
  216. RJM DOE DISPLAY OUTPUT AND ERROR MESSAGES
  217. RJM DLM DISPLAY LIMITS AND TREE POSITION
  218. RJM DGC DISPLAY GAME CLOCKS
  219. RJM DOS DISPLAY OPTIONS AND GAME SCORE
  220. RJM PFP PROCESS FLASHING PIECE
  221. RJM UGC UPDATE GAME CLOCKS
  222. RJM DSS DISPLAY SYSTEM STATUS
  223. UJN CHD1 LOOP
  224. PAUSE TITLE PAUSE - PAUSE FOR RELOCATION
  225. ** PAUSE - PAUSE FOR RELOCATION.
  226. * UPDATE STATUS ADDRESS.
  227. * CHECK CONTROL POINT ERROR FLAG.
  228. * CHECK ROLLOUT FLAG - DROP WITH RECALL IF SET.
  229. * PROCESS DROP PP FUNCTION.
  230. * PROCESS KILL JOB FUNCTION.
  231. * PROCESS FIELD LENGTH REQUEST.
  232.  
  233.  
  234. PAUSE SUBR ENTRY/EXIT
  235. RJM PSS PAUSE FOR SYSTEM
  236. LCMA IR+3 UPDATE STATUS ADDRESS
  237. RJM ABS
  238. CRD SW READ STATUS WORD
  239. SCMA A.SW STORE ABSOLUTE ADDRESS OF STATUS
  240. LDD SW+4
  241. LMN F.DRP
  242. NJN PAUSE1 IF NOT DROP FUNCTION
  243. RJM SB0
  244. LJM DRP DROP PP
  245.  
  246. PAUSE1 LMN F.ABT&F.DRP
  247. NJN PAUSE2 IF NOT KILL FUNCTION
  248. LJM ABT ABORT JOB
  249.  
  250. PAUSE2 LDD CP
  251. ADN STSW
  252. CRD CM
  253. LDD CM+2
  254. LPN 1
  255. NJN PAUSE4 IF ROLLOUT SET
  256. LDD SW+4
  257. LMN F.EFL
  258. ZJN PAUSE3 IF FL REQUEST
  259. LJM PAUSEX RETURN
  260.  
  261. PAUSE3 LDD FL
  262. SHN 6
  263. SCMA SW+2 RETURN CURRENT FL
  264. RJM SB0
  265. LJM PAUSEX RETURN
  266.  
  267. PAUSE4 LDM CLKAO SAVE STATUS IN CENTRAL MEMORY
  268. STD CM
  269. LDM CLKBO
  270. STD CM+1
  271. LDD GC
  272. STD CM+2
  273. LDM UGCB
  274. STD CM+3
  275. LDM UGCE
  276. STD CM+4
  277. LCMA IR+3
  278. ADN P.RO
  279. RJM ABS
  280. CWD CM
  281.  
  282. * DROP WITH RECALL.
  283.  
  284. RJM DDS
  285. LDN ZERL CLEAR REQUEST BUFFER
  286. CRD CM
  287. LDD MA WRITE IR TO MESSAGE BUFFER
  288. CWD IR
  289. MONITOR RECM RECALL PP
  290. LJM PPR RETURN TO PP RESIDENT
  291. FNC TITLE FNC - FUNCTION CODE PROCESSOR
  292. ** FNC - PROCESS FUNCTION CODES.
  293. * READ OUTPUT MESSAGE.
  294. * READ CURRENT LIMIT SETTING.
  295. * UPDATE PIECE DISPLAY BUFFER POINTERS.
  296. * READ RANK LABELS AND FILE LABELS.
  297. * UPDATE POINTERS TO BOARD,OPTION,GAME SCORE,TREE.
  298.  
  299.  
  300. QUAL FNC
  301.  
  302. FNC SUBR ENTRY/EXIT
  303. LDD SW+4 CHECK FUNCTION CODE
  304. LPN 1
  305. NJN FNCX RETURN IF COMPLETED
  306. LDM PFPA
  307. NJN FNCX RETURN IF *FLASH* SET
  308. LDD SW+4
  309. SHN -1
  310. ZJN FNCX
  311. STD YC
  312. SBN TFNCL+4
  313. MJN FNC1 IF LEGAL FUNCTION CODE
  314. LDC FNCA+CPON MESSAGE = *ILLEGAL FUNCTION CODE.*
  315. RJM DFM
  316. LJM ABT ABORT JOB
  317.  
  318. FNC1 ADN 3
  319. PJN FNCX IF ENFL, DROP, KILL
  320.  
  321. * SET BUFFER POINTERS.
  322.  
  323. LDD A.SW
  324. SHN 14
  325. ADD A.SW+1
  326. ADN P.PD
  327. CRD CN
  328. TCMA CN+1,FT
  329. TCMA CN+3,LM
  330. LDD A.SW
  331. SHN 14
  332. ADD A.SW+1
  333. ADN P.OM
  334. CRD CN
  335. ADN P.TR-P.OM
  336. CRD CM
  337. ADN P.OP-P.TR
  338. CRD T6
  339. ADN P.GS-P.OP
  340. CRD T4
  341. ADN P.NM-P.GS
  342. CRD T2
  343. LCMA T5 READ PLAYER NAMES
  344. RJM ABS
  345. CRM DOSE,ON
  346. CRM DOSF,ON
  347. LCMA CN+3 READ OUTPUT MESSAGE
  348. RJM ABS
  349. CRM DOEB,TR
  350. TCMA CM+3,A.TR
  351. TCMA CM+1,A.OP
  352. TCMA T7,A.GS
  353.  
  354. * READ LIMIT SETTING.
  355.  
  356. LDN LLIM SET LENGTH OF LIMIT BUFFER
  357. STD T1
  358. LDD A.SW
  359. SHN 14
  360. ADD A.SW+1
  361. ADN P.LM
  362. CRD CM
  363. LCMA CM+3 READ LIMITS
  364. RJM ABS
  365. CRM BUF,T1
  366. LDN 0 SET INDEX
  367. STD T5
  368. STD LF CLEAR FLAG
  369. LDC BUF-1 SET BUFFER POINTER
  370. STD T6
  371. FNC2 LDN 5
  372. RAD T6 INCREMENT POINTER
  373. LDI T6 CHECK LIMIT
  374. NJN FNC3 IF NOT ZERO BYTE
  375. STM DLMC,T5 SET ZERO BYTE
  376. LDD T5
  377. SBN 2*6
  378. MJN FNC5 IF @ 6 LEVELS
  379. UJN FNC4
  380.  
  381. FNC3 RJM CDD CONVERT TO DECIMAL DISPLAY CODE
  382. STM DLMC,T5 STORE
  383. LDN 2 INCREMENT INDEX
  384. RAD T5
  385. SBN 2*LLIM
  386. NJN FNC2 LOOP
  387.  
  388. FNC4 LCN 0 SET FLAG
  389. STD LF
  390.  
  391. * READ RANK LABELS.
  392.  
  393. FNC5 LDN 8D SET NUMBER OF LABELS
  394. STD T1
  395. LDD A.SW READ POINTER TO LABELS
  396. SHN 14
  397. ADD A.SW+1
  398. ADN P.BD
  399. CRD CM
  400. LCMA CM+3 READ LABELS
  401. RJM ABS
  402. CRM BUF,T1
  403. LDC BUF+5*7 SET POINTER TO BUFFER
  404. STD T2
  405. FNC6 LDI T2 LOAD NEXT LABEL
  406. STM DBDE-1,T1 STORE
  407. LCN 5 DECREMENT POINTER
  408. RAD T2
  409. SOD T1 DECREMENT INDEX
  410. NJN FNC6 LOOP
  411.  
  412. * READ FILE LABELS.
  413.  
  414. LDD A.SW READ POINTER TO BOARD
  415. SHN 14
  416. ADD A.SW+1
  417. ADN P.BD
  418. CRD CM
  419. LCMA CM+3 READ LABELS
  420. ADN 8D
  421. RJM ABS
  422. CRM BUF,ON
  423. LDC BUF+4 SET POINTER TO LABELS
  424. STD CM
  425. LDC DBDD+12D SET POINTER TO LABEL BUFFER
  426. STD CM+1
  427. FNC7 LDI CM UNPACK LABELS
  428. LPN 77
  429. STI CM+1
  430. SOD CM+1
  431. LDI CM
  432. SCN 77
  433. STI CM+1
  434. LCN 2
  435. RAD CM+1
  436. SOD CM
  437. LMC BUF
  438. NJN FNC7 LOOP
  439.  
  440. * PROCESS FUNCTION CODE.
  441.  
  442. LDM TFNC-1,YC SET ADDRESS OF FUNCTION ROUTINE
  443. STM FNC8
  444. RJM ** EXECUTE
  445. FNC8 EQU *-1
  446. LJM FNCX RETURN
  447.  
  448. FNCA DATA C*CHD - ILLEGAL FUNCTION CODE.*
  449. TFNC SPACE 4
  450. ** TFNC - TABLE OF FUNCTION CODES.
  451.  
  452.  
  453. TFNC INDEX /2-1
  454. INDEX F.DUM,SB0
  455. INDEX F.AKL,AKL
  456. INDEX F.ERR,ERR
  457. INDEX F.FLA,SFF
  458. INDEX F.SET,SET
  459. INDEX F.STP,STP
  460. INDEX F.SCA,SCA
  461. INDEX F.SCB,SCB
  462. INDEX F.EPR,EPR
  463. INDEX F.EFL
  464. TFNCL EQU *-TFNC
  465.  
  466. QUAL
  467. PFC EQU /FNC/FNC
  468. AKL TITLE FUNCTION CODE PROCESSING SUBROUTINES
  469. ** AKL- ACCEPT KEYIN.
  470. *
  471. * CALLS SB0.
  472.  
  473.  
  474. AKL SUBR ENTRY/EXIT
  475. LDD KM
  476. NJN AKL1 IF MESSAGE SET
  477. STD CC RESET CHARACTER COUNT
  478. STD WC RESET WORD COUNT
  479. AKL1 RJM SB0 SET COMPLETE
  480. UJN AKLX RETURN
  481. ERR SPACE 4
  482. ** ERR - ERROR IN KEYIN - SET ERROR FLAG.
  483. *
  484. * CALLS ABS, SB0.
  485.  
  486.  
  487. ERR SUBR ENTRY/EXIT
  488. LDD A.SW
  489. SHN 14
  490. ADD A.SW+1
  491. ADN P.EM
  492. CRD CM
  493. LCMA CM+3
  494. RJM ABS
  495. CRM ERRA,TR
  496. LDC ERRA DISPLAY ERROR MESSAGE
  497. STD KM
  498. RJM SB0
  499. UJN ERRX RETURN
  500.  
  501. ERRA BSSZ 3*5+1
  502. SFF SPACE 4
  503. ** SFF - SET FLASH FLAG TO FLASH PIECE.
  504.  
  505.  
  506. SFF SUBR ENTRY/EXIT
  507. LDN 0 STOP CLOCKS
  508. STD GC
  509. LDN 1 SET FLAG
  510. STM PFPA
  511. UJN SFFX
  512. SET SPACE 4
  513. ** SET - SET CLOCKS.
  514. *
  515. * CALLS CTD, SB0.
  516.  
  517.  
  518. SET SUBR ENTRY/EXIT
  519. LDD SW
  520. STM CLKAO SET OCTAL SECONDS
  521. RJM CTD
  522. STM UGCC SET MINUTES
  523. LDD CM
  524. STM UGCD SET DISPLAY SECONDS
  525. LDD SW+1 REPEAT FOR CLOCK B
  526. STM CLKBO
  527. RJM CTD
  528. STM UGCF
  529. LDD CM
  530. STM UGCG
  531. LDN 0 CLEAR TIME UP FLAGS
  532. STM UGCB
  533. STM UGCE
  534. STD GC STOP CLOCKS
  535. RJM SB0
  536. UJN SETX RETURN
  537. STP SPACE 4
  538. ** STP - STOP CLOCKS.
  539. *
  540. * CALLS SB0.
  541.  
  542.  
  543. STP SUBR ENTRY/EXIT
  544. LDN 0
  545. STD GC
  546. RJM SB0
  547. UJN STPX
  548. SCA SPACE 4
  549. ** SCA - START CLOCK A.
  550. *
  551. * CALLS SB0.
  552.  
  553.  
  554. SCA SUBR ENTRY/EXIT
  555. LDM CLKAO
  556. ZJN SCA1 IF TIME IS UP
  557. LDN 1
  558. STD GC
  559. SCA1 RJM SB0
  560. UJN SCAX
  561. SCB SPACE 4
  562. ** SCB - START CLOCK B.
  563. *
  564. * CALLS SB0.
  565.  
  566.  
  567. SCB SUBR ENTRY/EXIT
  568. LDM CLKBO
  569. ZJN SCB1 IF TIME IS UP
  570. LDN 2
  571. STD GC
  572. SCB1 RJM SB0
  573. UJN SCBX
  574. EPR SPACE 4
  575. ** EPR - ENTER PRIORITY.
  576.  
  577.  
  578. EPR1 LDN ZERL
  579. CRD CM
  580. LDN 17
  581. STD CM+4
  582. MONITOR SJCM
  583. EPR2 RJM SB0
  584.  
  585. EPR SUBR ENTRY/EXIT
  586. LDD SW+3
  587. NJN EPR1
  588. LDD CP
  589. ADN JCIW
  590. CRD CM
  591. LDD CM
  592. STD SW+3
  593. UJN EPR2
  594. ABT SPACE 4
  595. ** ABT - ABORT JOB.
  596.  
  597.  
  598. ABT RJM DDS
  599. MONITOR ABTM
  600. LJM PPR
  601. DRP SPACE 4
  602. ** DRP - DROP PP.
  603.  
  604.  
  605. DRP RJM DDS
  606. DPP MONITOR DPPM
  607. LJM PPR
  608. SB0 SPACE 4
  609. ** SB0 - SET THE COMPLETE BIT IN THE STATUS WORD (BIT 0).
  610.  
  611.  
  612. SB0 SUBR ENTRY/EXIT
  613. LDD SW+4
  614. SCN 1
  615. ADN 1
  616. STD SW+4
  617. LDC 600D STORE CURRENT GAME CLOCK READINGS
  618. CLKAO EQU *-1
  619. STD SW
  620. LDC 600D
  621. CLKBO EQU *-1
  622. STD SW+1
  623. LDD A.SW WRITE CM STATUS WORD
  624. SHN 14
  625. ADD A.SW+1
  626. CWD SW
  627. MONITOR RCLM RECALL CENTRAL PROCESSOR
  628. UJN SB0X RETURN
  629. RKE TITLE RKE - READ KEYBOARD ENTRY
  630. *CALL COMPCHI
  631. RKE SPACE 4
  632. ** RKE - READ KEYBOARD ENTRY.
  633. *
  634. * CALLS DDS, RDS, HDC.
  635.  
  636.  
  637. RKE SUBR ENTRY/EXIT
  638. RKEA FNC 7020,CH SELECT KEYBOARD INPUT
  639. ACN CH
  640. IAN CH
  641. DCN CH
  642. ZJN RKE0.1 IF NO INPUT
  643. LMC 0
  644. RKEC EQU *-1
  645. ZJN RKEX IF SAME INPUT
  646. LMM RKEC STORE NEW INPUT
  647. RKE0.1 STM RKEC
  648. ZJN RKEX RETURN IF NO CHARACTER
  649. STD CM SAVE CHARACTER
  650. LMN 60
  651. NJN RKE2 IF NOT CARRIAGE RETURN (60B)
  652. LDD WC
  653. NJN RKE1 IF NOT EMPTY CARRIAGE RETURN
  654. LDC RKEB DISPLAY *REPEAT ENTRY.*
  655. STD KM
  656. UJN RKEX
  657.  
  658. RKE1 LDN 1 SET CARRIAGE RETURN FLAG
  659. STD CR
  660. UJN RKEX RETURN
  661.  
  662. RKE2 LMN 1R &60
  663. NJN RKE3 IF NOT RIGHT BLANK (55B)
  664. RJM DDS DROP DISPLAY
  665. RJM RDS REQUEST DISPLAY
  666. RJM MDC MODIFY CHANNEL INSTRUCTIONS
  667. UJN RKE4 RETURN
  668.  
  669. RKE3 LMN 1R*&1R
  670. NJN RKE5 IF NOT (*)
  671. LDD CC
  672. NJN RKE5 IF NOT FIRST ENTRY
  673. RJM HDC HOLD DISPLAY CHANNEL
  674. RKE4 LJM RKEX RETURN
  675.  
  676. RKE5 LDD CM
  677. LMN 61
  678. NJN RKE7 IF NOT BACKSPACE (61B)
  679. STD CR CLEAR CR FLAG
  680. STD WF CLEAR WAITING FOR CP FLAG
  681. STD KM CLEAR MESSAGE
  682. LDD CC
  683. ZJN RKE4 RETURN IF CHARACTER COUNT = 0
  684. SHN -1 FORM WORD COUNT
  685. STD WC
  686. SOD CC DECREMENT CHARACTER COUNT
  687. LPN 1 TEST SHIFT BIT
  688. ZJN RKE6
  689. LDM KBUF-1,WC CLEAR LAST CHARACTER
  690. SCN 77
  691. STM KBUF-1,WC
  692. RKE6 LJM RKE13
  693.  
  694. RKE7 LMN 53&61
  695. NJN RKE8 IF NOT LEFT BLANK (53B)
  696. STD CR CLEAR CR FLAG
  697. STD WF CLEAR WAITING FOR CP FLAG
  698. STD KM CLEAR MESSAGE
  699. STD CC ZERO CHARACTER AND WORD COUNT
  700. STD WC
  701. LJM RKEX RETURN
  702.  
  703. RKE8 LMN 62&53
  704. NJN RKE9 IF NOT SPACE (62B)
  705. LDN 1R CORRECT SPACE CODE
  706. STD CM
  707. UJN RKE10
  708.  
  709. RKE9 LDD CM
  710. SBN 60
  711. MJN RKE10 IF LEGAL CHARACTER
  712. LJM RKEX RETURN
  713.  
  714. RKE10 LDD CC
  715. SBN 40D
  716. PJN RKE11 IF \ 40 CHARACTERS
  717. AOD CC INCREMENT CHARACTER COUNT
  718. RKE11 LDD CC SET WORD COUNT
  719. ADN 1
  720. SHN -1
  721. STD WC
  722. LDD CC
  723. LPN 1
  724. ZJN RKE12 IF LOWER CHARACTER
  725. LDD CM STORE UPPER CHARACTER
  726. SHN 6
  727. STM KBUF-1,WC
  728. UJN RKE13
  729.  
  730. RKE12 LDM KBUF-1,WC STORE LOWER CHARACTER
  731. SCN 77
  732. ADD CM
  733. STM KBUF-1,WC
  734. RKE13 LDC 7001 PRESET 32 CHARACTERS/LINE
  735. STM DKEA
  736. LDD CC
  737. SBN 31D
  738. MJN RKE14 IF < 30 CHARACTERS
  739. SOM DKEA SET 64 CHARACTERS/LINE
  740. RKE14 LJM RKEX RETURN
  741.  
  742. RKEB DATA C*REPEAT ENTRY.*
  743. DKE TITLE DKE - DISPLAY KEYBOARD ENTRY
  744. ** DKE - DISPLAY KEYBOARD ENTRY.
  745. *
  746. * USES T7.
  747.  
  748.  
  749. DKE SUBR ENTRY/EXIT
  750. LDD WC
  751. ZJN DKEX RETURN IF NO ENTRY
  752. LDC 7001 SELECT LEFT SCREEN
  753. DKEA EQU *-1 SIZE FUNCTION CODE
  754. FAN CH
  755. ACN CH
  756. LDD WC DISPLAY ENTRY
  757. ADN 2
  758. STD T7
  759. OAM DKEB,CH
  760. DUP 3
  761. LDD T7
  762. OAM DKEB,CH
  763. ENDD
  764. DCN CH
  765. LJM DKEX RETURN
  766.  
  767. DKEB DATA 6002,7002
  768. KBUF BSSZ 21D
  769. DBD TITLE LEFT SCREEN DISPLAYS
  770. ** DBD - DISPLAY CHESS BOARD.
  771. *
  772. * USES T5 - T7.
  773. *
  774. * CALLS DHL.
  775.  
  776.  
  777. DBD SUBR ENTRY/EXIT
  778. FNC 7001,CH SELECT LEFT SCREEN, 32 CHARACTERS/LINE
  779. ACN CH
  780. LDC YBRD SET Y-COORDINATE
  781. STD T7
  782. LDN 4 SET INDEX
  783. STD T5
  784. DBD1 LDD T7 OUTPUT Y-COORDINATE
  785. OAN CH
  786. RJM DHL DISPLAY A HORIZONTAL LINE
  787. LDN 5 INITIALIZE INDEX
  788. STD T6
  789. DBD2 LDN 10 ADVANCE Y-COORDINATE
  790. RAD T7
  791. OAN CH
  792. LDC XBRD-4 OUTPUT X-COORDINATE
  793. OAN CH
  794. LDN DBDBL
  795. OAM DBDB,CH
  796. SOD T6 ADVANCE INDEX
  797. NJN DBD2 LOOP
  798. LDN 10 ADVANCE Y-COORDINATE
  799. RAD T7
  800. OAN CH
  801. LDC XBRD-4
  802. OAN CH
  803. LDN DBDAL
  804. OAM DBDA,CH
  805. LDD T7 OUTPUT Y-COORDINATE
  806. OAN CH
  807. RJM DHL DISPLAY A HORIZONTAL LINE
  808. LDN 5 SET INDEX
  809. STD T6
  810. DBD3 LDN 10 ADVANCE Y-COORDINATE
  811. RAD T7
  812. OAN CH
  813. LDC XBRD-4 OUTPUT X-COORDINATE
  814. OAN CH
  815. LDN DBDCL
  816. OAM DBDC,CH
  817. SOD T6 ADVANCE INDEX
  818. NJN DBD3 LOOP IF NOT DONE
  819. SOD T5
  820. ZJN DBD4 IF 8 RANKS DISPLAYED
  821. LDN 10 ADVANCE Y-COORDINATE
  822. RAD T7
  823. OAN CH
  824. LDC XBRD-4 OUTPUT X-COORDINATE
  825. OAN CH
  826. LDN DBDAL
  827. OAM DBDA,CH
  828. LJM DBD1 LOOP
  829.  
  830. DBD4 LDN 10 ADVANCE Y-COORDINATE
  831. RAD T7
  832. OAN CH
  833. RJM DHL DISPLAY TOP HORIZONTAL LINE
  834.  
  835. * DISPLAY FILE LABELS.
  836.  
  837. LDN DBDDL
  838. OAM DBDD,CH
  839.  
  840. * DISPLAY RANK LABELS.
  841.  
  842. LDC YBRD+550 SET STARTING Y-COORDINATE
  843. STD T7
  844. LDN 0 INITIALIZE INDEX
  845. STD T6
  846. DBD5 LDC XBRD-20 STARTING X-COORDINATE
  847. OAN CH
  848. LDD T7 OUTPUT Y-COORDINATE
  849. OAN CH
  850. LDM DBDE,T6 DISPLAY NEXT LABEL
  851. OAN CH
  852. LCN 60 ADVANCE Y-COORDINATE
  853. RAD T7
  854. AOD T6 ADVANCE INDEX
  855. LMN 8D
  856. NJN DBD5 LOOP FOR 8 LABELS
  857. DCN CH
  858. LJM DBDX
  859.  
  860. DBDA DATA H*I I I I I I I I I*
  861. DBDAL EQU *-DBDA
  862. DBDB DATA H*I I//I I//I I//I I//I*
  863. DBDBL EQU *-DBDB
  864. DBDC DATA H*I//I I//I I//I I//I I*
  865. DBDCL EQU *-DBDC
  866. DBDD CON XBRD+24
  867. CON YBRD-20
  868. BSSZ 11D FILE LABEL BUFFER
  869. DBDDL EQU *-DBDD
  870. DBDE BSSZ 8D
  871. DHL SPACE 4
  872. ** DHL - DISPLAY A HORIZONTAL LINE.
  873.  
  874.  
  875. DHL SUBR ENTRY/EXIT
  876. LDC XBRD DISPLAY LINE
  877. OAN CH
  878. LDN DHLAL
  879. OAM DHLA,CH
  880. LDC XBRD+10 DISPLAY SHIFTED LINE
  881. OAN CH
  882. LDN DHLAL
  883. OAM DHLA,CH
  884. UJN DHLX RETURN
  885.  
  886. DHLA DATA H*------------------------*
  887. DHLAL EQU *-DHLA
  888. DPC SPACE 4
  889. ** DPC - DISPLAY PIECES.
  890. *
  891. * USES T6, T7, OT - OT+1.
  892. *
  893. * CALLS ABS.
  894.  
  895.  
  896. DPC SUBR ENTRY/EXIT
  897. LDD LM COMPUTE BUFFER LENGTH
  898. SBD FT
  899. SHN 14
  900. ADD LM+1
  901. SBD FT+1
  902. MJN DPCX RETURN IF NEGATIVE
  903. ZJN DPCX RETURN IF ZERO
  904. STD T7 SAVE BUFFER LENGTH
  905. LDC BUFL SET BUFFER LENGTH
  906. STD T6
  907. LCMA FT SET STARTING ADDRESS
  908. RJM ABS
  909. SCMA OT
  910. LCMA LM CHECK BUFFER LIMIT
  911. RJM ABS
  912. FNC 7010,CH SELECT LEFT SCREEN, DOT MODE
  913. ACN CH
  914. DPC1 LDC -BUFL
  915. RAD T7
  916. MJN DPC2 IF NOT A FULL PP BUFFER
  917. LCMA OT FILL PP BUFFER
  918. CRM BUF,T6 FILL PP BUFFER
  919. SCMA OT SET NEXT STARTING ADDRESS
  920. LDC BUFL*5 DISPLAY
  921. OAM BUF,CH
  922. UJN DPC1 LOOP
  923.  
  924. DPC2 ADC BUFL COMPUTE WORDS LEFT
  925. ZJN DPC3 RETURN IF ZERO
  926. STD T6
  927. LCMA OT LOAD PP BUFFER
  928. CRM BUF,T6
  929. LDD T6 DISPLAY
  930. SHN 2
  931. ADD T6
  932. OAM BUF,CH
  933. DPC3 DCN CH
  934. LJM DPCX
  935. DOE SPACE 4
  936. ** DOE - DISPLAY OUTPUT AND ERROR MESSAGES.
  937. *
  938. * CALLS DPM.
  939.  
  940.  
  941. DOE1 DCN CH
  942.  
  943. DOE SUBR ENTRY/EXIT
  944. FNC 7001,CH SELECT LEFT SCREEN, 32 CHARACTERS/LINE
  945. ACN CH
  946. DUP 3
  947. LDC DOEA
  948. RJM DPM
  949. ENDD
  950. LDD KM
  951. ZJN DOE1 EXIT IF NO MESSAGE
  952. DUP 3
  953. LDC 6000
  954. OAN CH
  955. LDC 7024
  956. OAN CH
  957. LDD KM
  958. RJM DPM
  959. ENDD
  960. LJM DOE1 RETURN
  961.  
  962. DOEA DATA 6000,7050
  963. DOEB BSSZ 16D
  964. DLM TITLE RIGHT SCREEN DISPLAYS
  965. ** DLM - DISPLAY LIMITS AND CURRENT TREE POSITION.
  966. *
  967. * USES T6, T7.
  968. *
  969. * CALLS DPM, ABS, CDD.
  970.  
  971.  
  972. DLM SUBR ENTRY/EXIT
  973. FNC 7101,CH SELECT RIGHT SCREEN, 32 CHARACTERS/LINE
  974. ACN CH
  975. LDC XLIM OUTPUT INITIAL COORDINATES
  976. OAN CH
  977. LDC YLIM
  978. OAN CH
  979. LDD LF
  980. NJN DLM1 IF LIMIT FLAG SET
  981. LDN DLMAL DISPLAY *LIMITS-*
  982. OAM DLMA,CH
  983. DLM1 LDC DLMC DISPLAY LIMITS
  984. RJM DPM
  985. LDN LLIM SET WORD COUNT
  986. STD T6
  987. LCMA A.TR READ LIMITS
  988. RJM ABS
  989. CRM BUF,T6
  990. LDC BUF-1 SET POINTER
  991. STD T6
  992. LDN LLIM SET COUNTER
  993. STD T7 INITIALIZE INDEX
  994. LDC YLIM-20 OUTPUT STARTING COORDINATES
  995. OAN CH
  996. LDC XLIM
  997. OAN CH
  998. LDD LF
  999. NJN DLM3 IF LIMIT FLAG SET
  1000. LDN DLMBL DISPLAY *NOW AT-*
  1001. OAM DLMB,CH
  1002. UJN DLM3
  1003.  
  1004. DLM2 LDN 0 DISPLAY * *
  1005. OAN CH
  1006. DLM3 LDN 5 ADVANCE POINTER
  1007. RAD T6
  1008. LDI T6 LOAD LIMIT
  1009. ZJN DLM4 EXIT ON ZERO BYTE
  1010. RJM CDD CONVERT TO DISPLAY CODE
  1011. OAN CH DISPLAY
  1012. SOD T7 DECREMENT COUNTER
  1013. NJN DLM2 LOOP
  1014. DLM4 DCN CH
  1015. LJM DLMX RETURN
  1016.  
  1017. DLMA DATA C*LIMITS-*
  1018. DLMAL EQU *-DLMA
  1019. DLMB DATA C*NOW AT-*
  1020. DLMBL EQU *-DLMB
  1021. DLMC DIS 2*LLIM-1,
  1022. DATA 0
  1023. DGC SPACE 4
  1024. ** DGC - DISPLAY GAME CLOCKS.
  1025.  
  1026.  
  1027. DGC SUBR ENTRY/EXIT
  1028. FNC 7102,CH SELECT RIGHT SCREEN, 16 CHARACTERS/LINE
  1029. ACN CH
  1030. DUP 4,2
  1031. LDN UGCAL
  1032. OAM UGCA,CH
  1033. DCN CH
  1034. UJN DGCX
  1035. DOS SPACE 4
  1036. ** DOS - DISPLAY OPTIONS AND GAME SCORE.
  1037. *
  1038. * USES T5 - T7.
  1039. *
  1040. * CALLS ABS.
  1041.  
  1042.  
  1043. DOS SUBR ENTRY/EXIT
  1044. FNC 7101,CH SELECT RIGHT SCREEN, 32 CHARACTERS/LINE
  1045. ACN CH
  1046. LDN DOSCL DISPLAY *OPTIONS *
  1047. OAM DOSC,CH
  1048. LDN DOSDL DISPLAY PLAYER NAMES
  1049. OAM DOSD,CH
  1050. DCN CH
  1051. FNC 7100,CH SELECT RIGHT SCREEN, 64 CHARACTERS/LINE
  1052. ACN CH
  1053. LDN LOPT SET CM WORD COUNT
  1054. STD T6
  1055. LCMA A.OP READ OPTION LIST
  1056. RJM ABS
  1057. CRM BUF,T6
  1058. LDC YOPT OUTPUT Y-COORDINATE
  1059. STD T7
  1060. OAN CH
  1061. LDC BUF
  1062. STM DOSA SET POINTER TO OPTION LIST
  1063. STM DOSB SET POINTER TO SCORE
  1064. DOS1 LDC XOPT+240 OUTPUT X-COORDINATE
  1065. OAN CH
  1066. DOS2 LDN 5 DISPLAY ONE CM WORD
  1067. OAM **,CH
  1068. DOSA EQU *-1
  1069. OAN CH DISPLAY * *
  1070. LDN 5 ADVANCE POINTER
  1071. RAM DOSA
  1072. SOD T6 DECREMENT WORD COUNT
  1073. ZJN DOS3 IF DONE
  1074. LMN 3 IF THREE WORDS COMPLETE
  1075. NJN DOS2 LOOP FOR THREE WORDS
  1076. LCN 12 ADVANCE Y-COORDINATE
  1077. RAD T7
  1078. OAN CH
  1079. UJN DOS1 LOOP FOR NEXT LINE
  1080.  
  1081. * DISPLAY GAME SCORE.
  1082.  
  1083. DOS3 LDC LSCR SET CM WORD COUNT
  1084. STD T6
  1085. SHN -1 SET INDEX
  1086. STD T5
  1087. LCMA A.GS READ GAME SCORE BUFFER
  1088. RJM ABS
  1089. CRM BUF,T6
  1090. LDC YSCR OUTPUT Y-COORDINATE
  1091. STD T7
  1092. OAN CH
  1093. DOS4 LDC XSCR OUTPUT X-COORDINATE
  1094. OAN CH
  1095. DOS5 LDN 2*5 DISPLAY TWO CM WORDS
  1096. OAM **,CH
  1097. DOSB EQU *-1
  1098. LDC XSCR+300 ADVANCE X-COORDINATE
  1099. OAN CH
  1100. LDN 2*5 ADVANCE POINTER
  1101. RAM DOSB
  1102. SOD T5 ADVANCE INDEX
  1103. ZJN DOS6 IF DONE
  1104. LPN 1
  1105. NJN DOS5 LOOP FOR NEXT WORD
  1106. LCN 12 ADVANCE Y-COORDINATE
  1107. RAD T7
  1108. OAN CH
  1109. UJN DOS4 LOOP FOR NEXT LINE
  1110.  
  1111. DOS6 DCN CH
  1112. LJM DOSX
  1113.  
  1114. DOSC CON XOPT X-COORDINATE
  1115. CON YOPT-10 Y-COORDINATE
  1116. DATA C*OPTIONS *
  1117. DOSCL EQU *-DOSC
  1118.  
  1119. DOSD CON YNAM
  1120. CON XNAM
  1121. DOSE BSSZ 5
  1122. CON XNAM+310
  1123. DOSF BSSZ 5
  1124. DOSDL EQU *-DOSD
  1125. SYSDIS SPACE 4
  1126. ** DSS - DISPLAY SYSTEM STATUS.
  1127. *
  1128. * CALLS SYS.
  1129.  
  1130.  
  1131. DSS SUBR ENTRY/EXIT
  1132. LDC 6000 SET X-COORDINATE
  1133. STD XC
  1134. RJM SYS
  1135. DCN CH+40
  1136. UJN DSSX
  1137. DPM TITLE DISPLAY SUBROUTINES
  1138. ** DPM - DISPLAY PERIPHERAL MEMORY.
  1139. *
  1140. * ENTRY (A) = FWA OF DISPLAY DATA.
  1141. *
  1142. * USES T0.
  1143.  
  1144.  
  1145. DPM SUBR ENTRY/EXIT
  1146. STD T0 SET START ADDRESS
  1147. DPM1 LDI T0
  1148. ZJN DPMX IF ZERO BYTE
  1149. OAN CH
  1150. AOD T0 ADVANCE POINTER
  1151. UJN DPM1
  1152. MDC SPACE 4
  1153. ** MDC - MODIFY CHANNEL INSTRUCTIONS.
  1154. *
  1155. * EXIT CHANNEL INSTRUCTIONS MODIFIED.
  1156. *
  1157. * USES T1, T2, T3.
  1158.  
  1159.  
  1160. MDC SUBR ENTRY/EXIT
  1161. LDM /COMDDSP/DDSB CHECK ASSIGNED CHANNEL
  1162. STD T3
  1163. CHTE *
  1164. LMN CH
  1165. ZJN MDCX IF CHANNELS MODIFIED
  1166. LDC TCHS MODIFY CHANNELS
  1167. STD T1
  1168. MDC1 LDI T1
  1169. ZJN MDC2 IF CHANNEL TABLE MODIFICATION COMPLETE
  1170. STD T2
  1171. LDI T2
  1172. SCN 77
  1173. ADD T3
  1174. STI T2
  1175. AOD T1
  1176. UJN MDC1 LOOP
  1177. MDC2 LDC MDCA SET 1ST ADDRESS FOR BLIND MODIFICATION
  1178. STD T1
  1179. MDC3 AOD T1 ADVANCE ADDRESS
  1180. LMC MDCB
  1181. ZJN MDCX RETURN IF COMPLETE
  1182. LDI T1 CHECK WORD
  1183. LPC 7077
  1184. LMC 7000+CH
  1185. NJN MDC3 IF NOT 7XCH
  1186. LDI T1 MODIFY CHANNEL
  1187. SCN 77
  1188. ADD T3
  1189. STI T1
  1190. UJN MDC3
  1191. TCHS SPACE 4
  1192. ** TCHS - TABLE OF CHANNEL INSTRUCTIONS.
  1193.  
  1194.  
  1195. TCHS CHTB
  1196.  
  1197. RSTC RESTORE CHANNEL INSTRUCTIONS
  1198. SPACE 4
  1199. ** COMMON DECKS.
  1200. *
  1201.  
  1202. MDCA BSS 0 FIRST ADDRESS FOR BLIND CHANNEL MOD
  1203.  
  1204. *CALL COMDSYS
  1205. *CALL COMDDSP
  1206.  
  1207. MDCB BSS 0 LIMIT ADDRESS FOR BLIND CHANNEL MOD
  1208. PFP TITLE PROCESS FLASHING PIECE
  1209. ** PFP - PROCESS FLASHING PIECE.
  1210. *
  1211. * CALLS SB0.
  1212.  
  1213.  
  1214. PFPD BSSZ 2 POINTER BUFFER
  1215.  
  1216. PFP SUBR ENTRY/EXIT
  1217. LDC **
  1218. PFPA EQU *-1 FLASH STATUS FLAG
  1219. ZJN PFPX
  1220. SOM PFPB DECREMENT CYCLE COUNT
  1221. NJN PFPX
  1222. LDN CPF
  1223. STM PFPB RESET CYCLE COUNT
  1224. SOM PFPC DECREMENT FLASH COUNT
  1225. MJN PFP2 IF FINISHED
  1226. LPN 1 TOGGLE ON OR OFF
  1227. NJN PFP1
  1228. TCMA PFPD,LM SWITCH ON
  1229. UJN PFPX RETURN
  1230.  
  1231. PFP1 TCMA LM,PFPD SWITCH OFF
  1232. TCMA SW+2,LM
  1233. LJM PFPX RETURN
  1234.  
  1235. PFP2 LDN FPM/2*2 RESET FLASHES/MOVE
  1236. STM PFPC
  1237. LDN 0
  1238. STM PFPA CLEAR FLASH STATUS FLAG
  1239. RJM SB0
  1240. LJM PFPX RETURN
  1241.  
  1242. PFPB CON CPF CYCLES/FLASH
  1243. PFPC CON FPM/2*2 FLASHES /MOVE
  1244. SKE TITLE SKE - STORE KEYBOARD ENTRY IN CM
  1245. ** SKE - STORE KEYBOARD BUFFER.
  1246. *
  1247. * EXIT KEYBOARD BUFFER STORED IN CM WITH ZERO BYTE
  1248. * APPENDED.
  1249. *
  1250. * USES T7, CM - CM+4.
  1251. *
  1252. * CALLS ABS, SB0.
  1253.  
  1254.  
  1255. SKE SUBR ENTRY/EXIT
  1256. LDD CR CHECK CARRIAGE RETURN FLAG
  1257. ZJN SKEX RETURN IF NOT SET
  1258. LDD SW+4
  1259. ZJN SKE1 IF CP READY TO READ
  1260. LDD WF CHECK WAITING FOR CP FLAG
  1261. NJN SKEX IF PREVIOUSLY SET
  1262. LDN 1 SET FLAG
  1263. STD WF
  1264. LDD KM SAVE CURRENT MESSAGE
  1265. STM SKEA
  1266. LDC SKEB DISPLAY *WAITING - CP BUSY.*
  1267. STD KM
  1268. UJN SKEX
  1269.  
  1270. SKE1 STM KBUF,WC SET ZERO BYTE
  1271. STD CR CLEAR CR FLAG
  1272. STD WF CLEAR WAITING FLAG
  1273. LDD KM
  1274. LMC SKEB
  1275. NJN SKE2 IF WAITING MESSAGE STILL UP
  1276. LDC **
  1277. SKEA EQU *-1 PREVIOUS MESSAGE ADDRESS
  1278. STD KM
  1279. SKE2 LDN 4 SET CONSTANT 4
  1280. STD T7
  1281. LDD A.SW READ INPUT MESSAGE BUFFER
  1282. SHN 14
  1283. ADD A.SW+1
  1284. ADN P.IM
  1285. CRD CM
  1286. LCMA CM+3 WRITE BUFFER
  1287. RJM ABS
  1288. CWM KBUF,T7
  1289. RJM SB0
  1290. LJM SKEX RETURN
  1291.  
  1292. SKEB DATA C*WAITING - CP BUSY.*
  1293. UGC TITLE GAME CLOCKS
  1294. ** UGC - UPDATE GAME CLOCKS.
  1295.  
  1296.  
  1297. UGC SUBR ENTRY/EXIT
  1298. LDD GC
  1299. ZJN UGCX RETURN IF CLOCKS STOPPED
  1300. LDC RTCL READ REAL TIME CLOCK
  1301. CRD CM
  1302. LDD CM+1
  1303. SBD SC COMPARE CLOCKS
  1304. ZJN UGCX RETURN IF SAME
  1305. RAD SC RESET SECOND CLOCK
  1306. LDD GC CHECK GAME CLOCKS
  1307. SCN 1
  1308. NJN UGC3 IF CLOCK B
  1309. SOM CLKAO DECREMENT BY 1 SECOND
  1310. NJN UGC2 IF NON-ZERO
  1311. UGC1 RJM TUP
  1312. UJN UGCX RETURN
  1313.  
  1314. UGC2 RJM CTD CONVERT SECONDS TO DISPLAY CODE
  1315. STM UGCC STORE MINUTES
  1316. LDD CM
  1317. STM UGCD STORE SECONDS
  1318. LJM UGCX RETURN
  1319.  
  1320. UGC3 SOM CLKBO DECREMENT BY ONE SECOND
  1321. ZJN UGC1 IF TIME IS UP
  1322. RJM CTD CONVERT SECONDS TO DISPLAY CODE
  1323. STM UGCF STORE MINUTES
  1324. LDD CM
  1325. STM UGCG STORE SECONDS
  1326. LJM UGCX RETURN
  1327.  
  1328. UGCA CON XCLK
  1329. CON YCLK
  1330. UGCB CON 0
  1331. UGCC CON 2R10
  1332. CON XCLK+204
  1333. UGCD CON 2R00
  1334. UGCE CON 0
  1335. UGCF CON 2R10
  1336. CON XCLK+510
  1337. UGCG CON 2R00
  1338. CON YCLK+5
  1339. CON XCLK+176
  1340. CON 2R.
  1341. CON XCLK+502
  1342. CON 2R.
  1343. CON YCLK+20
  1344. CON XCLK+176
  1345. CON 2R.
  1346. CON XCLK+502
  1347. CON 2R.
  1348. UGCAL EQU *-UGCA
  1349. TUP SPACE 4
  1350. ** TUP - TIME IS UP FOR A PLAYER.
  1351.  
  1352.  
  1353. TUP SUBR ENTRY/EXIT
  1354. LDN 0 CLEAR STATUS
  1355. CRD SW
  1356. LDN 0 CLEAR OUTPUT MESSAGE
  1357. STM DOEB
  1358. LDD A.SW CLEAR INPUT MESSAGE
  1359. SHN 14
  1360. ADD A.SW+1
  1361. ADN P.IM
  1362. CRD CM
  1363. LCMA CM+3
  1364. RJM ABS
  1365. CWD SW
  1366. LDD GC CHECK GAME CLOCKS
  1367. SCN 1
  1368. NJN TUP1 IF CLOCK B
  1369. LDC 2R
  1370. STM UGCB FLAG CLOCK A
  1371. LDC 2R00 SET SECONDS TO ZERO
  1372. STM UGCD
  1373. UJN TUP2
  1374.  
  1375. TUP1 LDC 2R
  1376. STM UGCE FLAG CLOCK B
  1377. LDC 2R00 SET SECONDS TO ZERO
  1378. STM UGCG
  1379. TUP2 RJM AKL SET COMPLETE BIT AND CLEAR MESSAGES
  1380. LDN 0 STOP CLOCKS
  1381. STD GC
  1382. LJM TUPX RETURN
  1383. ABS TITLE CONVERSION ROUTINES
  1384. ** ABS - CONVERT RELATIVE ADDRESS TO ABSOLUTE.
  1385. *
  1386. * ENTRY (A) = RELATIVE ADDRESS.
  1387. *
  1388. * EXIT (A) = ABSOLUTE ADDRESS IF IN RANGE.
  1389. * ABORT IF ADDRESS OUT OF RANGE.
  1390.  
  1391.  
  1392. ABS1 SHN 14
  1393. ADD FL
  1394. ADD RA
  1395. SHN 6
  1396.  
  1397. ABS SUBR ENTRY/EXIT
  1398. SHN 14
  1399. SBD FL
  1400. SHN 6
  1401. MJN ABS1 IF IN RANGE
  1402. LDC ABSA+CPON MESSAGE = *POINTER OUT OF RANGE.*
  1403. RJM DFM
  1404. LJM ABT ABORT JOB
  1405.  
  1406. ABSA DATA C*CHD - POINTER OUT OF RANGE.*
  1407. CDD SPACE 4
  1408. ** CDD - CONVERT OCTAL TO DISPLAY CODED DECIMAL.
  1409. *
  1410. * ENTRY (A) = OCTAL NUMBER TO BE CONVERTED.
  1411. *
  1412. * EXIT (A) = NUMBER IN DISPLAY CODED DECIMAL.
  1413. *
  1414. * USES T0, T1.
  1415.  
  1416.  
  1417. CDD2 ADN 10D+1R0 CONVERT TO DISPLAY CODE
  1418. SHN 14
  1419. ADD T1
  1420. SHN 6
  1421.  
  1422. CDD SUBR ENTRY/EXIT
  1423. STD T0 STORE THE NUMBER
  1424. LDN 1R0 INITIALIZE TENS COUNTER
  1425. STD T1
  1426. CDD1 LCN 10D COUNT TENS
  1427. RAD T0
  1428. MJN CDD2 IF UNDERFLOW
  1429. AOD T1 ADVANCE TENS COUNT
  1430. UJN CDD1 LOOP
  1431. CTD SPACE 4
  1432. * CTD - CONVERT TIME TO DISPLAY CODED MINUTES AND SECONDS.
  1433. *
  1434. * ENTRY (A) = TIME IN OCTAL SECONDS.
  1435. *
  1436. * EXIT (A) = MINUTES IN DISPLAY CODED DECIMAL.
  1437. * (CM) = SECONDS IN DISPLAY CODED DECIMAL.
  1438. *
  1439. * USES T2, T3.
  1440. *
  1441. * CALLS CDD.
  1442.  
  1443.  
  1444. CTD2 ADN 60D FORM REMAINDER (SECONDS)
  1445. RJM CDD CONVERT TO DISPLAY CODE
  1446. STD CM STORE
  1447. LDD T3
  1448. RJM CDD CONVERT MINUTES TO DISPLAY CODE
  1449. STD T3 SUPPRESS LEADING ZERO
  1450. SHN -6
  1451. SBN 1R0
  1452. NJN CTD3
  1453. LDD T3
  1454. LPN 77
  1455. STD T3
  1456. CTD3 LDD T3
  1457.  
  1458. CTD SUBR ENTRY/EXIT
  1459. STD T2
  1460. LDN 0 INITIALIZE
  1461. STD T3
  1462. CTD1 LCN 60D COUNT MINUTES
  1463. RAD T2
  1464. MJN CTD2 IF UNDERFLOW
  1465. AOD T3 ADVANCE MINUTE COUNT
  1466. UJN CTD1 LOOP
  1467. SPACE 4,10
  1468. DIS HERE *COMDSYS* *DISPLA* EXPANSION
  1469. SPACE 4,10
  1470. BUF EQU *
  1471. L SET 7777-BUF
  1472. BUFL EQU L/5 LENGTH OF PIECE DISPLAY BUFFER (CM WDS)
  1473. PRS TITLE PRS - PRESET DRIVER
  1474. ** PRS - PRESET. (WILL BE OVERLAID)
  1475. *
  1476. * EXIT (NC) = NUMBER OF CP-S.
  1477.  
  1478.  
  1479. PRS SUBR ENTRY/EXIT
  1480. CATD CHECK ACCESS TO DISPLAY CONSOLE
  1481. * LDN 0
  1482. STD WC INITIALIZE DIRECT CELLS
  1483. STD CC
  1484. STD CR
  1485. STD GC
  1486. STD KM CLEAR KEYBOARD MESSAGE
  1487. LDC RTCL SET REAL TIME CLOCK
  1488. CRD CM
  1489. LDD CM+1 SET SECOND CLOCK
  1490. STD SC
  1491. RJM PAUSE
  1492. LDN CMUR CLEAR CMU OPTION AVAILABLE BIT
  1493. RJM ABS
  1494. CRD CM
  1495. LDD CM
  1496. LPC 3777
  1497. STD CM
  1498. LDN CMUR
  1499. RJM ABS
  1500. CWD CM
  1501. LDC PAUSE4 SET RETURN FROM HOLD ON A ROLLOUT FLAG
  1502. STM /COMDDSP/ROFA
  1503. LCMA IR+3 STATUS POINTER
  1504. NJN PRS2 IF NON ZERO
  1505. LJM ABT ABORT JOB
  1506.  
  1507. PRS2 LDD A.SW READ PIECE DISPLAY BUFFER POINTERS
  1508. SHN 14
  1509. ADD A.SW+1
  1510. ADN P.PD
  1511. CRD CN
  1512. TCMA CN+1,FT
  1513. TCMA CN+3,LM
  1514. LCMA FT
  1515. RJM ABS
  1516. LCMA LM
  1517. RJM ABS
  1518. LDD A.SW LOAD OTHER POINTERS
  1519. SHN 14
  1520. ADD A.SW+1
  1521. ADN P.TR
  1522. CRD CN
  1523. ADN P.OP-P.TR
  1524. CRD CM
  1525. ADN P.GS-P.OP
  1526. CRD T6
  1527. ADN P.NM-P.GS
  1528. CRD T4
  1529. LCMA T7
  1530. RJM ABS
  1531. CRM DOSE,ON READ PLAYER NAMES
  1532. CRM DOSF,ON
  1533. TCMA CN+3,A.TR
  1534. TCMA CM+3,A.OP
  1535. TCMA CM+1,A.GS
  1536. LDD IR+2
  1537. ADC -7777
  1538. ZJN PRS3 IF RECALLED
  1539. LCN 0 SET RECALL PARAMETER
  1540. STD IR+2
  1541. MONITOR DCPM DROP CPU
  1542. LDN 0 CLEAR (RA+1)
  1543. CRD CM
  1544. LDD RA
  1545. SHN 6
  1546. ADN 1
  1547. CWD CM
  1548. RJM SB0
  1549. MONITOR RCPM REQUEST CPU
  1550. RJM RDS REQUEST DISPLAY
  1551. RJM MDC MODIFY CHANNEL INSTRUCTIONS
  1552. LJM PRSX RETURN
  1553.  
  1554. PRS3 LDD A.SW RESET CLOCKS
  1555. SHN 14
  1556. ADD A.SW+1
  1557. ADN P.RO
  1558. CRD CM
  1559. LDD CM
  1560. STM CLKAO
  1561. RJM CTD
  1562. STM UGCC
  1563. LDD CM
  1564. STM UGCD
  1565. LDD CM+1
  1566. STM CLKBO
  1567. RJM CTD
  1568. STM UGCF
  1569. LDD CM
  1570. STM UGCG
  1571. LDD CM+2
  1572. STD GC
  1573. LDD CM+3
  1574. STM UGCB
  1575. LDD CM+4
  1576. STM UGCE
  1577.  
  1578. * READ OUTPUT MESSAGE.
  1579.  
  1580. LDD A.SW READ POINTER
  1581. SHN 14
  1582. ADD A.SW+1
  1583. ADN P.OM
  1584. CRD CM
  1585. LCMA CM+3
  1586. RJM ABS
  1587. CRM DOEB,TR
  1588.  
  1589. * READ LIMITS.
  1590.  
  1591. LDN LLIM SET WORD COUNT
  1592. STD T1
  1593. LDD A.SW READ POINTER
  1594. SHN 14
  1595. ADD A.SW+1
  1596. ADN P.LM
  1597. CRD CM
  1598. LCMA CM+3 READ LIMITS
  1599. RJM ABS
  1600. CRM PRSA,T1
  1601. LDN 0
  1602. STD T5 SET INDEX
  1603. STD LF CLEAR FLAG
  1604. LDC PRSA-1 SET POINTER
  1605. STD T6
  1606. PRS4 LDN 5 ADVANCE POINTER
  1607. RAD T6
  1608. LDI T6 LOAD NEXT LIMIT
  1609. NJN PRS5 IF NOT ZERO BYTE
  1610. STM DLMC,T5 SET ZERO BYTE
  1611. LDD T5
  1612. SBN 2*6
  1613. MJN PRS7 IF @ 6 LEVELS
  1614. UJN PRS6
  1615.  
  1616. PRS5 RJM CDD CONVERT TO DISPLAY CODE
  1617. STM DLMC,T5
  1618. LDN 2 ADVANCE INDEX
  1619. RAD T5
  1620. SBN 2*LLIM
  1621. NJN PRS4 LOOP
  1622. PRS6 LCN 0 SET FLAG
  1623. STD LF
  1624.  
  1625. * READ RANK LABELS.
  1626.  
  1627. PRS7 LDN 8D SET LABEL COUNT
  1628. STD T1
  1629. LDD A.SW READ POINTER TO BOARD
  1630. SHN 14
  1631. ADD A.SW+1
  1632. ADN P.BD
  1633. CRD CM
  1634. LCMA CM+3 READ LABELS
  1635. RJM ABS
  1636. CRM PRSA,T1
  1637. LDC PRSA+5*7 SET POINTER TO BUFFER
  1638. STD T2
  1639. PRS8 LDI T2 LOAD NEXT LABEL
  1640. STM DBDE-1,T1 STORE
  1641. LCN 5 DECREMENT POINTER
  1642. RAD T2
  1643. SOD T1 DECREMENT INDEX
  1644. NJN PRS8 LOOP
  1645.  
  1646. * READ FILE LABELS.
  1647.  
  1648. LDD A.SW READ POINTER TO BOARD
  1649. SHN 14
  1650. ADD A.SW+1
  1651. ADN P.BD
  1652. CRD CM
  1653. LCMA CM+3 READ LABELS
  1654. ADN 8D
  1655. RJM ABS
  1656. CRM PRSA,ON
  1657. LDC PRSA+4 SET POINTER TO LABELS
  1658. STD CM
  1659. LDC DBDD+12D SET POINTER TO LABEL BUFFER
  1660. STD CM+1
  1661. PRS9 LDI CM UNPACK LABELS
  1662. LPN 77
  1663. STI CM+1
  1664. SOD CM+1
  1665. LDI CM
  1666. SCN 77
  1667. STI CM+1
  1668. LCN 2
  1669. RAD CM+1
  1670. SOD CM
  1671. LMC PRSA
  1672. NJN PRS9 LOOP
  1673. RJM RDS REQUEST DISPLAY
  1674. RJM MDC MODIFY CHANNEL INSTRUCTIONS
  1675. LDN NCPL SAVE NUMBER OF CP-S
  1676. CRD CM
  1677. AOD CM+1
  1678. STD NC
  1679. LJM PRSX RETURN
  1680.  
  1681. PRSA BSS 0
  1682. SPACE 4
  1683. ** COMMON DECKS.
  1684.  
  1685.  
  1686. *CALL COMPCUA
  1687. SPACE 4
  1688. END
cdc/nos2.source/opl871/chd.txt ยท Last modified: 2023/08/05 17:24 by Site Administrator