home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / simtel / sigm / vols200 / vol200 / vlib.hlp < prev    next >
Text File  |  1994-07-13  |  11KB  |  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. VLIB Routine: AT
  103.  
  104. Function:
  105.      Positioεá a⌠á ro≈ anΣ columε identifieΣ a⌠á thσá returε ì
  106. address on the CRT screen.  The general syntax of usage is:
  107.  
  108.           ext  at        ;reference
  109.           ...
  110.           call at
  111.           db   row,column     ;coordinates
  112.           < code follows>
  113.  
  114.  
  115. Inputs: None
  116. Outputs: None
  117. Registers Affected: None
  118. Side Effects: None
  119. Special Error Conditions: None
  120. Example of Use:
  121.  
  122.           ext  at        ;reference
  123.           ...
  124.           CALL AT
  125.           DB   12,25     ;ROW 12, COLUMN 25
  126.           ...
  127.  
  128.  
  129. VLIB Routine: GOTOXY
  130.  
  131. Function:
  132.      Positioεá thσá curso≥ a⌠ thσ ro≈ (containeΣ iεá H⌐á anΣ ì
  133. columε (containeΣ iε L⌐ indicated¼á wherσ thσ homσá positioε ì
  134. is H=1 and L=1 (upper left corner of screen)
  135.  
  136. Inputs: H=Row, L=Column
  137. Outputs:
  138.      A=0 and Zero Flag Set (Z) if function not available
  139.      A=0FFH and NZ if cursor motion sequence issued
  140. Registers Affected: PSW
  141. Side Effects: Cursor is positioned
  142. Special Error Conditions:
  143.      I⌠ i≤ recommendeΣ tha⌠ thσ las⌠ columε oε thσ screeε i≤ ì
  144. no⌠áá referenceΣáá witΦá GOTOX┘á sincσá man∙á screen≤áá wil∞ ì
  145. automaticall∙á wra≡á arounΣ t∩ columε ▒ oµá thσá nex⌠á line¼ ì
  146. possibly advancing the screen image undesirably.
  147.  
  148.  
  149. Examples of Use:
  150.  
  151.      ext  gotoxy    ;reference routine
  152.      ...
  153.      LXI  H,101H    ;position to row 1/col 1
  154.      CALL GOTOXY
  155.      ...
  156.      MVI  H,24      ;position to row 24
  157.      MVI  L,79      ;position to column 79
  158.      CALL GOTOXY
  159.      ...
  160.  
  161. :Initialization of VLIB
  162.  
  163. VLIB Routine: VIDINIT
  164.  
  165. Function:
  166.      Se⌠á thσá pointe≥ t∩ thσ Z3TCA╨ entr∙ fo≥á thσá desireΣ ì
  167. terminal
  168.  
  169. Inputs: HL contains the address of the Z3TCAP entry
  170. Outputs: None
  171. Registers Affected: None
  172. Side Effects: Pointer VIDPTR is set
  173. Special Error Conditions:
  174.      Iε initializinτ VLI┬ routines¼ thσ programme≥ MUS╘ als∩ ì
  175. se⌠á thσá globa∞á pointe≥á ENVPT╥á t∩á poin⌠á t∩á thσá ZCPR│ ì
  176. Environmen⌠á Descripto≥á becausσ thσ dela∙ routine≤ iεá VLI┬ ì
  177. usσá somσá Environmen⌠á Descripto≥á values¼á likσá processo≥ ì
  178. speed«á  VIDINI╘á i≤á provideΣ iε additioεá t∩á forcinτá thσ ì
  179. programme≥ t∩ se⌠ ENVPT╥ iε orde≥ t∩ givσ thσ programme≥ thσ ì
  180. flexibilit∙ oµ usinτ ß Z3TCA╨ entr∙ whicΦ i≤ no⌠ thσ samσ a≤ ì
  181. that provided in the ZCPR3 Environment Descriptor.
  182.  
  183. Examples of Use:
  184.  
  185.      ext  envptr,vidinit ;reference pointer and routine
  186.      ...
  187.      lxi  h,z3env   ;address of ZCPR3 Environment Descriptor
  188.      shld envptr
  189.      lxi  h,z3env+80H    ;address of Z3TCAP in descriptor
  190.      call vidint
  191.      ...
  192.  
  193.  
  194. VLIB Routine: Z3VINIT
  195.  
  196. Function:
  197.      Se⌠ thσ pointe≥ t∩ thσ ZCPR│ Environmen⌠ Descripto≥ anΣ ì
  198. thσ followinτ Z3TCA╨ entry
  199.  
  200. Inputs: HL contains the address of the ZCPR3 Env Descriptor
  201. Outputs: None
  202. Registers Affected: None
  203. Side Effects: Pointers ENVPTR and VIDPTR are set
  204. Special Error Conditions:  None
  205.  
  206. Examples of Use:
  207.      ext  z3vinit ;reference pointer and routine
  208.      ...
  209.      lxi  h,z3env   ;address of ZCPR3 Environment Descriptor
  210.      call z3vinit
  211.      ...
  212.  
  213. :Print Routines
  214.  
  215. VLIB Routine: GXYMSG
  216.  
  217. Function:
  218.      Positioεá a⌠á thσá indicateΣá row/columεá anΣá prin⌠á ß ì
  219. message¼á whicΦá ma∙á optionall∙ contaiε thσá standou⌠á modσ ì
  220. begiεá characte≥ (1⌐ anΣ standou⌠ modσ enΣ characte≥ (2⌐á t∩ ì
  221. invokσá standou⌠ modσ anΣ enΣ standou⌠ modσ iε thσ middlσ oµ ì
  222. thσá message«á  Al∞á parameter≤ arσ passeΣ a≤ iεá thσá PRIN╘ ì
  223. routinσ oµ SYSLI┬ a⌠ thσ returε address«  Thσ genera∞ synta° ì
  224. of use is:
  225.  
  226.           ext  gxymsg         ;reference
  227.           ...
  228.           call gxymsg         ;call routine
  229.           db   row,column     ;row and column numbers
  230.           db   'message'      ;normal message text
  231.           dΓ   1,'standou⌠ message',▓   ;standou⌠ message
  232.           db   0              ;end of message indicator
  233.           < code follows >
  234.  
  235. Inputs: None
  236. Outputs: None
  237. Registers Affected: None
  238. Side Effects: Message is Printed at Coordinates
  239. Special Error Conditions: None
  240. Examples of Use:
  241.           ext  gxymsg
  242.           ...
  243.           call gxymsg
  244.           db   5,10      ;row 5, column 10
  245.           db   'Hello '       ;"Hello " is printed normally
  246.           db   1,'World',2    ;"World" is printed standout
  247.           db   0
  248.           ...
  249.  
  250.  
  251.  
  252. VLIB Routine: VPRINT
  253.  
  254. Function:
  255.      Prin⌠á ßá message¼á whicΦá ma∙ optionall∙á contaiεá thσ ì
  256. standou⌠á modσá begiε characte≥ (1⌐ anΣá standou⌠á modσá enΣ ì
  257. characte≥á (2⌐ t∩ invokσ standou⌠ modσ anΣ enΣ standou⌠ modσ ì
  258. iε thσ middlσ oµ thσ message«á  Al∞ parameter≤ arσ passeΣ a≤ ì
  259. iε thσ PRIN╘ routinσ oµ SYSLI┬ a⌠ thσ returεá address«á  Thσ ì
  260. genera∞ synta° oµ usσ is:
  261.  
  262.           ext  vprint         ;reference
  263.           ...
  264.           call vprint         ;call routine
  265.           db   'message'      ;normal message text
  266.           dΓ   1,'standou⌠ message',▓   ;standou⌠ message
  267.           db   0              ;end of message indicator
  268.           < code follows >
  269.  
  270.  
  271. Inputs: None
  272. Outputs: None
  273. Registers Affected: None
  274. Side Effects: Message is Printed
  275. Special Error Conditions: None
  276. Examples of Use:
  277.  
  278.           ext  vprint
  279.           ...
  280.           call vprint
  281.           db   'Hello '       ;"Hello " is printed normally
  282.           db   1,'World',2    ;"World" is printed standout
  283.           db   0
  284.           ...
  285.  
  286. :Standout Mode
  287.  
  288. VLIB Routine: STNDOUT
  289.  
  290. Function:
  291.      Begiε Standou⌠ Modσ - fo≥ somσ terminals¼á thi≤ wil∞ bσ ì
  292. reverse video, and for others this will be dim
  293.  
  294. Inputs: None
  295. Outputs:
  296.      A=0 and Zero Flag Set (Z) if function not available
  297.      A=0FFH and NZ if standout sequence issued
  298. Registers Affected: PSW
  299. Side Effects: Standout Mode is begun on terminal
  300.  
  301.  
  302. Special Error Conditions:
  303.      Iεá al∞á cases¼á a≤á par⌠á oµá thσá Z3TCA╨á definition¼ ì
  304. enterinτá Standou⌠á Modσá anΣ leavinτ Standou⌠ Modσá d∩á no⌠ ì
  305. causσ an∙ position≤ oε thσ screeε t∩ bσ occupied«  Curso≥ i≤ ì
  306. NOT moved.
  307.      I⌠á i≤ recommendeΣ tha⌠ extensivσ curso≥ motioε i≤á no⌠ ì
  308. donσá betweeε STNDOUT/STNDEN─ call≤ (ie¼á don'⌠ usσá GOTOXY⌐ ì
  309. sincσ thσ effect≤ oµ doinτ thi≤ arσ no⌠ generalizeΣ fo≥á al∞ ì
  310. terminals and may not be desirable in some cases.
  311.      Note: See STNDEND for the complement of this function.
  312.  
  313.  
  314. Examples of Use:
  315.  
  316.      ext  stndout,stndend
  317.      ...
  318.      call stndout
  319.      ...
  320.      < all screen output is now in Standout Mode >
  321.      ...
  322.      call stndend
  323.      ...
  324.      < all screen output is back to normal >
  325.  
  326.  
  327. VLIB Routine: STNDEND
  328.  
  329. Function:
  330.      Terminatσ Standou⌠ Modσ - resumσ norma∞ screeε display
  331.  
  332. Inputs: None
  333. Outputs:
  334.      A=0 and Zero Flag Set (Z) if function not available
  335.      A=0FFH and NZ if standend sequence issued
  336. Registers Affected: PSW
  337. Side Effects: None (see notes for STNDOUT)
  338. Special Error Conditions: None (see notes for STNDOUT)
  339. Examples of Use: (see notes for STNDOUT)
  340.  
  341. :Terminal Initialization and Deinitialization
  342.  
  343. VLIB Routine: TINIT
  344.  
  345. Function:
  346.      Initializσ thσ user'≤ termina∞ fo≥ late≥ processinτá b∙ ì
  347. VLIB routines
  348.  
  349. Inputs: None
  350. Outputs: None
  351. Registers Affected: None
  352. Side Effects: Terminal may be reprogrammed
  353. Special Error Conditions:
  354.      TINIT¼á a≤ ß rule¼ shoulΣ bσ issueΣ righ⌠ afte≥ settinτ ì
  355. u≡ thσ environmen⌠ pointer≤ anΣ beforσ an∙ oµ thσ othe≥ VLI┬ ì
  356. routines are called.
  357.      DINIT is the complement routine.
  358.  
  359.  
  360. Examples of Use:
  361.  
  362.      ext  envptr,vidinit ;reference ptr and init routine
  363.      ext  tinit,dinit    ;reference routines
  364.      ...
  365.      lxi  h,z3env        ;set up environment pointers
  366.      shld envptr
  367.      lxi  h,z3env+80H
  368.      call vidinit
  369.      call tinit          ;initialize terminal
  370.      ...
  371.      < body of code >
  372.      ...
  373.      call dinit          ;deinitialize terminal
  374.      jmp  0              ;exit
  375.  
  376.  
  377. VLIB Routine: DINIT
  378.  
  379. Function:
  380.      Deinitialize the terminal
  381.  
  382. Inputs: None
  383. Outputs: None
  384. Registers Affected: None
  385. Side Effects: None
  386. Special Error Conditions: (see notes on TINIT)
  387. Examples of Use: (see notes on TINIT)
  388.  
  389.  
  390.