Table of Contents

KEYEX

Table Of Contents

  • [00118] EXECUTIVE PROGRAM FOR *KEY* UTILITY.
  • [00186] BYTE - CONVERT ADDRESS TO Z80 FORMAT.
  • [00224] CHECK - CHECK IF FUNCTION KEYS HAVE BEEN LOADED.
  • [00260] CHKTERM - CHECK TERMINAL MODEL NAME.
  • [00312] CLEAR - CLEAR THE USER DEFINED FUNCTION KEYS IN THE TERMINAL.
  • [00348] DEFAULT - LOAD DEFAULT FUNCTION KEYS.
  • [00383] DISPLAY - DISPLAY FUNCTION KEYS.
  • [00511] EDIT - EDIT FUNCTION KEYS.
  • [00734] EDSETUP - EDIT THE SETUP TERMINAL CHARACTERISTICS.
  • [00820] RDSORC - READ KEY DEFINITIONS FROM THE SOURCE FILE.
  • [00880] HELP - PROVIDE HELP INFORMATION FOR THE *KEY* UTILITY.
  • [00951] LDSETUP - SET UP TERMINAL CHARACTERISTICS.
  • [01062] LOAD - LOAD DEFINITIONS INTO TERMINAL.
  • [01102] PACK - PACK BUFFER AND WRITE TO TERMINAL.
  • [01189] PRINT - PRINT FUNCTION KEYS TO SPECIFIED FILE.
  • [01290] SEND - TRANSFER KEY DEFINITIONS FROM SYSTEM INTO TERMINAL.
  • [01496] SEQPACK - PACKS THE GIVEN SEQUENCE INTO A BUFFER FOR OUTPUT.
  • [01533] SYSKEYS - SET SYSTEM DEFAULTS FOR KEYS AND SETUP CHARACTERISTICS.
  • [01619] VERLOAD - VERIFY THAT TERMINAL HAS LOADED CONTROLWARE.
  • [01727] WRSORC - WRITE KEY DEFINITIONS TO THE SOURCE FILE.
  • [01783] ZSNDADD - FORMAT AND PACK Z80 ADDRESS INTO BUFFER.
  • [01815] ZSNDCHR - FORMAT AND PACK Z80 CHARACTER INTO BUFFER.
  • [01848] ZSNDSEQ - FORMAT AND PACK Z80 CODE SEQUENCE INTO BUFFER.
  • [01883] Z80CODE - LOAD Z80 CONTROLWARE INTO TERMINAL.
  • [02053] PLT - PANEL LOADER TABLE.
  • [02082] PROMPT - TURN FORTRAN PROMPTS OFF.
  • [02095] ERR - ERROR PROCESSING.

Source Code

KEYEX.txt
  1. PROGRAM KEYEX(TAPE1=100,OUTPUT=100,TTFILE=100
  2. . ,INPUT=100, KEYPRNT=100, TAPE6 = KEYPRNT
  3. . ,TAPE2=OUTPUT,TAPE3=TTFILE,TAPE5=INPUT)
  4.  
  5. *** KEY DEFINITION UTILITY.
  6. *
  7. * COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  8. *
  9. * THE *KEY* COMMAND WAS DESIGNED TO BE USED ONLY ON THE VIKING 721
  10. * TERMINAL. IT MAKES USE OF THE PROGRAMMABLE FUNCTION KEYS ON THE
  11. * VIKING 721. YOU CAN CREATE OR EDIT DEFINITIONS FOR FUNCTION
  12. * KEYS AND SET TERMINAL CHARACTERISTICS.
  13. *
  14. * W. F. ANSLEY 83/06/01. CYBER INTERFACE AND PANELS.
  15. * S. L. KSANDER 83/06/01. 721 INTERFACE AND Z80 CODE.
  16. * 83/11/07. UPDATED TO INCLUDE THE CHECK AND PRINT
  17. * COMMANDS.
  18. * 84/02/29. UPDATE TO INCLUDE THE PF COMMANDS.
  19. * M. D. LEMBCKE 84/10/30. REVISED AND STANDARDIZED.
  20. * M. L. SWANSON 85/02/05.
  21.  
  22. *** THE COMMAND FORMATS ARE: KEY,OPTION. OR
  23. * KEY(OPTION,FILENAME)
  24. *
  25. * WHERE OPTION CAN BE ONE OF THE FOLLOWING:
  26. *
  27. * HELP GIVES THE USER COMPLETE INFORMATION ON THE *KEY*
  28. * COMMAND AND ITS USE. *FILENAME* IS IGNORED WITH
  29. * THIS OPTION.
  30. *
  31. * CHECK CHECKS TO SEE IF THE FUNCTION KEYS ARE ALREADY
  32. * LOADED. IF NOT, A LOAD WILL BE EXECUTED. THIS
  33. * WILL SAVE TIME FOR THE USER OPERATING AT A LOW
  34. * BAUD RATE.
  35. *
  36. * NOTE: A GOOD USE FOR THIS OPTION IS IN A PROLOGUE
  37. * AT LOGIN TIME (REFER TO THE UPROC COMMAND).
  38. *
  39. * DISPLAY DISPLAYS THE FIRST SIXTEEN FUNCTION KEY LABELS THAT
  40. * ARE CURRENTLY STORED IN THE 721.
  41. *
  42. * DEFAULT SETS THE KEY DEFINITIONS FOR THE HELP, EDIT AND STOP
  43. * KEY TO THE NOS SYSTEM DEFAULTS. *FILENAME* IS IGNORED
  44. * FOR THIS OPTION. THE DEFAULTS SET ARE: HELP KEY =
  45. * HELP. EDIT KEY = FSE. STOP KEY = CTRL T/NEXT.
  46. *
  47. * EDIT ALLOWS THE USER TO UPDATE THEIR EXISTING KEY
  48. * DEFINITIONS ON *FILENAME*. IF *FILENAME* IS
  49. * NOT SPECIFIED, A FILE NAMED *KEYDEFS* WILL
  50. * BE CREATED AND SAVED UNDER THE USER'S USERNAME.
  51. *
  52. * LOAD THIS WILL DOWNLINE LOAD THE KEY DEFINITIONS FROM THE
  53. * SPECIFIED FILE INTO THE TERMINAL WITHOUT ANY USER
  54. * INTERACTION. IF NO FILE IS SPECIFIED, THE DEFAULT
  55. * FILE *KEYDEFS* WILL BE USED.
  56. *
  57. * PRINT THIS WILL LIST ONLY THE KEYS THAT ARE DEFINED ON THE
  58. * SPECIFIED FILE. THE OUTPUT WILL BE PLACED ON THE
  59. * LOCAL FILE *KEYPRNT*. IF NO FILE IS SPECIFIED,
  60. * *KEYDEFS* IS USED. THIS DOES NOT NECESSARILY LIST
  61. * THE KEY DEFINITIONS THAT ARE CURRENTLY LOADED INTO
  62. * THE TERMINAL, JUST THOSE THAT ARE ON THE SPECIFIED
  63. * FILE.
  64. *
  65. * FILENAME THE DEFAULT FILE NAME IS *KEYDEFS*.
  66.  
  67. *** ERROR MESSAGES.
  68. *
  69. * * PLEASE ENTER THE SYSTEM COMMAND SCREEN(721)
  70. * AND RE-ENTER THE KEY COMMAND.*
  71. * THE PROGRAM HAS DETECTED THE TERMINAL MODEL NAME DOES
  72. * NOT BEGIN WITH THE PREFIX "721" AND HENCE THE TERMINAL
  73. * HAS NOT BEEN RECOGNIZED AS A VIKING X. NO PROCESSING
  74. * OCCURS IN THIS CASE.
  75.  
  76. *** MESSAGES.
  77. *
  78. * * FUNCTION KEYS ARE ALREADY LOADED.*
  79. * OUTPUT BY ROUTINE *CHECK* TO SIGNIFY NO LOAD WAS
  80. * PROCESSED.
  81. *
  82. * * FUNCTION KEYS ARE NOT LOADED.*
  83. * OUTPUT BY ROUTINE *DISPLAY* IF FUNCTION KEYS HAVE NOT
  84. * BEEN DEFINED.
  85. *
  86. * * FUNCTION KEYS HAVE BEEN LOADED.*
  87. * OUTPUT BY ROUTINE *LOAD* IF FUNCTION KEYS WERE LOADED.
  88. *
  89. * * THE FUNCTION KEYS *EDIT*, *HELP*, AND *STOP* HAVE BEEN LOADED.*
  90. * OUTPUT BY ROUTINE *DEFAULT* IF *EDIT*, *HELP*, *STOP*
  91. * KEYS WERE LOADED.
  92. *
  93. * * THE KEY DEFINITIONS FILE HAS BEEN REPLACED.*
  94. * OUTPUT BY ROUTINE *EDIT* IF KEY DEFINITIONS FILE IS
  95. * REPLACED.
  96. *
  97. * * THE LIST OF DEFINED FUNCTION KEYS IS ON THE LOCAL FILE
  98. * *KEYPRNT*.* - OUTPUT BY ROUTINE *PRINT* AS AN INFORM-
  99. * ATIVE MESSAGE TO THE USER.
  100.  
  101. *** *KEY* FILES.
  102. *
  103. * THE FOLLOWING DECKS/FILES ARE ASSOCIATED WITH THE *KEY* UTILITY.
  104. *
  105. * PROCEDURES:
  106. * KEY *CCL* PROCEDURE.
  107. *
  108. * CODE:
  109. * KEYEX KEY EXECUTIVE PROGRAM.
  110. * KEYPANS SCREEN FORMATTING PANELS.
  111. * KEYUTIL Z80 SOURCE CODE.
  112.  
  113.  
  114.  
  115.  
  116. ** MAIN PROGRAM.
  117.  
  118. ** KEYEX - EXECUTIVE PROGRAM FOR *KEY* UTILITY.
  119. *
  120. * *KEYEX* SETS UP DEFAULTS IN COMMON BLOCK *INFO*, CRACKS
  121. * COMMAND PARAMETERS, AND PROCESSES USER SPECIFIED OPTIONS.
  122. *
  123. * KEYEX(OPTION, FILENAME)
  124. *
  125. * ENTRY OPTION - USER SPECIFIED OPTION.
  126. * FILENAME - OPTIONAL FILE NAME.
  127. *
  128. * EXIT *CCL* GLOBAL VARIABLE *R1* = 1 IF TERMINAL TYPE IS
  129. * INCORRECT.
  130. *
  131. * CALLS CHECK, CHKTERM, DEFAULT, DISPLAY, EDIT, HELP, LOAD,
  132. * PRINT, SYSKEYS.
  133.  
  134.  
  135. IMPLICIT INTEGER (A - Z)
  136.  
  137. PARAMETER (NKEYS = 45)
  138. * NUMBER OF DEFINABLE FUNCTION KEYS
  139.  
  140. CHARACTER*7 OPTION
  141. * OPTION SPECIFIED BY THE USER
  142. CHARACTER*7 FILENM
  143. * KEY DEFINITIONS FILE
  144. CHARACTER*67 KEYS(NKEYS)
  145. * FUNCTION KEY DEFINITIONS
  146. * 7/ KEY LABEL, 60/ KEY DEFINITION
  147. CHARACTER*7 PARM
  148. * PARAMETER NAME
  149. CHARACTER*7 SETDATA(3)
  150. * SETUP TERMINAL CHARACTERISTICS
  151.  
  152. COMMON / INFO / KEYS, FILENM, SETDATA
  153.  
  154.  
  155. * SET UP DEFAULTS IN COMMON BLOCK AND GET INPUT PARAMETERS.
  156.  
  157. CALL SYSKEYS
  158. CALL GETPARM(PARM,OPTION,I)
  159. CALL GETPARM(PARM,FILENM,I)
  160.  
  161. * CHECK TERMINAL TYPE AND PROCESS OPTION SPECIFIED BY THE USER.
  162.  
  163. CALL CHKTERM
  164. IF(OPTION .EQ. 'CHECK ') THEN
  165. CALL CHECK
  166. ELSE IF(OPTION .EQ. 'DEFAULT') THEN
  167. CALL DEFAULT
  168. ELSE IF(OPTION .EQ. 'DISPLAY') THEN
  169. CALL DISPLAY
  170. ELSE IF(OPTION .EQ. 'EDIT ') THEN
  171. CALL EDIT
  172. ELSE IF(OPTION .EQ. 'HELP ') THEN
  173. CALL HELP
  174. ELSE IF(OPTION .EQ. 'LOAD ') THEN
  175. CALL LOAD
  176. ELSE IF(OPTION .EQ. 'PRINT ') THEN
  177. CALL PRINT
  178. ENDIF
  179. CLOSE(1,STATUS='DELETE')
  180. CLOSE(3,STATUS='DELETE')
  181. END
  182.  
  183.  
  184. SUBROUTINE BYTE (CHAR, UBYTE, LBYTE)
  185.  
  186. ** BYTE - CONVERT ADDRESS TO Z80 FORMAT.
  187. *
  188. * *BYTE* TAKES *CHAR* AND DIVIDES IT, CHANGING THE ADDRESS INTO
  189. * 721 Z80 FORMAT AND RETURNS THE RESULT IN *UBYTE* AND *LBYTE*.
  190. *
  191. * CALL BYTE(CHAR, UBYTE, LBYTE)
  192. *
  193. * ENTRY CHAR - CHARACTER BYTE ADDRESS.
  194. *
  195. * EXIT UBYTE - THE UPPER HALF ADDRESS WITH THE PREFIX *60*.
  196. * LBYTE - THE LOWER HALF ADDRESS WITH THE PREFIX *20*.
  197. *
  198. * NOTE THE Z80 MICRO REQUIRES A 16 BIT ADDRESS WITH THE UPPER
  199. * BYTE BEFORE THE LOWER BYTE.
  200.  
  201.  
  202. IMPLICIT INTEGER (A - Z)
  203.  
  204. BOOLEAN ZPREFIX
  205. * Z80 CODE PREFIX
  206. BOOLEAN Z20CODE
  207. * *20* PREFIX FOR Z80 ADDRESS
  208. BOOLEAN Z60CODE
  209. * *60* PREFIX FOR Z80 ADDRESS
  210.  
  211. DATA ZPREFIX / Z"800" /
  212. DATA Z20CODE / Z"20" /
  213. DATA Z60CODE / Z"60" /
  214.  
  215. C = AND(CHAR, Z"F0")
  216. UBYTE = SHIFT(C, -4) + Z20CODE + ZPREFIX
  217. LBYTE = AND(CHAR, Z"0F") + Z60CODE + ZPREFIX
  218. RETURN
  219. END
  220.  
  221.  
  222. SUBROUTINE CHECK
  223.  
  224. ** CHECK - CHECK IF FUNCTION KEYS HAVE BEEN LOADED.
  225. *
  226. * *CHECK* QUERIES THE TERMINAL TO DETERMINE IF Z80 CONTROLWARE
  227. * AND KEY DEFINITIONS ARE LOADED INTO THE TERMINAL.
  228. *
  229. * CALL CHECK
  230. *
  231. * CALLS LOAD, VERLOAD.
  232. *
  233. * MESSAGES
  234. * FUNCTION KEYS HAVE BEEN LOADED.
  235.  
  236.  
  237. IMPLICIT INTEGER (A - Z)
  238.  
  239. LOGICAL LOADED
  240. * CONTROLWARE LOADED FLAG
  241.  
  242. DATA LOADED / .FALSE. /
  243.  
  244. 10 FORMAT('FUNCTION KEYS ARE ALREADY LOADED.')
  245.  
  246. CALL VERLOAD(LOADED)
  247.  
  248. IF (.NOT.LOADED) THEN
  249. CALL LOAD
  250. ELSE
  251. WRITE(2,10)
  252. ENDFILE 2
  253. ENDIF
  254. RETURN
  255. END
  256.  
  257.  
  258. SUBROUTINE CHKTERM
  259.  
  260. ** CHKTERM - CHECK TERMINAL MODEL NAME.
  261. *
  262. * *CHKTERM* VERIFIES THAT THE FIRST THREE CHARACTERS OF THE
  263. * TERMINAL MODEL NAME SPECIFIED TO THE SCREEN OR LINE COMMAND
  264. * WAS "721".
  265. *
  266. * CALL CHKTERM
  267. *
  268. * ERROR *ERR* IS CALLED IF THE TERMINAL MODEL IS NOT PREFIXED
  269. * BY "721".
  270. *
  271. * CALLS ERR, SFGETN.
  272. *
  273. * MESSAGES
  274. * PLEASE ENTER THE SYSTEM COMMAND: SCREEN,721.
  275. * AND RE-ENTER THE KEY COMMAND.
  276. * STOP. FIX ERROR.
  277.  
  278.  
  279. IMPLICIT INTEGER (A - Z)
  280.  
  281. CHARACTER*7 MODNAME
  282. * TERMINAL MODEL NAME.
  283. CHARACTER*3 PREFIX
  284. * THREE CHARACTER PREFIX
  285. CHARACTER*3 PRE721
  286. * CHARACTER STRING PREFIX FOR 721
  287.  
  288. EQUIVALENCE (MODNAME, PREFIX)
  289.  
  290. DATA PRE721 / '721' /
  291.  
  292. 10 FORMAT(' PLEASE ENTER THE SYSTEM COMMAND: SCREEN,721.',
  293. ./' AND RE-ENTER THE KEY COMMAND.')
  294.  
  295. * GET TERMINAL MODEL NAME.
  296.  
  297. CALL SFGETN(MODNAME)
  298.  
  299. * IF PREFIX IS NOT '721', NOTIFY USER OF ERROR.
  300.  
  301. IF (PREFIX .NE. PRE721) THEN
  302. WRITE(2,10)
  303. CALL ERR
  304. STOP 'FIX ERROR.'
  305. ENDIF
  306. RETURN
  307. END
  308.  
  309.  
  310. SUBROUTINE CLEAR
  311.  
  312. ** CLEAR - CLEAR THE USER DEFINED FUNCTION KEYS IN THE TERMINAL.
  313. *
  314. * *CLEAR* CLEARS THE FUNCTION KEY DEFINITIONS WITHIN THE
  315. * TERMINAL BY EXECUTING A HOST-LOADED CONTROLWARE ROUTINE
  316. * THAT REINITIALIZES THE TERMINALS KEY DEFINITION TABLE.
  317. *
  318. * CALL CLEAR
  319. *
  320. * CALLS PACK, SEQPACK.
  321.  
  322.  
  323. IMPLICIT INTEGER (A - Z)
  324.  
  325.  
  326. BOOLEAN ZCARRET(1)
  327. * HEX CODE FOR CARRIAGE RETURN
  328. BOOLEAN ZRESETR(3)
  329. * HEX SEQUENCE TO INVOKE RESET ROUTINE
  330.  
  331.  
  332. DATA ZCARRET / Z"0D" /
  333. DATA ZRESETR / Z"1E", Z"12", Z"72" /
  334.  
  335. * RESET KEYS TO THE DEFAULT 721 SETTINGS BY DOING A HOST EXECUTE
  336. * OF THE HOST LOADED Z80 CONTROLWARE ROUTINE *RESET*.
  337.  
  338. CALL PACK(1, 0)
  339. CALL SEQPACK(ZRESETR,3)
  340. CALL SEQPACK(ZCARRET,1)
  341. CALL PACK(3, 1)
  342. RETURN
  343. END
  344.  
  345.  
  346. SUBROUTINE DEFAULT
  347.  
  348. ** DEFAULT - LOAD DEFAULT FUNCTION KEYS.
  349. *
  350. * *DEFAULT* LOADS THE *EDIT*, *HELP*, AND *STOP* FUNCTION KEYS.
  351. *
  352. * CALL DEFAULT
  353. *
  354. * EXIT *KEYS* AND *SETDATA* ARE SET TO DEFAULT VALUES.
  355. *
  356. * CALLS CLEAR, SEND.
  357. *
  358. * MESSAGES
  359. * THE FUNCTION KEYS *EDIT*, *HELP*, AND *STOP* HAVE BEEN
  360. * LOADED.
  361.  
  362.  
  363. IMPLICIT INTEGER (A - Z)
  364.  
  365. 10 FORMAT(' THE FUNCTION KEYS *EDIT*, *HELP*, AND *STOP* HAVE ',
  366. .'BEEN LOADED.')
  367.  
  368. * CLEAR THE CURRENT FUNCTION KEY DEFINITIONS.
  369.  
  370. CALL CLEAR
  371.  
  372. * SEND DEFAULT DEFINITIONS TO TERMINAL.
  373.  
  374. CALL SEND
  375. WRITE(2,10)
  376. ENDFILE 2
  377. RETURN
  378. END
  379.  
  380.  
  381. SUBROUTINE DISPLAY
  382.  
  383. ** DISPLAY - DISPLAY FUNCTION KEYS.
  384. *
  385. * *DISPLAY* DISPLAYS THE FIRST SIXTEEN FUNCTION KEY LABELS THAT
  386. * ARE CURRENTLY LOADED IN THE TERMINAL.
  387. *
  388. * CALL DISPLAY
  389. *
  390. * EXIT THE FIRST SIXTEEN KEY LABELS DISPLAYED USING
  391. * A SCREEN FORMATTING PANEL.
  392. *
  393. * CALLS ERR, PACK, RDSORC, SEQPACK, SFCLOS, SFOPEN, SFSSHO,
  394. * VERLOAD.
  395. *
  396. * MESSAGES
  397. * FUNCTION KEYS ARE NOT LOADED.
  398. *
  399. * PLEASE ENTER THE SYSTEM COMMAND: SCREEN,721.
  400. * AND RE-ENTER THE KEY COMMAND.
  401. * STOP. FIX ERROR.
  402.  
  403.  
  404. IMPLICIT INTEGER (A - Z)
  405.  
  406. PARAMETER (NKEYS = 45)
  407. * NUMBER OF DEFINABLE FUNCTION KEYS
  408.  
  409. BOOLEAN ZDISKEY(3)
  410. * HEX SEQUENCE TO DISABLE KEYBOARD ENTRY
  411. BOOLEAN ZENKEYB(3)
  412. * HEX SEQUENCE TO ENABLE KEYBOARD ENTRY
  413. BOOLEAN ZHOSTLC(3)
  414. * HEX SEQUENCE FOR HOST LOADED CONTROLWARE
  415. BOOLEAN ZMCUR80(3)
  416. * HEX SEQUENCE TO MOVE CURSOR FOR 80 COLUMN
  417. BOOLEAN ZMCUR32(5)
  418. * HEX SEQUENCE TO MOVE CURSOR FOR 132 COLUMN
  419. CHARACTER*7 FILENM
  420. * KEY DEFINITIONS FILE
  421. CHARACTER*67 KEYS(NKEYS)
  422. * FUNCTION KEY DEFINITIONS
  423. CHARACTER*112 OPRAM4
  424. * STRING OF USER LABELS
  425. CHARACTER*7 PANEL
  426. * TEMPORARY PANEL NAME
  427. CHARACTER*7 PANEL7
  428. * DISPLAY PANEL FOR 80 CHARACTERS/LINE
  429. CHARACTER*7 PANEL8
  430. * DISPLAY PANEL FOR 132 CHARACTERS/LINE
  431. CHARACTER*7 SETDATA(3)
  432. * TERMINAL CHARACTERISTICS
  433. CHARACTER*7 STR80
  434. * 80 CHARACTERS STRING
  435. CHARACTER*7 STR132
  436. * 132 CHARACTERS STRING
  437. LOGICAL LOADED
  438. * CONTROLWARE LOADED FLAG
  439.  
  440. COMMON / INFO / KEYS, FILENM, SETDATA
  441.  
  442. DATA OPRAM4 / ' ' /
  443. DATA PANEL7 / 'KEYPAN7' /
  444. DATA PANEL8 / 'KEYPAN8' /
  445. DATA ZDISKEY / Z"1E", Z"12", Z"4D" /
  446. DATA ZENKEYB / Z"1E", Z"12", Z"4E" /
  447. DATA ZHOSTLC / Z"1E", Z"12", Z"73" /
  448. DATA ZMCUR80 / Z"02", Z"20", Z"23"/
  449. DATA ZMCUR32 / Z"02", Z"7E", Z"20", Z"20", Z"23" /
  450. DATA STR80 / '80 ' /
  451. DATA STR132 / '132 ' /
  452. DATA LOADED / .FALSE. /
  453.  
  454. 12 FORMAT(A112)
  455. 13 FORMAT(' FUNCTION KEYS ARE NOT LOADED.')
  456. 14 FORMAT(' PLEASE ENTER THE SYSTEM COMMAND: SCREEN,721.',
  457. ./' AND RE-ENTER THE KEY COMMAND.')
  458.  
  459.  
  460. CALL VERLOAD(LOADED)
  461.  
  462. IF (.NOT.LOADED) THEN
  463. CALL PACK(1, 0)
  464. WRITE(2,13)
  465. ELSE
  466. CALL RDSORC
  467. CALL PACK(1, 0)
  468. CALL SEQPACK(ZHOSTLC,3)
  469. CALL PACK(3, 1)
  470.  
  471. * READ THE 721 LABELS FROM THE TERMINAL.
  472.  
  473. READ(5, 12) OPRAM4
  474.  
  475. * DISPLAY THE LABELS USING THE CORRECT SIZE PANEL.
  476.  
  477. IF(SETDATA(3) .EQ. STR132) THEN
  478. PANEL = PANEL8
  479. ELSE
  480. PANEL = PANEL7
  481. ENDIF
  482.  
  483. CALL SFOPEN(PANEL, STAT)
  484. IF (STAT .NE. 0) THEN
  485. CALL ERR
  486. STOP 'SF ERROR.'
  487. ELSE
  488. CALL SFSWRI(PANEL, OPRAM4)
  489. CALL SFCLOS(PANEL, 2)
  490.  
  491. * POSITION CURSOR UNDER THE DISPLAY OF LABELS.
  492.  
  493. CALL PACK(1, 0)
  494. IF(SETDATA(3) .EQ. STR80) THEN
  495. CALL SEQPACK(ZMCUR80,3)
  496. ELSE
  497. CALL SEQPACK(ZMCUR32,5)
  498. ENDIF
  499.  
  500. ENDIF
  501.  
  502. ENDIF
  503. CALL SEQPACK(ZENKEYB,3)
  504. CALL PACK(3, 1)
  505. RETURN
  506. END
  507.  
  508.  
  509. SUBROUTINE EDIT
  510.  
  511. ** EDIT - EDIT FUNCTION KEYS.
  512. *
  513. * *EDIT* ALLOWS THE USER TO DEFINE AND LOAD FUNCTION KEYS
  514. * AND SET TERMINAL CHARACTERISTICS.
  515. *
  516. * CALL EDIT
  517. *
  518. * EXIT *PARM* AND *SETDATA* MAY BE MODIFIED.
  519. *
  520. * CALLS EDSETUP, ERR, LDSETUP, LOAD, RDSORC, SFCLOS, SFGETK,
  521. * SFOPEN, SFSSHO, SYSKEYS, WRSORC.
  522. *
  523. * MESSAGES
  524. * THE KEY DEFINITIONS FILE HAS BEEN REPLACED.
  525. *
  526. * FUNCTION KEYS HAVE BEEN LOADED.
  527.  
  528. IMPLICIT INTEGER (A - Z)
  529.  
  530. PARAMETER (ORDHELP = 3)
  531. * ORDINAL FOR THE HELP KEY
  532. PARAMETER (ORDBKW = 8)
  533. * ORDINAL FOR THE BKW FUNCTION KEY
  534. PARAMETER (ORDFWD = 7)
  535. * ORDINAL FOR THE FWD FUNCTION KEY
  536. PARAMETER (ORDSTOP = 4)
  537. * ORDINAL FOR THE STOP FUNCTION KEY
  538. PARAMETER (NKEYS = 45)
  539. * NUMBER OF DEFINABLE FUNCTION KEYS
  540. PARAMETER (NPAN = 3)
  541. * NUMBER OF EDIT PANELS
  542. PARAMETER (NKEYSPP = 15)
  543. * NUMBER OF KEYS DEFINABLE PER PANEL
  544.  
  545. DIMENSION BASE(NPAN)
  546. * FUNCTION KEYS DIVIDED IN THREE GROUPS
  547. CHARACTER*1 PAGE(NPAN)
  548. * PAGE NUMBER OF PANEL
  549. CHARACTER*7 FILENM
  550. * FILE NAME
  551. CHARACTER*67 KEYS(NKEYS)
  552. * FUNCTION KEY DEFINITIONS
  553. CHARACTER*5 LABELS(NPAN, NKEYSPP)
  554. * FUNCTION KEY LABELS
  555. CHARACTER*7 P1
  556. * BASIC INPUT PANEL
  557. CHARACTER*7 P2
  558. * HELP PANEL
  559. CHARACTER*7 P3
  560. * ASCII-HEX PANEL
  561. CHARACTER*1081 P1IVAR
  562. * INPUT STRING FROM THE PANEL
  563. CHARACTER*1081 P1OVAR
  564. * OUTPUT STRING FOR THE PANEL
  565. CHARACTER*72 P1I(NKEYSPP)
  566. * INPUT STRING FROM THE PANEL
  567. CHARACTER*72 P1O(NKEYSPP)
  568. * OUTPUT STRING FOR THE PANEL
  569. CHARACTER*1 P2VAR
  570. * BLANK OUTPUT STRING
  571. CHARACTER*7 SETDATA(3)
  572. * SETUP DATA.
  573. INTEGER ORDINAL
  574. * FUNCTION KEY VALUE
  575. INTEGER TYPE
  576. * TYPE OF FUNCTION KEY
  577. * 0 = PROGRAMMABLE FUNCTION KEY
  578. * 1 = LABELED FUNCTION KEY
  579.  
  580. EQUIVALENCE (P1I(1), P1IVAR(2:2))
  581. EQUIVALENCE (P1O(1), P1OVAR(2:2))
  582.  
  583. COMMON / INFO / KEYS, FILENM, SETDATA
  584.  
  585. DATA PAGE / '1', '2', '3' /
  586. DATA P1 / 'KEYPAN4' /
  587. DATA P2 / 'KEYPAN3' /
  588. DATA P3 / 'KEYPAN6' /
  589. DATA BASE / 0, 15, 30 /
  590. DATA P1I / 15* ' ' /
  591. DATA P1O / 15* ' ' /
  592. DATA P2VAR / ' ' /
  593. DATA (LABELS(1, I), I = 1, NKEYSPP) /
  594. . 'F1 ', 'F2 ', 'F3 ', 'F4 ', 'F5 '
  595. ., 'F6 ', 'F7 ', 'F8 ', 'F9 ', 'F10 '
  596. ., 'F11 ', 'F12 ', 'F13 ', 'F14 ', 'F15 '
  597. ./
  598. DATA (LABELS(2, I), I = 1, NKEYSPP) /
  599. . 'RTAB ', 'LTAB ', 'NEXT ', 'DOWN ', 'UP '
  600. ., 'FWD ', 'BKW ', 'HELP ', 'ERASE ', 'EDIT '
  601. ., 'BACK ', 'LAB ', 'DATA ', 'STOP ', 'INSRT '
  602. ./
  603. DATA (LABELS(3, I), I = 1, NKEYSPP) /
  604. . 'DLETE', 'CLEAR', 'PRINT', 'PAD 1 ', 'PAD 2 '
  605. ., 'PAD 3', 'PAD 4', 'PAD 5', 'PAD 6 ', 'PAD 7 '
  606. ., 'PAD 8', 'PAD 9', 'PAD 0', 'PAD , ', 'PAD . '
  607. ./
  608.  
  609. 11 FORMAT(' THE KEY DEFINITIONS FILE HAS BEEN REPLACED.')
  610. 12 FORMAT(' PLEASE ENTER THE SYSTEM COMMAND: SCREEN,721.',
  611. ./' AND RE-ENTER THE KEY COMMAND.')
  612.  
  613.  
  614. * READ USER DEFINITIONS FROM SOURCE FILE, IF ANY.
  615.  
  616. CALL RDSORC
  617.  
  618. CALL SFOPEN(P1, STAT)
  619. IF (STAT .NE. 0) THEN
  620. CALL ERR
  621. STOP 'SF ERROR.'
  622. ENDIF
  623.  
  624. 100 PANEL = 1
  625.  
  626. * LOAD THE OUTPUT STRING VARIABLE FOR THE PANEL. THE OUTPUT STRING
  627. * IS COMPRISED OF THE KEY NAME, LABEL, AND DEFINITION.
  628.  
  629. 110 P1OVAR(1:1) = PAGE(PANEL)
  630.  
  631. DO 120 I = 1, NKEYSPP
  632. P1O(I)(01:05) = LABELS(PANEL, I)
  633. P1O(I)(06:12) = KEYS(BASE(PANEL) + I)(1:07)
  634. P1O(I)(13:72) = KEYS(BASE(PANEL) + I)(8:67)
  635. 120 CONTINUE
  636.  
  637. * SHOW KEY DEFINITION PANEL.
  638.  
  639. CALL SFSSHO(P1, P1OVAR, P1IVAR)
  640.  
  641. DO 130 I = 1, NKEYSPP
  642. KEYS(BASE(PANEL) + I)(1:07) = P1I(I)(06:12)
  643. KEYS(BASE(PANEL) + I)(8:67) = P1I(I)(13:72)
  644. 130 CONTINUE
  645.  
  646. * CHECK FOR THE LABELED KEYS *FWD*, *BKW*, AND *HELP*, IGNORING OTHERS.
  647.  
  648. CALL SFGETK(TYPE, ORDINAL)
  649. IF(TYPE .EQ. 0) GOTO 140
  650. IF(ORDINAL .EQ. ORDFWD) GOTO 150
  651. IF(ORDINAL .EQ. ORDBKW) GOTO 160
  652. IF(ORDINAL .EQ. ORDHELP) GOTO 190
  653. IF (ORDINAL .EQ. ORDSTOP) GOTO 200
  654. GOTO 110
  655.  
  656. * CHECK FOR APPLICATION KEYS F1, F2, F3, F4, F5, F6, F7, F8, F9.
  657.  
  658. 140 GOTO (150,160,170,180,190,200,210,220,230) ORDINAL
  659. GOTO 110
  660.  
  661. * F1 KEY: FWD TO NEXT PANEL.
  662.  
  663. 150 PANEL = PANEL + 1
  664. IF (PANEL .EQ. NPAN+1) PANEL = 1
  665. GOTO 110
  666.  
  667. * F2 KEY: BKW TO LAST PANEL.
  668.  
  669. 160 PANEL = PANEL - 1
  670. IF (PANEL .LT. 1) PANEL = 3
  671. GOTO 110
  672.  
  673. * F3 KEY: UNDO ALL CHANGES AND RESTART.
  674. * REINITIALIZE *KEYS* AND *SETDATA*, AND GET USER DEFINITIONS IF ANY.
  675.  
  676. 170 CALL SYSKEYS
  677. CALL RDSORC
  678. GOTO 100
  679.  
  680. * F4 KEY: LOAD.
  681.  
  682. 180 CALL SFCLOS(P1, 1)
  683. CALL WRSORC
  684. CALL LOAD
  685. RETURN
  686.  
  687. * F5 KEY: SHOW HELP PANELS.
  688.  
  689. 190 CALL SFOPEN(P2,STAT)
  690. IF (STAT .NE. 0) THEN
  691. CALL ERR
  692. STOP 'SF ERROR.'
  693. ENDIF
  694. CALL SFSSHO(P2,P2VAR,P2VAR)
  695. CALL SFGETK(TYPE, ORDINAL)
  696. CALL SFCLOS(P2,0)
  697. IF ((TYPE .EQ. 1) .AND. (ORDINAL .EQ. ORDSTOP)) GOTO 200
  698. GOTO 110
  699.  
  700. * F6 KEY: QUIT.
  701.  
  702. 200 CALL SFCLOS(P1,1)
  703. RETURN
  704.  
  705. * F7 KEY: QUIT AND REPLACE FILE.
  706.  
  707. 210 CALL SFCLOS(P1,1)
  708. CALL WRSORC
  709. CALL LDSETUP
  710. WRITE(2,11)
  711. RETURN
  712.  
  713. * F8 KEY: DISPLAY ASCII-HEX CHART.
  714.  
  715. 220 CALL SFOPEN(P3,STAT)
  716. IF (STAT .NE. 0) THEN
  717. CALL ERR
  718. STOP 'SF ERROR.'
  719. ENDIF
  720. CALL SFSREA(P3,P2VAR)
  721. CALL SFCLOS(P3,0)
  722. GOTO 110
  723.  
  724. * F9 KEY: SET UP TERMINAL CHARACTERISTICS.
  725.  
  726. 230 CALL EDSETUP
  727. GOTO 110
  728.  
  729. END
  730.  
  731.  
  732. SUBROUTINE EDSETUP
  733.  
  734. ** EDSETUP - EDIT THE SETUP TERMINAL CHARACTERISTICS.
  735. *
  736. * *EDSETUP* IS CALLED BY *EDIT* AND ALLOWS THE USER TO SET UP THE
  737. * TERMINAL CHARACTERISTICS FOR THE NUMBER PAD, SCREEN MODE, AND THE
  738. * NUMBER OF CHARACTERS PER LINE.
  739. *
  740. * CALL EDSETUP
  741. *
  742. * CALLS SFCLOS, SFGETK, SFOPEN, SFSSHO.
  743.  
  744.  
  745. IMPLICIT INTEGER (A - Z)
  746.  
  747. PARAMETER (NKEYS = 45)
  748. * NUMBER OF DEFINABLE KEYS
  749. PARAMETER (ORDFWD = 7)
  750. * ORDINAL FOR THE FWD KEY
  751. PARAMETER (ORDBKW = 1)
  752. * ORDINAL FOR THE BKW KEY
  753. PARAMETER (ORDSTOP = 4)
  754. * ORDINAL FOR THE STOP KEY
  755.  
  756. CHARACTER*7 FILENM
  757. * KEY DEFINITIONS FILE
  758. CHARACTER*67 KEYS(NKEYS)
  759. * FUNCTION KEY DEFINITIONS
  760. CHARACTER*7 PANEL4
  761. * DISPLAY PANEL FOR *EDIT*
  762. CHARACTER*7 PANEL5
  763. * DISPLAY PANEL FOR SETUP
  764. CHARACTER*7 SETDATA(3)
  765. * SETUP TERMINAL CHARACTERISTICS
  766. CHARACTER*7 STRDEF
  767. * DEFAULT STRING
  768. CHARACTER*21 PANELIO
  769. * INPUT/OUTPUT STRING FROM THE PANEL
  770. CHARACTER*21 TEMPSTR
  771. * TEMPORARY TERMINAL CHARACTERISTICS
  772. INTEGER ORDINAL
  773. * FUNCTION KEY VALUE
  774. INTEGER TYPE
  775. * TYPE OF FUNCTION KEY
  776. * 0 = PROGRAMMABLE FUNCTION KEY
  777. * 1 = LABELED FUNCTION KEY
  778.  
  779. EQUIVALENCE (SETDATA(1), TEMPSTR(1:1))
  780.  
  781. COMMON / INFO / KEYS, FILENM, SETDATA
  782.  
  783. DATA PANEL5 / 'KEYPAN5' /
  784. DATA PANEL4 / 'KEYPAN4' /
  785. DATA STRDEF / 'DEFAULT' /
  786.  
  787.  
  788. * CLOSE CURRENT *EDIT* PANEL.
  789.  
  790. CALL SFCLOS(PANEL4,0)
  791.  
  792. * SHOW KEY DEFINITION PANEL.
  793.  
  794. CALL SFOPEN(PANEL5, STAT)
  795. IF (STAT .NE. 0) THEN
  796. CALL ERR
  797. STOP 'SF ERROR.'
  798. ENDIF
  799. PANELIO = STRDEF // STRDEF // STRDEF
  800. CALL SFSSHO(PANEL5, PANELIO, PANELIO)
  801. CALL SFGETK(TYPE, ORDINAL)
  802. CALL SFCLOS(PANEL5, 0)
  803.  
  804. IF (.NOT.((TYPE .EQ. 1) .AND. (ORDINAL .EQ. ORDSTOP))) THEN
  805. CALL WRSORC
  806. TEMPSTR = PANELIO
  807. ENDIF
  808.  
  809. CALL SFOPEN(PANEL4, STAT)
  810. IF (STAT .NE. 0) THEN
  811. CALL ERR
  812. STOP 'SF ERROR.'
  813. ENDIF
  814. RETURN
  815. END
  816.  
  817.  
  818. SUBROUTINE RDSORC
  819.  
  820. ** RDSORC - READ KEY DEFINITIONS FROM THE SOURCE FILE.
  821. *
  822. * *RDSORC* READS THE KEY DEFINITIONS FROM THE DEFINITION
  823. * SOURCE FILE.
  824. *
  825. * CALL RDSORC
  826. *
  827. * USES KEYS, SETDATA.
  828. *
  829. * CALLS PF.
  830.  
  831.  
  832. IMPLICIT INTEGER (A - Z)
  833.  
  834. PARAMETER (NKEYS = 45)
  835. * NUMBER OF DEFINABLE FUNCTION KEYS
  836.  
  837. CHARACTER*7 FILENM
  838. * KEY DEFINITIONS FILE
  839. CHARACTER*60 KEYDEF
  840. * FUNCTION KEY DEFINITION
  841. CHARACTER*67 KEYS(NKEYS)
  842. * LABEL AND KEYDEF
  843. CHARACTER*7 LABEL
  844. * FUNCTION KEY LABEL
  845. CHARACTER*7 SETDATA(3)
  846. * SETUP TERMINAL CHARACTERISTICS
  847.  
  848. COMMON / INFO / KEYS, FILENM, SETDATA
  849.  
  850. 10 FORMAT(A7, 1X, A60)
  851. 20 FORMAT(A7)
  852.  
  853. * READ USER KEY DEFINITION FILE, IF ANY.
  854.  
  855. CALL PF('GET', 'TAPE1', FILENM, 'NA', IGNORE)
  856.  
  857. * SOURCE FILE CONSISTS OF FUNCTION KEY LABELS,
  858. * KEY DEFINITIONS, AND THE TERMINAL'S SETUP DATA.
  859.  
  860. DO 110 I = 1, NKEYS
  861. READ(1, 10, END=130) LABEL, KEYDEF
  862. IF(KEYDEF .NE. ' ') THEN
  863. KEYS(I)(1:07) = LABEL
  864. KEYS(I)(8:67) = KEYDEF
  865. ENDIF
  866. 110 CONTINUE
  867.  
  868. DO 120 I = 1, 3
  869. READ(1, 20, END=130) SETDATA(I)
  870. 120 CONTINUE
  871.  
  872. 130 REWIND 1
  873. RETURN
  874. END
  875.  
  876.  
  877.  
  878. SUBROUTINE HELP
  879.  
  880. ** HELP - PROVIDE HELP INFORMATION FOR THE *KEY* UTILITY.
  881. *
  882. * *HELP* GIVES THE USER INFORMATION ON THE *KEY* UTILITY,
  883. * USING SCREEN FORMATTING DISPLAY PANELS.
  884. *
  885. * CALL HELP
  886. *
  887. * CALLS ERR, SFCLOS, SFOPEN, SFSSHO.
  888. *
  889. * MESSAGES
  890. * PLEASE ENTER THE SYSTEM COMMAND: SCREEN,721.
  891. * AND RE-ENTER THE KEY COMMAND.
  892. * STOP. FIX ERROR.
  893.  
  894.  
  895. IMPLICIT INTEGER (A - Z)
  896.  
  897. PARAMETER (ORDBKW = 8)
  898. * ORDINAL FOR THE BKW KEY
  899. PARAMETER (ORDSTOP = 4)
  900. * ORDINAL FOR THE STOP KEY
  901.  
  902. CHARACTER*7 PANEL1
  903. * FIRST HELP PANEL
  904. CHARACTER*7 PANEL2
  905. * SECOND HELP PANEL
  906. CHARACTER*1 PANELIO
  907. * OUTPUT STRING FOR THE PANEL
  908. INTEGER ORDINAL
  909. * SCREEN FORMATTING KEY ORDINAL
  910. INTEGER STAT
  911. * *SFOPEN* RETURN STATUS
  912. INTEGER TYPE
  913. * SCREEN FORMATTING KEY TYPE
  914.  
  915. DATA PANEL1 / 'KEYPAN1' /
  916. DATA PANEL2 / 'KEYPAN2' /
  917.  
  918. 10 FORMAT(' PLEASE ENTER THE SYSTEM COMMAND: SCREEN,721.',
  919. ./' AND RE-ENTER THE KEY COMMAND.')
  920.  
  921.  
  922. * SHOW HELP PANELS.
  923.  
  924. 100 CALL SFOPEN(PANEL1, STAT)
  925. IF (STAT .NE. 0) THEN
  926. WRITE(2,10)
  927. CALL ERR
  928. STOP 'SF ERROR.'
  929. ENDIF
  930. CALL SFSSHO(PANEL1, PANELIO,PANELIO)
  931. CALL SFGETK(TYPE,ORDINAL)
  932. CALL SFCLOS(PANEL1, 0)
  933. IF ((TYPE .EQ. 1) .AND. (ORDINAL .EQ. ORDSTOP)) RETURN
  934. CALL SFOPEN(PANEL2, STAT)
  935. IF (STAT .NE. 0) THEN
  936. WRITE(2,10)
  937. CALL ERR
  938. STOP 'SF ERROR.'
  939. ENDIF
  940. CALL SFSSHO(PANEL2, PANELIO,PANELIO)
  941. CALL SFCLOS(PANEL2, 1)
  942. CALL SFGETK(TYPE,ORDINAL)
  943. CALL SFCLOS(PANEL2, 0)
  944. IF ((TYPE .EQ. 1) .AND. (ORDINAL .EQ. ORDBKW)) GOTO 100
  945. RETURN
  946. END
  947.  
  948.  
  949. SUBROUTINE LDSETUP
  950.  
  951. ** LDSETUP - SET UP TERMINAL CHARACTERISTICS.
  952. *
  953. * *LDSETUP* SETS THE TERMINAL CHARACTERISTICS FOR THE NUMBER PAD,
  954. * SCREEN MODE, AND THE NUMBER OF CHARACTERS PER LINE.
  955. *
  956. * CALL LDSETUP
  957. *
  958. * CALLS PACK, SEQPACK.
  959. *
  960. * NOTE *RDSORC* MUST BE CALLED BEFORE THIS CODE IS PROCESSED TO
  961. * ENSURE THAT THE PROPER TERMINAL DEFINITIONS ARE LOADED.
  962.  
  963.  
  964. IMPLICIT INTEGER (A - Z)
  965.  
  966. PARAMETER (KEYL = 45)
  967. * NUMBER OF PROGRAMMABLE FUNCTION KEYS
  968.  
  969. BOOLEAN ZCARRET
  970. * HEX CODE FOR CARRIAGE RETURN
  971. BOOLEAN ZNUMCHR(3)
  972. * HEX SEQUENCE FOR CHARACTERS PER LINE
  973. BOOLEAN ZNUMPAD(3)
  974. * HEX SEQUENCE FOR NUMBER PAD CONDITION
  975. BOOLEAN ZOFFSET
  976. * HEX CODE FOR ADDRESS OFFSET
  977. BOOLEAN ZMODE
  978. * HEX CODE FOR SCREEN MODE
  979. BOOLEAN ZROLL
  980. * HEX CODE FOR ROLL PAGE MODE
  981. BOOLEAN ZSHIFT
  982. * HEX CODE FOR SHIFTED NUMERIC PAD CODE
  983. BOOLEAN Z132
  984. * HEX CODE FOR 132 CHARACTERS PER LINE
  985. CHARACTER*7 FILENM
  986. * FILE NAME OF KEY DEFINITIONS
  987. CHARACTER*67 KEYS(KEYL)
  988. * FUNCTION KEY DEFINTIONS
  989. CHARACTER*7 SETDATA(3)
  990. * TERMINAL SETUP DATA
  991. CHARACTER*7 STRDEF
  992. * DEFAULT STRING
  993. CHARACTER*7 STRROL
  994. * ROLL STRING
  995. CHARACTER*7 STRSHI
  996. * SHIFTED STRING
  997. CHARACTER*7 STR132
  998. * 132 STRING
  999. LOGICAL DEFNCHR
  1000. * DEFAULT NUMBER OF CHARACTERS PER LINE
  1001. LOGICAL DEFNPAD
  1002. * DEFAULT NUMERIC PAD SETTING
  1003. LOGICAL DEFPAGE
  1004. * DEFAULT PAGINATION SETTING
  1005.  
  1006. COMMON / INFO / KEYS, FILENM, SETDATA
  1007.  
  1008. DATA ZCARRET / Z"0D" /
  1009. DATA ZNUMCHR / Z"1E", Z"12", Z"48" /
  1010. DATA ZNUMPAD / Z"1E", Z"12", Z"6C" /
  1011. DATA ZOFFSET / Z"800" /
  1012. DATA ZMODE / Z"16" /
  1013. DATA ZROLL / Z"12" /
  1014. DATA ZSHIFT / Z"6B" /
  1015. DATA Z132 / Z"47" /
  1016. DATA STRDEF / 'DEFAULT' /
  1017. DATA STRROL / 'ROLL ' /
  1018. DATA STRSHI / 'SHIFTED' /
  1019. DATA STR132 / '132 ' /
  1020. DATA DEFNCHR / .TRUE. /
  1021. DATA DEFNPAD / .TRUE. /
  1022. DATA DEFPAGE / .TRUE. /
  1023.  
  1024. IF(SETDATA(1).NE. STRDEF) DEFNPAD = .FALSE.
  1025. IF(SETDATA(2).NE. STRDEF) DEFPAGE = .FALSE.
  1026. IF(SETDATA(3).NE. STRDEF) DEFNCHR = .FALSE.
  1027.  
  1028. IF (.NOT.(DEFNPAD .AND. DEFPAGE .AND. DEFNCHR)) THEN
  1029. CALL PACK(1, 0)
  1030. ELSE
  1031. RETURN
  1032. ENDIF
  1033.  
  1034. IF (.NOT.DEFNPAD) THEN
  1035. IF(SETDATA(1) .EQ. STRSHI) ZNUMPAD(3) = ZSHIFT
  1036. CALL SEQPACK(ZNUMPAD, 3)
  1037. ENDIF
  1038.  
  1039. IF (.NOT.DEFPAGE) THEN
  1040. IF(SETDATA(2) .EQ. STRROL) ZMODE = ZROLL
  1041. CALL PACK(2, ZOFFSET + ZMODE)
  1042. ENDIF
  1043.  
  1044. IF (.NOT.DEFNCHR) THEN
  1045. IF(SETDATA(3) .EQ. STR132) ZNUMCHR(3) = Z132
  1046. CALL SEQPACK(ZNUMCHR, 3)
  1047. ENDIF
  1048.  
  1049. IF (.NOT.(DEFNPAD .AND. DEFPAGE .AND. DEFNCHR)) THEN
  1050.  
  1051. * SEND A CARRIAGE RETURN IF A SEQUENCE WAS SENT TO THE TERMINAL.
  1052.  
  1053. CALL PACK(2, ZOFFSET + ZCARRET)
  1054. CALL PACK(3, 1)
  1055. ENDIF
  1056. RETURN
  1057. END
  1058.  
  1059.  
  1060. SUBROUTINE LOAD
  1061.  
  1062. ** LOAD - LOAD DEFINITIONS INTO TERMINAL.
  1063. *
  1064. * *LOAD* LOADS THE TERMINAL WITH BOTH FUNCTION KEY DEFINITIONS
  1065. * AND LABELS, AND MODIFIES TERMINAL CHARACTERISTICS.
  1066. *
  1067. * CALL LOAD
  1068. *
  1069. * CALLS CLEAR, LDSETUP, RDSORC, SEND.
  1070. *
  1071. * MESSAGES
  1072. * FUNCTION KEYS HAVE BEEN LOADED.
  1073.  
  1074.  
  1075. IMPLICIT INTEGER (A - Z)
  1076.  
  1077. 10 FORMAT(' FUNCTION KEYS HAVE BEEN LOADED.')
  1078.  
  1079. * READ SOURCE FILE INTO COMMON BLOCK.
  1080.  
  1081. CALL RDSORC
  1082.  
  1083. * CLEAR FUNCTION KEYS OF PREVIOUS DEFINITIONS.
  1084.  
  1085. CALL CLEAR
  1086.  
  1087. * DOWNLINE LOAD CURRENT DEFINITIONS INTO TERMINAL.
  1088.  
  1089. CALL SEND
  1090.  
  1091. * CHANGE THE SPECIFIED TERMINAL CHARACTERISTICS.
  1092.  
  1093. CALL LDSETUP
  1094. WRITE (2,10)
  1095. ENDFILE 2
  1096. RETURN
  1097. END
  1098.  
  1099.  
  1100. SUBROUTINE PACK(CODE, BYTE)
  1101.  
  1102. ** PACK - PACK BUFFER AND WRITE TO TERMINAL.
  1103. *
  1104. * *PACK* PACKS 4 BYTES INTO A BUFFER AND WRITES
  1105. * THE BUFFER TO THE TERMINAL.
  1106. *
  1107. * CALL PACK(CODE, BYTE)
  1108. *
  1109. * ENTRY CODE = 1, FIRST BYTE IN BUFFER.
  1110. * = 2, BYTE TO PLACE IN BUFFER.
  1111. * = 3, LAST BYTE TO PLACE IN BUFFER.
  1112. *
  1113. * BYTE = Z80 BYTE TO BE PACKED AND WRITTEN TO TERMINAL.
  1114. *
  1115. * CALLS CONNEC.
  1116. *
  1117. * NOTES BUFFER FORMAT IS 00074---4---4---4---.
  1118. *
  1119. * MESSAGES
  1120. * NO KEYS SPECIFIED.
  1121. * NO KEYS WERE SPECIFIED TO BE SENT.
  1122. * BUFFER OVERFLOW IN PACK.
  1123. * BUFFER SIZE EXCEEDED LIMITS.
  1124.  
  1125.  
  1126. IMPLICIT INTEGER (A - Z)
  1127.  
  1128. PARAMETER (NUMKEYS = 45)
  1129. * NUMBER OF DEFINABLE KEYS
  1130. PARAMETER (STORCHR = 70)
  1131. * STORED CHARACTERS PER DEFINITION
  1132. PARAMETER (SIZE = (NUMKEYS * STORCHR) + 200)
  1133. * BUFFER SIZE
  1134.  
  1135. DIMENSION BUF(SIZE)
  1136. * OUTPUT BUFFER
  1137. INTEGER BYT
  1138. * Z80 CODE DIVIDER
  1139. INTEGER BYTE
  1140. * Z80 BYTE CODE
  1141. INTEGER PTR
  1142. * INDEX FOR *BUF*
  1143.  
  1144. * PACK *BYTE* INTO BUFFER FOR GIVEN *CODE*.
  1145.  
  1146. GOTO (100, 200, 300), CODE
  1147.  
  1148. * CODE = 1. SET UP INITIAL CODE IN BUFFER.
  1149.  
  1150. 100 PTR = 0
  1151. BYT = 0
  1152. BYTE = 07
  1153.  
  1154. * CODE = 2. PACK DATA INTO BUFFER.
  1155.  
  1156. 200 BYT = BYT - 1
  1157.  
  1158. IF(BYT .LT. 0) THEN
  1159. BYT = 4
  1160. PTR = PTR + 1
  1161. BUF(PTR) = 0
  1162. ENDIF
  1163.  
  1164. BUF(PTR) = OR(BUF(PTR), SHIFT(BYTE, BYT*12))
  1165. RETURN
  1166.  
  1167. * CHECK FOR ERRORS BEFORE STARTING I/O.
  1168.  
  1169. 300 IF(PTR .LT. 1) STOP ' NO KEYS SPECIFIED.'
  1170.  
  1171. IF(PTR .GT. SIZE) STOP ' BUFFER OVERFLOW IN PACK '
  1172.  
  1173. * OUTPUT INFORMATION WITHOUT HEADER BYTES.
  1174.  
  1175. CALL CONNEC(3)
  1176. BUFFER OUT(3, 0) (BUF(1), BUF(PTR))
  1177.  
  1178. * LOOP UNTIL I/O COMPLETES.
  1179.  
  1180. IF(UNIT(3))310,320,320
  1181. 310 CONTINUE
  1182. 320 CONTINUE
  1183. RETURN
  1184. END
  1185.  
  1186.  
  1187. SUBROUTINE PRINT
  1188.  
  1189. ** PRINT - PRINT FUNCTION KEYS TO SPECIFIED FILE.
  1190. *
  1191. * *PRINT* COPIES ALL DEFINED FUNCTION KEYS FROM THE SPECIFIED FILE
  1192. * TO THE LOCAL FILE *KEYPRNT*.
  1193. *
  1194. * CALL PRINT
  1195. *
  1196. * CALLS RDSORC.
  1197. *
  1198. * MESSAGES
  1199. * THE LIST OF DEFINED FUNCTION KEYS IS ON THE LOCAL
  1200. * FILE *KEYPRNT*.
  1201.  
  1202.  
  1203. IMPLICIT INTEGER (A - Z)
  1204.  
  1205. PARAMETER (NKEYS = 45)
  1206. * NUMBER OF DEFINABLE FUNCTION KEYS
  1207. PARAMETER (NKEY = 15)
  1208. * NUMBER OF KEYS PER SECTION OF *KEYS*
  1209. PARAMETER (NPAN = 3)
  1210. * NUMBER OF SECTIONS IN *KEYS*
  1211.  
  1212. CHARACTER*7 FILENM
  1213. * KEY DEFINITIONS FILE
  1214. CHARACTER*5 LABELS(NPAN, NKEY)
  1215. * FUNCTION KEY LABELS
  1216. CHARACTER*67 KEYS(NKEYS)
  1217. * FUNCTION KEY DEFINITIONS
  1218. CHARACTER*7 SETDATA(3)
  1219. * SETUP TERMINAL CHARACTERISTICS
  1220.  
  1221. COMMON / INFO / KEYS, FILENM, SETDATA
  1222.  
  1223. DATA (LABELS(1, I), I = 1, NKEY) /
  1224. . 'F1 ', 'F2 ', 'F3 ', 'F4 ', 'F5 '
  1225. ., 'F6 ', 'F7 ', 'F8 ', 'F9 ', 'F10 '
  1226. ., 'F11 ', 'F12 ', 'F13 ', 'F14 ', 'F15 '
  1227. ./
  1228. DATA (LABELS(2, I), I = 1, NKEY) /
  1229. . 'RTAB ', 'LTAB ', 'NEXT ', 'DOWN ', 'UP '
  1230. ., 'FWD ', 'BKW ', 'HELP ', 'ERASE ', 'EDIT '
  1231. ., 'BACK ', 'LAB ', 'DATA ', 'STOP ', 'INSRT '
  1232. ./
  1233. DATA (LABELS(3, I), I = 1, NKEY) /
  1234. . 'DLETE', 'CLEAR', 'PRINT', 'PAD 1 ', 'PAD 2 '
  1235. ., 'PAD 3', 'PAD 4', 'PAD 5', 'PAD 6 ', 'PAD 7 '
  1236. ., 'PAD 8', 'PAD 9', 'PAD 0', 'PAD , ', 'PAD . '
  1237. ./
  1238.  
  1239. 10 FORMAT(5X, 'KEY DEFINITION UTILITY.',//
  1240. .3X,'KEY LABEL KEY DEFINITIONS'/
  1241. .3X,'--- ----- ---------------')
  1242. 11 FORMAT(1X, A7, 1X, A7, 1X, A60)
  1243. 12 FORMAT(' THE LIST OF DEFINED FUNCTION KEYS IS ON THE',
  1244. .' LOCAL FILE *KEYPRNT*.')
  1245. 13 FORMAT(/7X,'TERMINAL CHARACTERISTICS',/
  1246. .7X,'-------- ---------------',/
  1247. .9X,'NUMBER PAD - ',A7,/9X,'SCREEN MODE - ',A7/
  1248. .9X,'CHARS./ LINE - ',A7)
  1249.  
  1250. * GET FILE AND OUTPUT USER DEFINED FUNCTION KEYS.
  1251.  
  1252. CALL RDSORC
  1253. REWIND 6
  1254. WRITE(6, 10)
  1255. DO 110 I = 1, NPAN
  1256. DO 100 J = 1, NKEY
  1257. IF(I .EQ. 1) THEN
  1258. IF(KEYS(J)(1:7) .NE. ' ') THEN
  1259. WRITE(6,11) LABELS(I,J), KEYS(J)(1:7),
  1260. . KEYS(J)(8:67)
  1261. ENDIF
  1262. ENDIF
  1263. IF(I .EQ. 2) THEN
  1264. IF(KEYS(J + 15)(1:7) .NE. ' ') THEN
  1265. WRITE(6,11) LABELS(I,J), KEYS(J+15)(1:7),
  1266. . KEYS(J+15)(8:67)
  1267. ENDIF
  1268. ENDIF
  1269. IF(I .EQ. 3) THEN
  1270. IF(KEYS(J + 30)(1:7) .NE. ' ') THEN
  1271. WRITE(6, 11) LABELS(I, J), KEYS(J+30)(1:7),
  1272. . KEYS(J+30)(8:67)
  1273. ENDIF
  1274. ENDIF
  1275. 100 CONTINUE
  1276. 110 CONTINUE
  1277.  
  1278. * OUTPUT USER DEFINED TERMINAL SETUP CHARACTERISTICS.
  1279.  
  1280. WRITE(6,13) SETDATA
  1281. REWIND 6
  1282. WRITE(2,12)
  1283. ENDFILE 2
  1284. RETURN
  1285. END
  1286.  
  1287.  
  1288. SUBROUTINE SEND
  1289.  
  1290. ** SEND - TRANSFER KEY DEFINITIONS FROM SYSTEM INTO TERMINAL.
  1291. *
  1292. * *SEND* TRANSFERS THE KEY DEFINITIONS, KEY LABELS, AND Z80
  1293. * ROUTINES INTO THE TERMINAL.
  1294. *
  1295. * CALL SEND
  1296. *
  1297. * CALLS BYTE, PACK, ZSNDADD, ZSNDCHR, Z80CODE.
  1298.  
  1299.  
  1300. IMPLICIT INTEGER (A - Z)
  1301.  
  1302. PARAMETER (NKEYS = 45)
  1303. * NUMBER OF DEFINABLE FUNCTION KEYS
  1304.  
  1305. BOOLEAN ZBASE
  1306. * HEX CODE FOR KEY TABLE OFFSET
  1307. BOOLEAN ZCARRET(1)
  1308. * HEX CODE FOR CARRIAGE RETURN
  1309. BOOLEAN ZDEFKEY(4)
  1310. * HEX SEQUENCE TO DEFINE FUNCTION KEY
  1311. BOOLEAN ZDISKEY(3)
  1312. * HEX SEQUENCE TO DISABLE KEYBOARD ENTRY
  1313. BOOLEAN ZDISRET(3)
  1314. * HEX SEQUENCE TO DISABLE CARRIAGE RETURN
  1315. BOOLEAN ZECHO
  1316. * HEX CODE FOR ECHO
  1317. BOOLEAN ZECHOFF
  1318. * HEX CODE FOR ECHO OFF
  1319. BOOLEAN ZECHON
  1320. * HEX CODE FOR ECHO ON
  1321. BOOLEAN ZENBIAS(2)
  1322. * HEX SEQUENCE TO ENABLE BIAS
  1323. BOOLEAN ZENRETN(2)
  1324. * HEX SEQUENCE TO ENABLE CARRIAGE RETURN
  1325. BOOLEAN ZENKEYB(3)
  1326. * HEX SEQUENCE TO ENABLE KEYBOARD ENTRY
  1327. BOOLEAN ZTRMKEY(2)
  1328. * HEX SEQUENCE TO TERMINATE KEY DEFINITIONS
  1329. CHARACTER*7 FILENM
  1330. * KEY DEFINITIONS FILE
  1331. CHARACTER*67 KEYS(NKEYS)
  1332. * FUNCTION KEY DEFINITIONS
  1333. CHARACTER*7 SETDATA(3)
  1334. * SETUP DATA
  1335. INTEGER ASCII
  1336. * Z80 CHARACTER
  1337. INTEGER LASTNB
  1338. * LAST NON-BLANK CHARACTER
  1339.  
  1340. COMMON / INFO / KEYS, FILENM, SETDATA
  1341.  
  1342. DATA ADDR / Z"C002"/
  1343. DATA ADDL / Z"C000"/
  1344. DATA ZBASE / Z"30" /
  1345. DATA ZCARRET / Z"0D" /
  1346. DATA ZDEFKEY / Z"1E", Z"09", Z"30", Z"34" /
  1347. DATA ZDISKEY / Z"1E", Z"12", Z"4D" /
  1348. DATA ZDISRET / Z"1E", Z"12", Z"5A" /
  1349. DATA ZECHON / Z"34" /
  1350. DATA ZECHOFF / Z"31" /
  1351. DATA ZENBIAS / Z"1E", Z"30" /
  1352. DATA ZENRETN / Z"1E", Z"05" /
  1353. DATA ZENKEYB / Z"1E", Z"12", Z"4E" /
  1354. DATA ZFEED / Z"0A" /
  1355. DATA ZTRMKEY / Z"2F", Z"6F"/
  1356.  
  1357.  
  1358. CALL PACK(1, 0)
  1359.  
  1360. * LOCK THE KEYBOARD DURING WHILE SENDING DATA TO TERMINAL.
  1361.  
  1362. CALL SEQPACK(ZDISKEY,3)
  1363.  
  1364. * DISABLE *CR* ON FUNCTION KEYS AND ENABLE BIAS.
  1365.  
  1366. CALL SEQPACK(ZDISRET,3)
  1367. CALL SEQPACK(ZENBIAS,2)
  1368.  
  1369. * PROCESS EACH FUNCTION KEY'S DEFINITION. IF LAST CHARACTER IN THE
  1370. * DEFINITION FIELD IS AN * (ASTERISK), TURN ECHO ON.
  1371.  
  1372. DO 260 I = 1, NKEYS
  1373. IF((KEYS(I)(8:8).EQ. ';') .OR. (KEYS(I)(8:8).EQ. ' ')) GOTO 260
  1374. IF(KEYS(I)(67:67).EQ. '*') THEN
  1375. ZECHO = ZECHON
  1376. ELSE
  1377. ZECHO = ZECHOFF
  1378. ENDIF
  1379. ZDEFKEY(3) = ZBASE + I
  1380. ZDEFKEY(4) = ZECHO
  1381. CALL SEQPACK(ZDEFKEY,4)
  1382. CALL ZSNDADD(ADDR)
  1383.  
  1384. * GET ACTUAL CHARACTERS FOR THE DEFINITION.
  1385.  
  1386. LEN = 0
  1387. IF((KEYS(I)(8:8) .EQ. 'Z') .AND. (KEYS(I)(9:9) .EQ. '"')) THEN
  1388.  
  1389. DO 210 J = 10, 67, 2
  1390. K = J + 1
  1391. IF(KEYS(I)(J:J) .EQ. '"') GOTO 220
  1392. IF(KEYS(I)(K:K) .EQ. '"') GOTO 220
  1393. IF(KEYS(I)(J:J) .LE. '9') C1=ICHAR(KEYS(I)(J:J))-Z"10"
  1394. IF(KEYS(I)(J:J) .GE. 'A') C1=ICHAR(KEYS(I)(J:J))-Z"20"+09
  1395. IF(KEYS(I)(K:K) .LE. '9') C2=ICHAR(KEYS(I)(K:K))-Z"10"
  1396. IF(KEYS(I)(K:K) .GE. 'A') C2=ICHAR(KEYS(I)(K:K))-Z"20"+09
  1397. ASCII = C1*16+C2
  1398. CALL ZSNDCHR(ASCII)
  1399. 210 CONTINUE
  1400.  
  1401. J = 68
  1402. 220 J = K
  1403.  
  1404. * PROCESSING CHARACTER DATA.
  1405.  
  1406. ELSE
  1407.  
  1408. * COUNT TRAILING BLANKS.
  1409.  
  1410. DO 225 J = 66, 8, -1
  1411. IF(KEYS(I)(J:J) .NE. ' ') THEN
  1412. LASTNB = J
  1413. GOTO 227
  1414. ENDIF
  1415. 225 CONTINUE
  1416.  
  1417. 227 DO 230 J = 8, MIN(66, LASTNB)
  1418. K = J + 1
  1419. IF(KEYS(I)(J:J) .EQ. '!'.AND.((KEYS(I)(K:K) .EQ. ' ')
  1420. . .OR.(K .EQ. 67))) GOTO 240
  1421. IF(KEYS(I)(J:J) .EQ. ';') GOTO 250
  1422. IF(KEYS(I)(J:J) .EQ. '!') THEN
  1423. CALL ZSNDCHR(ZCARRET)
  1424. IF(KEYS(I)(67:67) .EQ. '*') THEN
  1425. CALL ZSNDCHR(ZFEED)
  1426. LEN = LEN + 1
  1427. ENDIF
  1428. ELSE
  1429. ASCII = ICHAR(KEYS(I)(J:J)) + Z"20"
  1430. CALL ZSNDCHR(ASCII)
  1431. ENDIF
  1432. 230 CONTINUE
  1433.  
  1434. J = 67
  1435. 240 CALL ZSNDCHR(ZCARRET)
  1436. J = J + 1
  1437. ENDIF
  1438.  
  1439. 250 LEN = LEN + J - 8
  1440. CALL SEQPACK(ZTRMKEY,2)
  1441. CALL SEQPACK(ZCARRET,1)
  1442. ADDR = ADDR + LEN + 1
  1443. 260 CONTINUE
  1444.  
  1445. * SET UP AN ADDRESS IN THE 721 TO STORE THE KEY LABELS TO BE USED BY
  1446. * THE *DISPLAY* OPTION.
  1447.  
  1448. ZDEFKEY(3) = Z"74"
  1449. ZDEFKEY(4) = Z"31"
  1450. CALL SEQPACK(ZDEFKEY,4)
  1451. CALL ZSNDADD(ADDR)
  1452.  
  1453. * STORE THE F1 - F15 KEY LABELS IN THE TERMINAL.
  1454.  
  1455. DO 280 I = 1, 15
  1456. DO 270 J = 1, 7
  1457. ASCII = ICHAR(KEYS(I)(J:J)) + Z"20"
  1458. CALL ZSNDCHR(ASCII)
  1459. 270 CONTINUE
  1460. 280 CONTINUE
  1461.  
  1462. * STORE THE 'LAB' LABEL AS F16 IN THE TERMINAL.
  1463.  
  1464. DO 290 I = 1, 7
  1465. ASCII = ICHAR(KEYS(27)(I:I)) + Z"20"
  1466. CALL ZSNDCHR(ASCII)
  1467. 290 CONTINUE
  1468.  
  1469. * TERMINATE KEY DEFINITIONS.
  1470.  
  1471. CALL SEQPACK(ZTRMKEY,2)
  1472. CALL SEQPACK(ZCARRET,1)
  1473. ADDR = (ADDR + (7*16) + 1) - ADDL
  1474.  
  1475. * SEND LENGTH OF CHARACTER LOAD TO BASE ADDRESS *ADDL*.
  1476.  
  1477. ZDEFKEY(3) = Z"70"
  1478. ZDEFKEY(4) = Z"32"
  1479. CALL SEQPACK(ZDEFKEY,4)
  1480. CALL ZSNDADD(ADDL)
  1481. CALL ZSNDADD(ADDR)
  1482. CALL SEQPACK(ZCARRET,1)
  1483.  
  1484. * ENABLE KEYBOARD ENTRY.
  1485.  
  1486. CALL Z80CODE
  1487. CALL SEQPACK(ZENKEYB,3)
  1488. CALL PACK(3, 1)
  1489. RETURN
  1490. END
  1491.  
  1492.  
  1493.  
  1494. SUBROUTINE SEQPACK(SEQUENC,NBYTES)
  1495.  
  1496. ** SEQPACK - PACKS THE GIVEN SEQUENCE INTO A BUFFER FOR OUTPUT.
  1497. *
  1498. * *SEQPACK* PACKS THE GIVEN SEQUENCE INTO THE OUTPUT BUFFER VIA
  1499. * THE *PACK* ROUTINE.
  1500. *
  1501. * CALL SEQPACK(SEQUENC,NBYTES)
  1502. *
  1503. * ENTRY SEQUENC = ARRAY OF BOOLEAN HEX CODES.
  1504. * NBYTES = LENGTH OF HEX CODE ARRAY.
  1505. *
  1506. * CALLS PACK.
  1507.  
  1508. IMPLICIT INTEGER (A - Z)
  1509.  
  1510. PARAMETER (MAXBYTS = 5)
  1511. * MAXIMUM LENGTH OF *SEQUENC*
  1512.  
  1513. BOOLEAN OFFSET
  1514. * OFFSET FOR Z80 PROCESSING
  1515. BOOLEAN SEQUENC(MAXBYTS)
  1516. * ARRAY OF BOOLEAN HEX CODES
  1517. INTEGER NBYTES
  1518. * LENGTH OF HEX CODE ARRAY
  1519.  
  1520. DATA OFFSET / Z"800" /
  1521.  
  1522.  
  1523. DO 100 I = 1, NBYTES
  1524. CALL PACK(2, OFFSET + SEQUENC(I))
  1525. 100 CONTINUE
  1526.  
  1527. RETURN
  1528. END
  1529.  
  1530.  
  1531. SUBROUTINE SYSKEYS
  1532.  
  1533. ** SYSKEYS - SET SYSTEM DEFAULTS FOR KEYS AND SETUP CHARACTERISTICS.
  1534. *
  1535. * *SYSKEYS* INITIALIZES *KEYS* AND TERMINAL SETUP CHARACTERISTICS
  1536. * WITH THE SYSTEM DEFAULTS.
  1537. *
  1538. * CALL SYSKEYS
  1539. *
  1540. * USES KEYS, SETDATA.
  1541.  
  1542.  
  1543. IMPLICIT INTEGER (A - Z)
  1544.  
  1545. PARAMETER (NKEYS = 45)
  1546. * NUMBER OF DEFINABLE FUNCTION KEYS
  1547.  
  1548. BOOLEAN KHELP
  1549. * HEX CODE FOR HELP KEY
  1550. BOOLEAN KEDIT
  1551. * HEX CODE FOR EDIT KEY
  1552. BOOLEAN KSTOP
  1553. * HEX CODE FOR STOP KEY
  1554. BOOLEAN ZBASE
  1555. * HEX CODE FOR BASE OFFSET OF KEY TABLE
  1556. CHARACTER*7 FILENM
  1557. * KEY DEFINITIONS FILE
  1558. CHARACTER*67 KEYS(NKEYS)
  1559. * FUNCTION KEY DEFINITIONS
  1560. CHARACTER*7 SETDATA(3)
  1561. * TERMINAL SETUP DATA
  1562. CHARACTER*7 STRDEF
  1563. * DEFAULT STRING
  1564. CHARACTER*7 STRHLP
  1565. * HELP STRING
  1566. CHARACTER*7 STRHL1
  1567. * HELP WITH CARRIAGE RETURN STRING
  1568. CHARACTER*7 STREDT
  1569. * EDIT STRING
  1570. CHARACTER*7 STRFSE
  1571. * FSE WITH CARRIAGE RETURN STRING
  1572. CHARACTER*7 STRSTP
  1573. * STOP STRING
  1574. CHARACTER*7 STRCTT
  1575. * CONTROL-T STOP STRING
  1576.  
  1577. COMMON / INFO / KEYS, FILENM, SETDATA
  1578.  
  1579. DATA KHELP / Z"47" /
  1580. DATA KEDIT / Z"49" /
  1581. DATA KSTOP / Z"4D" /
  1582. DATA ZBASE / Z"30" /
  1583. DATA STRDEF / 'DEFAULT' /
  1584. DATA STRHLP / 'HELP ' /
  1585. DATA STRHL1 / 'HELP! ' /
  1586. DATA STREDT / 'EDIT ' /
  1587. DATA STRFSE / 'FSE! ' /
  1588. DATA STRSTP / 'STOP ' /
  1589. DATA STRCTT / 'Z"140D"' /
  1590.  
  1591.  
  1592. * INITIALIZE *KEYS*.
  1593.  
  1594. DO 100 I = 1, NKEYS
  1595. KEYS(I) = ' '
  1596. 100 CONTINUE
  1597.  
  1598. * INITIALIZE *SETDATA*.
  1599.  
  1600. SETDATA(1) = STRDEF
  1601. SETDATA(2) = STRDEF
  1602. SETDATA(3) = STRDEF
  1603.  
  1604. * STORE LABEL AND KEY DEFINITION FOR EACH *KEYS(I)*.
  1605. * EACH *KEYS(I)* = 7/LABEL, 60/DEFINITION.
  1606.  
  1607. KEYS(KHELP - Z"30")(1:07) = STRHLP
  1608. KEYS(KHELP - Z"30")(8:67) = STRHLP
  1609. KEYS(KEDIT - Z"30")(1:07) = STREDT
  1610. KEYS(KEDIT - Z"30")(8:67) = STRFSE
  1611. KEYS(KSTOP - Z"30")(1:07) = STRSTP
  1612. KEYS(KSTOP - Z"30")(8:67) = STRCTT
  1613. RETURN
  1614. END
  1615.  
  1616.  
  1617. SUBROUTINE VERLOAD(LOADED)
  1618.  
  1619. ** VERLOAD - VERIFY THAT TERMINAL HAS LOADED CONTROLWARE.
  1620. *
  1621. * *VERLOAD* INITIATES A LOADED CONTROLWARE SEQUENCE FOLLOWED BY A
  1622. * MODEL REPORT REQUEST (WHICH IS ALWAYS PRESENT ON A 721 TERMINAL).
  1623. * IF THE FIRST ITEM THAT COMES BACK IS THE MODEL REPORT REQUEST
  1624. * DATA, THEN THERE WAS NO LOADED CONTROLWARE PRESENT.
  1625. *
  1626. * CALL VERLOAD(LOADED)
  1627. *
  1628. * EXIT *LOADED* IS SET IF LOADED CONTROLWARE IS PRESENT.
  1629. *
  1630. * CALLS PACK, SEQPACK.
  1631.  
  1632.  
  1633. IMPLICIT INTEGER (A - Z)
  1634.  
  1635. BOOLEAN OUT
  1636. * OCTAL CODE TO INITIATE TRANSPARENT MODE
  1637. BOOLEAN ZDISKEY(3)
  1638. * HEX SEQUENCE TO DISABLE KEYBOARD ENTRY
  1639. BOOLEAN ZENKEYB(3)
  1640. * HEX SEQUENCE TO ENABLE KEYBOARD ENTRY
  1641. BOOLEAN ZHOSTLC(3)
  1642. * HEX SEQUENCE FOR HOST LOADED CONTROLWARE
  1643. BOOLEAN ZMODREP(3)
  1644. * HEX SEQUENCE FOR MODEL REPORT REQUEST
  1645. CHARACTER*2 CTRLT
  1646. * CONTROL-T TERMINATION SEQUENCE
  1647. CHARACTER*5 MODREP
  1648. * TERMINAL MODEL REPORT
  1649. CHARACTER*7 VERSTR
  1650. * VERIFICATION STRING IF TERMINAL LOADED
  1651. INTEGER IOS
  1652. * IOSTAT VALUE FROM FORMATTED READ
  1653. CHARACTER*112 OPRAM4
  1654. * 721 HEX SEQUENCE CODES
  1655. LOGICAL LOADED
  1656. * CONTROLWARE LOADED FLAG
  1657.  
  1658. DATA MODREP /'536.5'/
  1659. DATA VERSTR /'6A536.5'/
  1660. DATA CTRLT /'5T'/
  1661. DATA OUT /O"00060400001500000000"/
  1662. * OUT IS 1 WORD WITH THE DATA LEFT JUSTIFIED
  1663. * 0006 = INITIATES TRANSPARENT INPUT MODE
  1664. * 0400 = WORD LENGTH OF BLOCK TO TRANSMIT
  1665. * 0015 = DELIMITER OF A *CR*
  1666.  
  1667. DATA OPRAM4 / ' ' /
  1668. DATA ZDISKEY / Z"1E", Z"12", Z"4D" /
  1669. DATA ZENKEYB / Z"1E", Z"12", Z"4E" /
  1670. DATA ZHOSTLC / Z"1E", Z"12", Z"75" /
  1671. DATA ZMODREP / Z"1E", Z"43", Z"30" /
  1672.  
  1673. 11 FORMAT(A112)
  1674.  
  1675.  
  1676. * TURN OFF INPUT PROMPT AND INITIATE TRANSPARENT INPUT.
  1677.  
  1678. CALL PROMPT
  1679. CLOSE (2 ,STATUS = 'DELETE' )
  1680. OPEN (2, RECL=100, FILE='OUTPUT', FORM = 'UNFORMATTED')
  1681. 12 WRITE (2) OUT
  1682. CLOSE (2 ,STATUS = 'DELETE' )
  1683. OPEN (2, RECL=100, FILE='OUTPUT')
  1684.  
  1685.  
  1686. * GET FUNCTION KEY LABELS FROM THE 721.
  1687. * KEYBOARD MUST BE LOCKED WHILE 721 SENDS FUNCTION KEY DATA UPLINE.
  1688.  
  1689. CALL PACK(1, 0)
  1690. CALL SEQPACK(ZDISKEY,3)
  1691. CALL SEQPACK(ZHOSTLC,3)
  1692. CALL SEQPACK(ZMODREP,3)
  1693. CALL PACK(3, 1)
  1694.  
  1695. * CHECK IF THE MODEL REPORT COMES BACK FIRST. IF SO, KEYS HAVE NOT
  1696. * BEEN DEFINED. THE VALUE OF THE MODEL REPORT WILL NOT BE AFFECTED BY
  1697. * SYSTEM CHANGES.
  1698.  
  1699. READ(5,11,IOSTAT=IOS,ERR=14,END=14)OPRAM4
  1700.  
  1701. * CHECK IF TYPED-AHEAD INPUT ENTERED. NOTE THAT THE PROCESS LOOPS
  1702. * UNTIL ALL TYPED-AHEAD INPUT IS REMOVED, AND IS SATISFIED ONLY
  1703. * WHEN A CORRECT SEQUENCE IS RECEIVED FROM THE TERMINAL.
  1704.  
  1705. 13 IF (.NOT.((OPRAM4(3:7) .EQ. MODREP(1:5)).OR.
  1706. . (OPRAM4(3:5) .EQ. CTRLT(1:2)).OR.
  1707. . (OPRAM4(3:9) .EQ. VERSTR(1:7)))) THEN
  1708. GOTO 12
  1709. ENDIF
  1710. CALL PACK(1, 0)
  1711. CALL SEQPACK(ZENKEYB,3)
  1712. CALL PACK(3, 1)
  1713. IF(OPRAM4(3:7) .EQ. MODREP(1:5)) THEN
  1714. LOADED = .FALSE.
  1715. ELSE
  1716. LOADED = .TRUE.
  1717. ENDIF
  1718. RETURN
  1719.  
  1720. 14 REWIND 5
  1721. GOTO 13
  1722. END
  1723.  
  1724.  
  1725. SUBROUTINE WRSORC
  1726.  
  1727. ** WRSORC - WRITE KEY DEFINITIONS TO THE SOURCE FILE.
  1728. *
  1729. * *WRSORC* WILL WRITE THE KEY DEFINITIONS TO THE
  1730. * SOURCE FILE.
  1731. *
  1732. * CALL WRSORC
  1733. *
  1734. * CALLS PF.
  1735.  
  1736.  
  1737. IMPLICIT INTEGER (A - Z)
  1738.  
  1739. PARAMETER (NKEYS = 45)
  1740. * NUMBER OF DEFINABLE FUNCTION KEYS
  1741. PARAMETER (NSETUP = 3)
  1742. * NUMBER OF TERMINAL SETUP CHARACTERISTICS
  1743.  
  1744. CHARACTER*7 FILENM
  1745. * KEY DEFINITIONS FILE
  1746. CHARACTER*60 KEYDEF
  1747. * FUNCTION KEY DEFINITION
  1748. CHARACTER*67 KEYS(NKEYS)
  1749. * LABEL AND KEYDEF
  1750. CHARACTER*7 LABEL
  1751. * FUNCTION KEY LABEL
  1752. CHARACTER*7 SETDATA(3)
  1753. * SETUP TERMINAL CHARACTERISTICS
  1754.  
  1755. COMMON / INFO / KEYS, FILENM, SETDATA
  1756.  
  1757. 10 FORMAT(A7, 1X, A60)
  1758. 20 FORMAT(A7)
  1759.  
  1760.  
  1761. REWIND 1
  1762.  
  1763. * WRITE FUNCTION KEY DEFINITIONS TO FILE.
  1764.  
  1765. DO 210 I = 1, NKEYS
  1766. WRITE(1, 10) KEYS(I)(1:7), KEYS(I)(8:67)
  1767. 210 CONTINUE
  1768.  
  1769. * WRITE TERMINAL SETUP CHARACTERISTICS TO FILE.
  1770.  
  1771. DO 220 I = 1, NSETUP
  1772. WRITE(1, 20) SETDATA(I)
  1773. 220 CONTINUE
  1774.  
  1775. REWIND 1
  1776. CALL PF('REPLACE', 'TAPE1', FILENM, 'NA', IGNORE)
  1777. RETURN
  1778. END
  1779.  
  1780.  
  1781. SUBROUTINE ZSNDADD(ADDRESS)
  1782.  
  1783. ** ZSNDADD - FORMAT AND PACK Z80 ADDRESS INTO BUFFER.
  1784. *
  1785. * *ZSNDSEQ* FORMATS THE GIVEN ADDRESS INTO MODIFIED HEX
  1786. * FORMAT AND PACKS IT INTO THE BUFFER BEING SENT TO THE
  1787. * TERMINAL.
  1788. *
  1789. * CALL ZSNDADD(ADDRESS)
  1790. *
  1791. * ENTRY ADDRESS - Z80 ADDRESS IN TERMINAL MEMORY.
  1792. *
  1793. * CALLS PACK.
  1794.  
  1795.  
  1796. IMPLICIT INTEGER (A - Z)
  1797.  
  1798.  
  1799. BOOLEAN ADDRESS
  1800. * Z80 ADDRESS IN TERMINAL MEMORY
  1801.  
  1802.  
  1803. CALL BYTE(SHIFT(AND(ADDRESS, Z"FF00"), -8), U1ADDR, L1ADDR)
  1804. CALL BYTE(AND(ADDRESS, Z"00FF"), U2ADDR, L2ADDR)
  1805. CALL PACK(2, U1ADDR)
  1806. CALL PACK(2, L1ADDR)
  1807. CALL PACK(2, U2ADDR)
  1808. CALL PACK(2, L2ADDR)
  1809. RETURN
  1810. END
  1811.  
  1812.  
  1813. SUBROUTINE ZSNDCHR(ZCHAR)
  1814.  
  1815. ** ZSNDCHR - FORMAT AND PACK Z80 CHARACTER INTO BUFFER.
  1816. *
  1817. * *ZSNDCHR* FORMATS THE GIVEN Z80 CHARACTER INTO MODIFIED HEX
  1818. * FORMAT AND PACKS IT INTO THE BUFFER BEING SENT TO THE
  1819. * TERMINAL.
  1820. *
  1821. * CALL ZSNDCHR(ZCHAR)
  1822. *
  1823. * ENTRY ZCHAR - Z80 CHARACTER.
  1824. *
  1825. * CALLS PACK.
  1826.  
  1827.  
  1828. IMPLICIT INTEGER (A - Z)
  1829.  
  1830.  
  1831. INTEGER TEMP1
  1832. * Z80 UPPER BYTE
  1833. INTEGER TEMP2
  1834. * Z80 LOWER BYTE
  1835. INTEGER ZCHAR
  1836. * Z80 CHARACTER
  1837.  
  1838.  
  1839. CALL BYTE(ZCHAR, TEMP1, TEMP2)
  1840. CALL PACK(2, TEMP1)
  1841. CALL PACK(2, TEMP2)
  1842. RETURN
  1843. END
  1844.  
  1845.  
  1846. SUBROUTINE ZSNDSEQ(ZARRAY,ZLENGTH)
  1847.  
  1848. ** ZSNDSEQ - FORMAT AND PACK Z80 CODE SEQUENCE INTO BUFFER.
  1849. *
  1850. * *ZSNDSEQ* FORMATS THE Z80 CODE TO A MODIFIED HEX FORMAT
  1851. * AND THEN PACKS THE SEQUENCE INTO THE BUFFER THAT IS TO
  1852. * BE SENT TO THE TERMINAL.
  1853. *
  1854. * CALL ZSNDSEQ(ZARRAY,ZLENGTH)
  1855. *
  1856. * ENTRY ZARRAY - Z80 CODE ARRAY TO BE FORMATTED AND PACKED.
  1857. * ZLENGTH - LENGTH OF THE ARRAY(SEQUENCE).
  1858. *
  1859. * CALLS ZSNDCHR.
  1860.  
  1861.  
  1862. IMPLICIT INTEGER (A - Z)
  1863.  
  1864.  
  1865. PARAMETER (MAXSEQ = 50)
  1866. * MAXIMUM LENGTH OF SEQUENCE
  1867.  
  1868. BOOLEAN ZARRAY(MAXSEQ)
  1869. * Z80 CODE SEQUENCE
  1870. INTEGER ZLENGTH
  1871. * LENGTH OF THE Z80 CODE SEQUENCE
  1872.  
  1873.  
  1874. DO 100 I = 1, ZLENGTH
  1875. CALL ZSNDCHR(ZARRAY(I))
  1876. 100 CONTINUE
  1877. RETURN
  1878. END
  1879.  
  1880.  
  1881. SUBROUTINE Z80CODE
  1882.  
  1883. ** Z80CODE - LOAD Z80 CONTROLWARE INTO TERMINAL.
  1884. *
  1885. * *Z80CODE* STORES THE Z80 ROUTINES *PUSH*, *POP*,
  1886. * *RESET*, AND *LABEL* INTO THE TERMINAL, AND THEN
  1887. * DEFINES SEVERAL VIRTUAL KEYS WITH THE ADDRESSES OF
  1888. * THE LOADED CONTROLWARE. LATER, WHEN THE KEY IS
  1889. * INVOKED, THE TERMINAL KNOWS THAT IT CONTAINS THE
  1890. * ADDRESS OF THE LOADED CONTROLWARE, AND BEGINS
  1891. * EXECUTION OF THE LOADED Z80 ROUTINES.
  1892. *
  1893. * THE SOURCE FOR THE FOLLOWING HARDCODED ROUTINES IS
  1894. * CONTAINED ON THE MAINTENANCE PL AS DECKNAME *KEYUTIL*.
  1895. *
  1896. * TO REPRODUCE THE Z80 BINARY CODES, RUN THE Z80 VARIANT
  1897. * OF COMPASS AGAINST THE Z80 ROUTINES IN *KEYUTIL*, THEN
  1898. * HAND TRANSLATE THE CODE INTO THE ROUTINES BELOW.
  1899. *
  1900. * CALL Z80CODE
  1901. *
  1902. * CALLS PACK, SEQPACK.
  1903. *
  1904. * NOTES THE SOURCE FOR THE Z80 BINARY IS PROVIDED HERE. THIS
  1905. * SOURCE IS ASSEMBLED USING A Z80 ASSEMBLER, AND THE
  1906. * BINARY CODES PRODUCED ARE THEN PLACED INTO THE *FORTRAN*
  1907. * DATA STATEMENTS.
  1908.  
  1909.  
  1910. IMPLICIT INTEGER (A - Z)
  1911.  
  1912. PARAMETER (LZPUSH = 27)
  1913. * LENGTH OF THE Z80 PUSH ROUTINE
  1914. PARAMETER (LZPOP = 24)
  1915. * LENGTH OF THE Z80 POP ROUTINE
  1916. PARAMETER (LZRESET = 30)
  1917. * LENGTH OF THE Z80 RESET ROUTINE
  1918. PARAMETER (LZLABEL = 29)
  1919. * LENGTH OF THE Z80 LABEL ROUTINE
  1920. PARAMETER (LZVERFY = 6)
  1921. * LENGTH OF THE Z80 VERIFY ROUTINE
  1922. PARAMETER (LKEYC = 5)
  1923. * DIMENSION FOR THE *KEYC* ARRAY
  1924.  
  1925. BOOLEAN ZABSLOC
  1926. * ABSOLUTE LOCATION OF Z80 ROUTINES
  1927. BOOLEAN ZCARRET(1)
  1928. * HEX CODE FOR CARRIAGE RETURN
  1929. BOOLEAN ZCONSEQ(4)
  1930. * HEX SEQUENCE FOR CONTROLWARE SEQUENCE
  1931. BOOLEAN ZPUSH(LZPUSH)
  1932. * HEX ARRAY FOR PUSH ROUTINE
  1933. BOOLEAN ZPOP(LZPOP)
  1934. * HEX ARRAY FOR POP ROUTINE
  1935. BOOLEAN ZRESET(LZRESET)
  1936. * HEX ARRAY FOR RESET ROUTINE
  1937. BOOLEAN ZLABEL(LZLABEL)
  1938. * HEX ARRAY FOR LABEL ROUTINE
  1939. BOOLEAN ZVERFY(LZVERFY)
  1940. * HEX ARRAY FOR VERIFY ROUTINE
  1941. INTEGER KEYC(LKEYC, 2)
  1942. * ARRAY FOR Z80 CODE
  1943.  
  1944. DATA ZABSLOC / Z"D100" /
  1945. DATA ZCARRET / Z"0D" /
  1946. DATA ZCONSEQ / Z"1E", Z"09", Z"70", Z"32" /
  1947. DATA ZPUSH /
  1948.  
  1949. * Z80 ROUTINE TO PUSH FUNCTION KEY DEFINITION TABLE IN TERMINAL.
  1950.  
  1951. . Z"11", Z"76", Z"D1", Z"01", Z"F0", Z"00", Z"21", Z"E0", Z"D7"
  1952. ., Z"ED", Z"B0", Z"3A", Z"47", Z"E0", Z"32", Z"66", Z"D2", Z"3A"
  1953. ., Z"B9", Z"E0", Z"32", Z"67", Z"D2", Z"CD", Z"33", Z"D1", Z"C9"
  1954. ./
  1955.  
  1956. DATA ZPOP /
  1957.  
  1958. * Z80 ROUTINE TO POP FUNCTION KEY DEFINITION TABLE IN TERMINAL.
  1959.  
  1960. . Z"21", Z"76", Z"D1", Z"01", Z"F0", Z"00", Z"11", Z"E0", Z"D7"
  1961. ., Z"ED", Z"B0", Z"3A", Z"66", Z"D2", Z"32", Z"47", Z"E0", Z"3A"
  1962. ., Z"67", Z"D2", Z"32", Z"B9", Z"E0", Z"C9"
  1963. ./
  1964.  
  1965. DATA ZRESET /
  1966.  
  1967. * Z80 ROUTINE TO RESET FUNCTION KEY DEFINITION TABLE IN TERMINAL.
  1968.  
  1969. . Z"3A", Z"47", Z"E0", Z"F6", Z"02", Z"32", Z"47", Z"E0", Z"3E"
  1970. ., Z"00", Z"32", Z"B9", Z"E0", Z"01", Z"F3", Z"00", Z"0B", Z"0B"
  1971. ., Z"0B", Z"78", Z"B1", Z"C8", Z"21", Z"DD", Z"D7", Z"09", Z"36"
  1972. ., Z"30", Z"18", Z"F2"
  1973. ./
  1974.  
  1975. DATA ZLABEL /
  1976.  
  1977. * Z80 ROUTINE TO DISPLAY RESIDENT KEY LABELS.
  1978.  
  1979. . Z"3A", Z"DD", Z"D8", Z"67", Z"3A", Z"DE", Z"D8", Z"6F", Z"46"
  1980. ., Z"78", Z"FE", Z"FF", Z"CA", Z"68", Z"D1", Z"E5", Z"CD", Z"87"
  1981. ., Z"00", Z"E1", Z"23", Z"18", Z"F1", Z"06", Z"0D", Z"CD", Z"87"
  1982. ., Z"00", Z"C9"
  1983. ./
  1984.  
  1985. DATA ZVERFY /
  1986.  
  1987. * Z80 ROUTINE TO SEND VERIFICATION CHARACTER TO HOST.
  1988.  
  1989. . Z"06", Z"41", Z"CD", Z"87", Z"00", Z"C9" /
  1990.  
  1991. DATA (KEYC(I, 1), KEYC(I, 2), I = 1, LKEYC)/
  1992.  
  1993. * ADDRESS OF Z80 ROUTINE *PUSH* IS STORED IN KEY 70.
  1994.  
  1995. . Z"70", Z"D100"
  1996.  
  1997. * ADDRESS OF Z80 ROUTINE *POP* IS STORED IN KEY 71.
  1998.  
  1999. ., Z"71", Z"D11B"
  2000.  
  2001. * ADDRESS OF Z80 ROUTINE *RESET* IS STORED IN KEY 72.
  2002.  
  2003. ., Z"72", Z"D133"
  2004.  
  2005. * ADDRESS OF Z80 ROUTINE *LABEL* IS STORED IN KEY 73.
  2006.  
  2007. ., Z"73", Z"D151"
  2008.  
  2009. * ADDRESS OF Z80 ROUTINE *VERIFY* IS STORED IN KEY 75.
  2010.  
  2011. ., Z"75", Z"D16E"
  2012. ./
  2013.  
  2014.  
  2015. *NOTIFY THE TERMINAL OF FOLLOWING CONTROL SEQUENCE.
  2016.  
  2017. CALL SEQPACK(ZCONSEQ,4)
  2018.  
  2019. * STORE ADDRESS FOR THE Z80 PROGRAM.
  2020.  
  2021. ADDR = ZABSLOC
  2022. CALL ZSNDADD(ADDR)
  2023.  
  2024. * STORE Z80 CONTROLWARE ROUTINES IN CONSECUTIVE MEMORY AT *ZABSLOC*.
  2025.  
  2026. CALL ZSNDSEQ(ZPUSH, LZPUSH)
  2027. CALL ZSNDSEQ(ZPOP, LZPOP)
  2028. CALL ZSNDSEQ(ZRESET, LZRESET)
  2029. CALL ZSNDSEQ(ZLABEL, LZLABEL)
  2030. CALL ZSNDSEQ(ZVERFY, LZVERFY)
  2031. CALL SEQPACK(ZCARRET,1)
  2032.  
  2033. * STORE ADDRESSES OF Z80 ROUTINES AT VIRTUAL 7X KEY DEFINITIONS.
  2034.  
  2035. DO 110 I = 1, LKEYC
  2036. ADDR = KEYC(I, 2)
  2037. ZCONSEQ(3) = KEYC(I, 1)
  2038. CALL SEQPACK(ZCONSEQ,4)
  2039. CALL ZSNDADD(ADDR)
  2040. CALL SEQPACK(ZCARRET,1)
  2041. 110 CONTINUE
  2042. RETURN
  2043. END
  2044. IDENT PLT
  2045. ENTRY PLT
  2046. ENTRY PROMPT
  2047. ENTRY ERR
  2048. ENTRY RFL=
  2049. SPACE 4,10
  2050. * COMMON DECKS.
  2051. *CALL COMCMAC
  2052. PLT SPACE 4,30
  2053. ** PLT - PANEL LOADER TABLE.
  2054. *
  2055. * *PLT* FORCES THE CYBER LOADER TO INCLUDE THE SMF PANELS
  2056. * AS STATICALLY LOADED PANELS, AND ARE THEREFORE STATISFIED
  2057. * BY THE LOADER AT LOAD TIME.
  2058. *
  2059. * NOTE THE FIRST TWO STATEMENTS INDICATE THE NUMBER OF
  2060. * PANELS.
  2061.  
  2062.  
  2063. PLT VFD 60/8
  2064. VFD 60/8
  2065. VFD 60/7LKEYPAN1
  2066. VFD 1/1,41/0,18/=XKEYPAN1
  2067. VFD 60/7LKEYPAN2
  2068. VFD 1/1,41/0,18/=XKEYPAN2
  2069. VFD 60/7LKEYPAN3
  2070. VFD 1/1,41/0,18/=XKEYPAN3
  2071. VFD 60/7LKEYPAN4
  2072. VFD 1/1,41/0,18/=XKEYPAN4
  2073. VFD 60/7LKEYPAN5
  2074. VFD 1/1,41/0,18/=XKEYPAN5
  2075. VFD 60/7LKEYPAN6
  2076. VFD 1/1,41/0,18/=XKEYPAN6
  2077. VFD 60/7LKEYPAN7
  2078. VFD 1/1,41/0,18/=XKEYPAN7
  2079. VFD 60/7LKEYPAN8
  2080. VFD 1/1,41/0,18/=XKEYPAN8
  2081. PROMPT SPACE 4,15
  2082. ** PROMPT - TURN FORTRAN PROMPTS OFF.
  2083. *
  2084. * *PROMPT* TURNS OFF THE FORTRAN PROMPTS IN *CHECK* AND
  2085. * *DISPLAY* ROUTINES.
  2086. *
  2087. * CALLS PROMPT.
  2088.  
  2089.  
  2090. PROMPT SUBR
  2091. PROMPT OFF
  2092. EQ PROMPTX RETURN
  2093.  
  2094. ERR SPACE 4,30
  2095. ** ERR - ERROR PROCESSING.
  2096. *
  2097. * *ERR* RESETS THE *R1* REGISTER WHICH IS USED AS AN ERROR FLAG
  2098. * IN THE *CCL* PROCEDURE.
  2099. *
  2100. * ENTRY THE USER IS IN LINE MODE OR DOES NOT HAVE A *721* TYPE
  2101. * TERMINAL.
  2102. *
  2103. * EXIT R1 = 1
  2104. *
  2105. * USES X - 1, 6
  2106. * A - 1, 6
  2107. *
  2108. * CALLS GETJCR, SETJCR.
  2109.  
  2110.  
  2111. ERR SUBR
  2112. GETJCR REGS
  2113. SA1 REGS
  2114. SX6 X1+1
  2115. SA6 REGS
  2116. SETJCR REGS
  2117. EQ ERRX RETURN
  2118.  
  2119. REGS CON 0
  2120.  
  2121. * BLANK COMMON BLOCK IS USED TO CREATE AN RFL= ENTRY POINT.
  2122.  
  2123. USE //
  2124. RFL= BSS 0
  2125.  
  2126. END