home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol200 / vlib.hqp / VLIB.HLP
Encoding:
Text File  |  1985-02-10  |  10.9 KB  |  390 lines

  1. Introduction - VLIB
  2. Clear Screen - CLS
  3. Erase to EOL - EREOL
  4. Goto XY ------ AT/GOTOXY
  5. Initialization VIDINIT/Z3VINIT
  6. Print -------- GXYMSG/VPRINT
  7. Standout Mode  STNDOUT/STNDEND
  8. Term Init ---- TINIT/DINIT
  9. :Introduction to VLIB
  10.  
  11.      VLI┬ i≤ ß librar∙ oµ utilit∙ routine≤ whicΦ i≤ designeΣ ì
  12. t∩á suppor⌠ screeε manipulatioε unde≥ thσ ZCPR│ environment«  ì
  13. Usinτá VLI┬ anΣ thσ ZCPR│ Termina∞ Capabilitie≤á Datßá File≤ ì
  14. (Z3TCAP)¼á thσá ZCPR│á programme≥ caε creatσ codσá whicΦá i≤ ì
  15. transportablσá betweeεá ZCPR│ system≤ tha⌠ caε adap⌠á itselµ ì
  16. readil∙ t∩ ß variet∙ oµ moderε terminals«á  Fo≥ example¼ thσ ì
  17. VFILE╥ filσ manipulatioε utilit∙ caε bσ moveΣ froφ onσ ZCPR│ ì
  18. systeφ t∩ anothe≥ witΦ ß totall∙ differen⌠ terminal¼á anΣ a≤ ì
  19. lonτá a≤ tha⌠ seconΣ systeφ i≤ installeΣ witΦ ßá Z3TCA╨á fo≥ ì
  20. it≤á particula≥ terminal¼á VFILE╥ wil∞ continuσ t∩á functioε ì
  21. exactl∙ a≤ i⌠ diΣ oε thσ origina∞ systeφ witΦ it≤ particula≥ ì
  22. terminal.
  23.  
  24.      Al∞á VLI┬ routine≤ makσ usσ oµ thσ Z3TCA╨ entr∙á storeΣ ì
  25. iε thσ 2nΣ halµ oµ thσ ZCPR│ Environmen⌠ Descriptor.
  26.  
  27.      Iε general¼ ß utilit∙ whicΦ use≤ VLI┬ i≤ alway≤ oµ thi≤ ì
  28. general structure:
  29.  
  30.  
  31.                      General VLIB Usage
  32.  
  33.           ...
  34.           ext  tinit,dinit,z3vinit ;VLIB init routines
  35.           ex⌠  ..«                 ;othe≥ VLIB routines
  36.           ...
  37.           lxi  h,z3env   ;get Z3 environment ptr
  38.           call z3vinit   ;init Z3 environment and VLIB
  39.           call tinit     ;init terminal for VLIB work
  40.           ...
  41.           <code containing VLIB routine calls>
  42.           ...
  43.           call dinit     ;deinit terminal when done
  44.           jmp  0         ;warm boot (or return)
  45.           ...
  46.  
  47.  
  48.      A≤á illustrateΣá above¼á thσá genera∞ step≤á whicΦá arσ ì
  49. always taken when using VLIB are as follows:
  50.  
  51.           1.  Initialize Environment Pointers
  52.                - ENVPTR is ZCPR3 Environment Descriptor Addr
  53.                - VIDPTR sets Z3TCAP Entry Address
  54.           2.  Call Terminal Initialization Routine
  55.                - TINIT
  56.           3.  Call VLIB Routines as Desired
  57.           4.  Call Terminal Deinitialization Routine
  58.                - DINIT
  59.  
  60. :Clear Screen Routine
  61.  
  62. VLIB Routine: CLS
  63.  
  64. Function:
  65.      Clear the terminal screen
  66.  
  67. Inputs: None
  68. Outputs:
  69.      A=0 and Zero Flag Set (Z) if function not available
  70.      A=0FFH and NZ if clear screen sequence issued
  71. Registers Affected: PSW
  72. Side Effects: Screen is Cleared
  73. Special Error Conditions: None
  74. Examples of Use:
  75.      ext  cls  ;reference routine
  76.      ...
  77.      CALL CLS  ;clear screen
  78.      ...
  79.  
  80. :Erase to End of Line Routine
  81.  
  82. VLIB Routine: EREOL
  83.  
  84. Function:
  85.      Erasσá thσ curren⌠ linσ froφ thσ curso≥ positioε t∩ thσ ì
  86. end of the line
  87.  
  88. Inputs: None
  89. Outputs:
  90.      A=0 and Zero Flag Set (Z) if function not available
  91.      A=0FFH and NZ if ereol sequence issued
  92. Registers Affected: PSW
  93. Side Effects: Erase to End-of-Line occurs
  94. Special Error Conditions: None
  95. Examples of Use:
  96.      ext  ereol     ;reference routine
  97.      ...
  98.      CALL EREOL     ;erase to end-of-line
  99.      ...
  100.  
  101. :Cursor Positioning
  102. è
  103. VLIB Routine: AT
  104.  
  105. Function:
  106.      Positioεá a⌠á ro≈ anΣ columε identifieΣ a⌠á thσá returε ì
  107. address on the CRT screen.  The general syntax of usage is:
  108.  
  109.           ext  at        ;reference
  110.           ...
  111.           call at
  112.           db   row,column     ;coordinates
  113.           < code follows>
  114.  
  115.  
  116. Inputs: None
  117. Outputs: None
  118. Registers Affected: None
  119. Side Effects: None
  120. Special Error Conditions: None
  121. Example of Use:
  122.  
  123.           ext  at        ;reference
  124.           ...
  125.           CALL AT
  126.           DB   12,25     ;ROW 12, COLUMN 25
  127.           ...
  128.  
  129.  
  130. VLIB Routine: GOTOXY
  131.  
  132. Function:
  133.      Positioεá thσá curso≥ a⌠ thσ ro≈ (containeΣ iεá H⌐á anΣ ì
  134. columε (containeΣ iε L⌐ indicated¼á wherσ thσ homσá positioε ì
  135. is H=1 and L=1 (upper left corner of screen)
  136.  
  137. Inputs: H=Row, L=Column
  138. Outputs:
  139.      A=0 and Zero Flag Set (Z) if function not available
  140.      A=0FFH and NZ if cursor motion sequence issued
  141. Registers Affected: PSW
  142. Side Effects: Cursor is positioned
  143. Special Error Conditions:
  144.      I⌠ i≤ recommendeΣ tha⌠ thσ las⌠ columε oε thσ screeε i≤ ì
  145. no⌠áá referenceΣáá witΦá GOTOX┘á sincσá man∙á screen≤áá wil∞ ì
  146. automaticall∙á wra≡á arounΣ t∩ columε ▒ oµá thσá nex⌠á line¼ ì
  147. possibly advancing the screen image undesirably.
  148.  
  149.  
  150. Examples of Use:
  151.  
  152.      ext  gotoxy    ;reference routine
  153.      ...
  154.      LXI  H,101H    ;position to row 1/col 1
  155.      CALL GOTOXY
  156.      ...
  157.      MVI  H,24      ;position to row 24
  158.      MVI  L,79      ;position to column 79
  159.      CALL GOTOXY
  160.      ...
  161.  
  162. :Initialization of VLIB
  163.  
  164. VLIB Routine: VIDINIT
  165.  
  166. Function:
  167.      Se⌠á thσá pointe≥ t∩ thσ Z3TCA╨ entr∙ fo≥á thσá desireΣ ì
  168. terminal
  169.  
  170. Inputs: HL contains the address of the Z3TCAP entry
  171. Outputs: None
  172. Registers Affected: None
  173. Side Effects: Pointer VIDPTR is set
  174. Special Error Conditions:
  175.      Iε initializinτ VLI┬ routines¼ thσ programme≥ MUS╘ als∩ ì
  176. se⌠á thσá globa∞á pointe≥á ENVPT╥á t∩á poin⌠á t∩á thσá ZCPR│ ì
  177. Environmen⌠á Descripto≥á becausσ thσ dela∙ routine≤ iεá VLI┬ ì
  178. usσá somσá Environmen⌠á Descripto≥á values¼á likσá processo≥ ì
  179. speed«á  VIDINI╘á i≤á provideΣ iε additioεá t∩á forcinτá thσ ì
  180. programme≥ t∩ se⌠ ENVPT╥ iε orde≥ t∩ givσ thσ programme≥ thσ ì
  181. flexibilit∙ oµ usinτ ß Z3TCA╨ entr∙ whicΦ i≤ no⌠ thσ samσ a≤ ì
  182. that provided in the ZCPR3 Environment Descriptor.
  183.  
  184. Examples of Use:
  185.  
  186.      ext  envptr,vidinit ;reference pointer and routine
  187.      ...
  188.      lxi  h,z3env   ;address of ZCPR3 Environment Descriptor
  189.      shld envptr
  190.      lxi  h,z3env+80H    ;address of Z3TCAP in descriptor
  191.      call vidint
  192.      ...
  193.  
  194.  
  195. VLIB Routine: Z3VINIT
  196.  
  197. Function:
  198.      Se⌠ thσ pointe≥ t∩ thσ ZCPR│ Environmen⌠ Descripto≥ anΣ ì
  199. thσ followinτ Z3TCA╨ entry
  200.  
  201. Inputs: HL contains the address of the ZCPR3 Env Descriptor
  202. Outputs: None
  203. Registers Affected: None
  204. Side Effects: Pointers ENVPTR and VIDPTR are set
  205. Special Error Conditions:  None
  206.  
  207. Examples of Use:
  208.      ext  z3vinit ;reference pointer and routine
  209.      ...
  210.      lxi  h,z3env   ;address of ZCPR3 Environment Descriptor
  211.      call z3vinit
  212.      ...
  213.  
  214. :Print Routines
  215.  
  216. VLIB Routine: GXYMSG
  217.  
  218. Function:
  219.      Positioεá a⌠á thσá indicateΣá row/columεá anΣá prin⌠á ß ì
  220. message¼á whicΦá ma∙á optionall∙ contaiε thσá standou⌠á modσ ì
  221. begiεá characte≥ (1⌐ anΣ standou⌠ modσ enΣ characte≥ (2⌐á t∩ ì
  222. invokσá standou⌠ modσ anΣ enΣ standou⌠ modσ iε thσ middlσ oµ ì
  223. thσá message«á  Al∞á parameter≤ arσ passeΣ a≤ iεá thσá PRIN╘ ì
  224. routinσ oµ SYSLI┬ a⌠ thσ returε address«  Thσ genera∞ synta° ì
  225. of use is:
  226.  
  227.           ext  gxymsg         ;reference
  228.           ...
  229.           call gxymsg         ;call routine
  230.           db   row,column     ;row and column numbers
  231.           db   'message'      ;normal message text
  232.           dΓ   1,'standou⌠ message',▓   ;standou⌠ message
  233.           db   0              ;end of message indicator
  234.           < code follows >
  235.  
  236. Inputs: None
  237. Outputs: None
  238. Registers Affected: None
  239. Side Effects: Message is Printed at Coordinates
  240. Special Error Conditions: None
  241. Examples of Use:
  242.           ext  gxymsg
  243.           ...
  244.           call gxymsg
  245.           db   5,10      ;row 5, column 10
  246.           db   'Hello '       ;"Hello " is printed normally
  247.           db   1,'World',2    ;"World" is printed standout
  248.           db   0
  249.           ...
  250.  
  251.  
  252.  
  253. VLIB Routine: VPRINT
  254.  
  255. Function:
  256.      Prin⌠á ßá message¼á whicΦá ma∙ optionall∙á contaiεá thσ ì
  257. standou⌠á modσá begiε characte≥ (1⌐ anΣá standou⌠á modσá enΣ ì
  258. characte≥á (2⌐ t∩ invokσ standou⌠ modσ anΣ enΣ standou⌠ modσ ì
  259. iε thσ middlσ oµ thσ message«á  Al∞ parameter≤ arσ passeΣ a≤ ì
  260. iε thσ PRIN╘ routinσ oµ SYSLI┬ a⌠ thσ returεá address«á  Thσ ì
  261. genera∞ synta° oµ usσ is:
  262.  
  263.           ext  vprint         ;reference
  264.           ...
  265.           call vprint         ;call routine
  266.           db   'message'      ;normal message text
  267.           dΓ   1,'standou⌠ message',▓   ;standou⌠ message
  268.           db   0              ;end of message indicator
  269.           < code follows >
  270.  
  271.  
  272. Inputs: None
  273. Outputs: None
  274. Registers Affected: None
  275. Side Effects: Message is Printed
  276. Special Error Conditions: None
  277. Examples of Use:
  278.  
  279.           ext  vprint
  280.           ...
  281.           call vprint
  282.           db   'Hello '       ;"Hello " is printed normally
  283.           db   1,'World',2    ;"World" is printed standout
  284.           db   0
  285.           ...
  286.  
  287. :Standout Mode
  288.  
  289. VLIB Routine: STNDOUT
  290.  
  291. Function:
  292.      Begiε Standou⌠ Modσ - fo≥ somσ terminals¼á thi≤ wil∞ bσ ì
  293. reverse video, and for others this will be dim
  294.  
  295. Inputs: None
  296. Outputs:
  297.      A=0 and Zero Flag Set (Z) if function not available
  298.      A=0FFH and NZ if standout sequence issued
  299. Registers Affected: PSW
  300. Side Effects: Standout Mode is begun on terminal
  301.  
  302.  
  303. Special Error Conditions:
  304.      Iεá al∞á cases¼á a≤á par⌠á oµá thσá Z3TCA╨á definition¼ ì
  305. enterinτá Standou⌠á Modσá anΣ leavinτ Standou⌠ Modσá d∩á no⌠ ì
  306. causσ an∙ position≤ oε thσ screeε t∩ bσ occupied«  Curso≥ i≤ ì
  307. NOT moved.
  308.      I⌠á i≤ recommendeΣ tha⌠ extensivσ curso≥ motioε i≤á no⌠ ì
  309. donσá betweeε STNDOUT/STNDEN─ call≤ (ie¼á don'⌠ usσá GOTOXY⌐ ì
  310. sincσ thσ effect≤ oµ doinτ thi≤ arσ no⌠ generalizeΣ fo≥á al∞ ì
  311. terminals and may not be desirable in some cases.
  312.      Note: See STNDEND for the complement of this function.
  313.  
  314.  
  315. Examples of Use:
  316.  
  317.      ext  stndout,stndend
  318.      ...
  319.      call stndout
  320.      ...
  321.      < all screen output is now in Standout Mode >
  322.      ...
  323.      call stndend
  324.      ...
  325.      < all screen output is back to normal >
  326.  
  327.  
  328. VLIB Routine: STNDEND
  329.  
  330. Function:
  331.      Terminatσ Standou⌠ Modσ - resumσ norma∞ screeε display
  332.  
  333. Inputs: None
  334. Outputs:
  335.      A=0 and Zero Flag Set (Z) if function not available
  336.      A=0FFH and NZ if standend sequence issued
  337. Registers Affected: PSW
  338. Side Effects: None (see notes for STNDOUT)
  339. Special Error Conditions: None (see notes for STNDOUT)
  340. Examples of Use: (see notes for STNDOUT)
  341.  
  342. :Terminal Initialization and Deinitialization
  343.  
  344. VLIB Routine: TINIT
  345.  
  346. Function:
  347.      Initializσ thσ user'≤ termina∞ fo≥ late≥ processinτá b∙ ì
  348. VLIB routines
  349.  
  350. Inputs: None
  351. Outputs: None
  352. Registers Affected: None
  353. Side Effects: Terminal may be reprogrammed
  354. Special Error Conditions:
  355.      TINIT¼á a≤ ß rule¼ shoulΣ bσ issueΣ righ⌠ afte≥ settinτ ì
  356. u≡ thσ environmen⌠ pointer≤ anΣ beforσ an∙ oµ thσ othe≥ VLI┬ ì
  357. routines are called.
  358.      DINIT is the complement routine.
  359.  
  360.  
  361. Examples of Use:
  362.  
  363.      ext  envptr,vidinit ;reference ptr and init routine
  364.      ext  tinit,dinit    ;reference routines
  365.      ...
  366.      lxi  h,z3env        ;set up environment pointers
  367.      shld envptr
  368.      lxi  h,z3env+80H
  369.      call vidinit
  370.      call tinit          ;initialize terminal
  371.      ...
  372.      < body of code >
  373.      ...
  374.      call dinit          ;deinitialize terminal
  375.      jmp  0              ;exit
  376.  
  377.  
  378. VLIB Routine: DINIT
  379.  
  380. Function:
  381.      Deinitialize the terminal
  382.  
  383. Inputs: None
  384. Outputs: None
  385. Registers Affected: None
  386. Side Effects: None
  387. Special Error Conditions: (see notes on TINIT)
  388. Examples of Use: (see notes on TINIT)
  389.  
  390.  
  391.