home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / asmutil / asmlib37.zip / SOURCE.DOC < prev    next >
Text File  |  1993-05-27  |  25KB  |  706 lines

  1. SOURCE.DOC Copyright (C) 1992, 1993 Douglas Herr ■ all rights reserved
  2.  
  3. ASMLIB uses a number of subroutines which are not applicable to general
  4. programming.  These subroutines include "$" in their names.  All "$"
  5. subroutines require a near call, so the calling program must be in the same
  6. segment as the called subroutine.  The segment names used by ASMLIB are:
  7.  
  8. asmtiny:  _TEXT   (assumes CS:DGROUP,  DS:DGROUP)
  9. asmsmall: _TEXT   (assumes CS:_TEXT,   DS:DGROUP)
  10. asmlib:   _MEDIUM (assumes CS:_MEDIUM, DS:DGROUP)
  11. asmhuge:  _HUGE   (assumes CS:_HUGE,   DS:DGROUP)
  12.  
  13.  
  14. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  15.  
  16. $clip:        clip a line to fit within graphics view area
  17. Source:       $clip.asm ($graph.asm)
  18.  
  19. Call with:    call from ASMLIB line drawing subroutines
  20.               assumes DS:@data
  21. Returns:      x & y coordinates in DRAWLINE data area within view area
  22. Uses:         AX, BX, CX, DX, DI, flags
  23.  
  24.  
  25. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  26.  
  27. $ega16:       update EGA/VGA/SVGA registers for given drawmode & color
  28. Source:       $ega16.asm ($graph.asm)
  29.  
  30. Call with:    no parameters
  31.               call $graph before calling $ega16
  32.               drawmode & gcolor must be current
  33. Returns:      DX = 3CEh (Graphics Controller data register address)
  34. Uses:         DX, flags
  35.  
  36.  
  37. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  38.  
  39. $emspage:    position logical EMS page at page 0 of page frame
  40. source:      $emspage.asm
  41.  
  42. Call with:   DS:[BX] pointing to 4-byte offset into allocated EMS block
  43.              DX = EMS handle
  44. Returns:     if CF = 0, no error; AL = logical page
  45.              if CF = 1, AH = error code
  46. Uses:        AX, flags
  47.  
  48. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  49.  
  50. $enter:       entry code for ASMLIB graphics subroutines
  51. Source:       $enter.asm ($graph.asm)
  52.  
  53. Call with:    no parameters
  54. Returns:      calls $graph
  55.               pushes flags, BX, CX, DX, DI, SI, ES, BP
  56.               BP = SP
  57.               DF = 0
  58. Uses:         AX, SP, DF
  59.  
  60.  
  61. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  62.  
  63. $exit:        exit code for ASMLIB graphics subroutines
  64. Source:       $exit.asm
  65.  
  66. Call with:    BP = stack frame pointer
  67.               AX, flags, BX, CX, DX, DI, SI, ES, BP pushed on stack
  68. Returns:      returns to program calling the primary subroutine
  69. Uses:         flags, all registers except DS
  70.  
  71.  
  72. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  73.  
  74. $fget:       read more data into file buffer
  75. Source:      $fget.asm
  76.  
  77. Call with:   BX = file handle
  78.              ES = buffer segment address
  79. Returns:     DF = 0
  80.              if CF = 0, AX = bytes read from file
  81.              if CF = 1, AX = DOS error code
  82. Uses:        AX, DX, SI, DS, flags
  83.  
  84. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  85.  
  86. $gbytes:      calculate byte size of graphics screen
  87. Source:       $gbytes.asm ($graph.asm)
  88.  
  89. Call with:    no parameters
  90.               $graph must be called before calling $gbytes
  91. Returns:      DX:AX = byte size of screen
  92. Uses:         AX, DX
  93.  
  94.  
  95. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  96.  
  97. $getdot:      determines pixel status (graphics modes)
  98. Source:       $getdot.asm ($graph.asm)
  99.  
  100. Call with:    AX = x-coordinate, BX = y-coordinate
  101.               ES = segment address of screen buffer
  102.               all $graph data must be current
  103. Returns:      AX = pixel value
  104. Uses:         AX, flags
  105.  
  106.  
  107. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  108.  
  109. $gp00, $gp02, $gp06, $gp08, $gp10: GPrint/GPrintX code for various dottypes
  110. Source:       $gp00.asm, $gp02.asm, $gp06.asm $gp08.asm, $gp10.asm
  111.                    (banks.asm, $ytable.asm)
  112.  
  113. Call with:    called from GPrint or GPrintX subroutines
  114.               DS:[SI] -> character font definition
  115.               ES = segment address of screen buffer
  116. Returns:      nothing
  117.               prints a character on graphics screen
  118. Uses:         AX, BX, CX, DX, DI, SI, flags
  119.  
  120.  
  121. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  122.  
  123. $gpick:      select string from fixed-field string block; graph mode
  124. Source:      $gpick.asm (heap.asm, strncpy.asm, drawbox.asm, fillbox.asm,
  125.                gprint.asm, dosalloc.asm, bitblock.asm, bbbytes.asm,
  126.                strlen.asm, gcolor.asm, a$menu.asm, $graph.asm, m$input.asm,
  127.                v$extkey.asm, m$chrn.asm, m$nkey.asm)
  128.  
  129. Call with:   ES = segment address of string list
  130.              AX = number of strings
  131.              CX = field size
  132.              BX = initial choice
  133.              DS:[DX] pointing to upper left screen coordinates
  134.              assumes DS:DGROUP
  135. Returns:     AX = returning keycode
  136.              BX = returned selection number
  137. Uses:        AX, BX, CX, DX, SI, DI, flags
  138.  
  139.  
  140. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  141.  
  142. $graph:       set up screen parameters for all ASMLIB graphics modes
  143. Source:       $graph.asm (gcolor.asm, $ytable.asm)
  144.  
  145. Call with:    no parameters
  146.               system must be in graphics mode you intend to use
  147. Returns:      nothing
  148.               updates $graph data: view coordinates
  149.                                    x-limit
  150.                                    y-limit
  151.                                    base segment address
  152.                                    page size
  153.                                    byte width of screen
  154.                                    maximum page number
  155.                                    dot type:  0 = CGA 4-color
  156.                                               2 = monochrome
  157.                                                   (CGA, Herc, ATT, mode 11h)
  158.                                               4 = Hercules InColor
  159.                                               6 = EGA/VGA 16-color & monochrome
  160.                                                   SVGA16 (up to 800x600)
  161.                                               8 = mode 13h 256-color
  162.                                              10 = VGA13X
  163.                                              12 = SVGA16 (over 800x600)
  164.                                              14 = SVGA256
  165.  
  166.  
  167. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  168.  
  169. $h8x8:       copies standard 8x8 character definition to 0B400:0000
  170.              for Hercules RamFont modes
  171. Source:      $h8x8.asm (f8x8.asm)
  172.  
  173. Call with:   no parameters; assumes Hercules RamFont card is installed
  174. Returns:     nothing
  175. Uses:        nothing; all registers and flags are saved
  176. Used by:     HRam9043, HRam8043
  177.  
  178.  
  179. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  180.  
  181. $h8x12:      copies standard 8x12 character definition to 0B400:0000
  182.              for Hercules RamFont modes
  183. Source:      $h8x12.asm ($rld.asm, f8x12rle.asm)
  184.  
  185. Call with:   no parameters; assumes Hercules RamFont card is installed
  186. Returns:     nothing
  187. Uses:        nothing; all registers and flags are saved
  188. Used by:     HRam9029, HRam8029
  189.  
  190.  
  191. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  192.  
  193. $handle:     verify handle for buffered file I/O
  194. Source:      fopen.asm
  195.  
  196. Call with:   BX = file handle
  197.              ASSUMES DS:DGROUP
  198. Returns:     if CF = 0, SI points to file handle in ASMLIB buffer data area
  199.                         segment address of buffer associated with this handle
  200.                         at 2[SI]
  201.              if CF = 1, handle in BX not managed by ASMLIB buffer system
  202. Uses:        SI, flags
  203.  
  204. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  205.  
  206. $herc:       detects Hercules-compatible equipment; does not determine
  207.              if Hercules equipment is the default monitor (see IsHerc)
  208. Source:      $herc.asm
  209.  
  210. Call with:   no parameters
  211.              Assumes DS:@data
  212. Returns:     if CF = 1, no Hercules-compatible equipment installed
  213.              if CF = 0, AX = Hercules model
  214.                        128 = Hercules Graphics Card or compatible
  215.                        144 = Hercules Graphics Card Plus
  216.                        208 = Hercules InColor card
  217. Uses:        AX, flags
  218.  
  219.  
  220. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  221.  
  222. $herc16:      update InColor registers for given drawmode & color
  223.               used only by dottype 4 in graphics modes
  224. Source:       $herc16.asm ($graph.asm)
  225.  
  226. Call with:    no parameters
  227.               call $graph before calling $herc16
  228.               drawmode & gcolor must be current
  229. Returns:      BX = ABS(drawmode) shl 1
  230. Uses:         BX, flags
  231.  
  232.  
  233. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  234.  
  235. $hislope:     draw a high-slope line
  236. Source:       $hislope.asm ($ega16.asm, $herc16.asm, $vga256.asm,
  237.                           $hipatrn.asm, banks.asm, $graph.asm, dotmask.asm)
  238.  
  239. Call with:    DS:@data
  240.               ES = screen buffer segment
  241.               x0 = [BP-2]
  242.               y0 = [BP-4]
  243.               x1 = [BP-6]
  244.               y1 = [BP-8]
  245. Returns:      nothing
  246. Uses:         AX, BX, CX, DX, DI, SI, flags
  247.  
  248.  
  249. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  250.  
  251. $horiz:       draw horizontal line
  252. Source:       $horiz.asm ($ega16.asm, $herc16.asm, $vga256.asm, $hvpatrn.asm
  253.                           banks.asm, $graph.asm, dotmask.asm)
  254.  
  255. Call with:    DS:@data
  256.               ES = screen buffer segment
  257.               x0 = [BP-2]
  258.               y0 = [BP-4]
  259.               x1 = [BP-6]
  260.               y1 = [BP-8]
  261. Returns:      nothing
  262. Uses:         AX, BX, CX, DX, DI, SI, flags
  263.  
  264.  
  265. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  266.  
  267. $hipatrn:     draw a high-slope line with pattern
  268.               called from $hislope
  269. Source:       $hipatrn.asm
  270.  
  271. $hpattern:    draw a horizontal line with pattern
  272.               called from $horiz
  273. Source:       $hvpatrn.asm
  274.  
  275. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  276.  
  277. a$putw:      module used by several ASMLIB text subroutines to copy
  278.              a character/attribute pair to a window of the screen;
  279.              includes snow control logic for CGA systems.
  280. Source:      a$putw.asm
  281.  
  282. Call with:   CX = column width of window
  283.              DX = 0 to disable snow control
  284.                 = 3DAh to enable snow control (COLOR monitors only!!)
  285.              SI = row height of window
  286.              ES:[DI] points to video buffer
  287.              AL = character
  288.              AH = color attribute
  289.              BX = bytes per screen row (80-column screen has 160 bytes per row)
  290.              DF = 0 (clear direction flag with CLD)
  291. Uses:        DI, SI, flags
  292.  
  293.  
  294. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  295.  
  296. a$paint:     used to change color of the screen; used by Paint and
  297.              WPaint subroutines.  Includes snow control logic for CGA
  298.              systems.
  299. Source:      a$paint.asm
  300.  
  301. Call with:   ES:[DI] pointing to screen
  302.              CX = number of columns
  303.              SI = number of rows
  304.              AH = color attribute
  305.              DX = 3DAh for CGA snow control, 0 otherwise
  306.              BP = bytes per screen row
  307.  
  308.  
  309. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  310.  
  311. a$recolor:   replaces selected screen color; used by ReColor and
  312.              WReColor subroutines.  Includes snow control logic for CGA
  313.              systems.
  314. Source:      a$recolor.asm
  315.  
  316. Call with:   ES:[DI] pointing to screen
  317.              AL = oldcolor
  318.              AH = newcolor
  319.              DX = 0 or 3DAh for snow control
  320.              SI = number of rows
  321.              CX = number of columns
  322.              BP = bytes per screen row
  323.  
  324.  
  325. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  326.  
  327. a$wdata:     parameter manager for ASMLIB's Window subroutines.
  328. Source:      a$wdata.asm (crtinfo.asm)
  329.  
  330. Call with:   DS:[BX] pointing to widow corner data
  331.              requires 2 bytes available at [bp-2]
  332.              row0  equ  [bx]
  333.              col0  equ 2[bx]
  334.              row1  equ 4[bx]
  335.              col1  equ 6[bx]
  336. Returns:     SI = number of rows
  337.              CX = number of columns
  338.              DX = 0 if no CGA, 3DAh if CGA and "snow" control not disabled
  339.              [bp-2] = bytes per screen row
  340.              ES:[DI] -> [row0, col0] on screen
  341. Uses:        CX, DX, DI, SI, ES, [BP-2], flags
  342.  
  343.  
  344. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  345.  
  346. $rlbytes:    calculates bytes required to decode run-length encoded data
  347. Source:      $rlbytes.asm
  348.  
  349. Call with:   DS:[SI] pointing to encoded data
  350.              CX = size of encoded data block
  351. Returns:     AX = bytes required to decode data block
  352. Uses:        AX
  353.  
  354.  
  355. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  356.  
  357. $rld:        decodes run-length encoded data
  358. Source:      $rld.asm
  359.  
  360. Call with:   DS:[SI] pointing to encoded source data
  361.              ES:[DI] pointing to destination buffer
  362.              CX = number of encoded bytes
  363.              assumes destination buffer is large enough for decoded data
  364. Returns:     nothing
  365. Uses:        nothing
  366.  
  367.  
  368. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  369.  
  370. $rle:        run-length encoding data compression
  371. Source:      $rle.asm
  372.  
  373. Call with:   DS:[SI] pointing to data to be encoded
  374.              ES:[DI] pointing to output buffer
  375.              CX = number of bytes to encode
  376.              assumes output buffer is at least the same size as input data
  377. Returns:     DF = 0
  378.              if CF = 0, AX = encoded data size
  379.              if CF = 1, run-length encoding will not compress file
  380.                         data in output buffer is incomplete
  381. Uses:        AX, flags
  382.  
  383. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  384.  
  385. $strstr:     string search module used by several ASMLIB subroutines
  386. Source:      $strstr.asm
  387.  
  388. Call with:   ES:[DI] -> search string, DS:[SI] -> pattern string
  389.              BX = pattern string length, DX = search string length
  390.              $strstr searches for the first occurrance of the pattern
  391.              string in the search string
  392. Returns:     if CF = 1, no match
  393.              if CF = 0, AX = match offset from ES:[DI]
  394. Uses:        AX, BX, CX, DX, SI, DI, flags
  395.  
  396.  
  397. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  398.  
  399. $wcopy:      copies word data from one portion of memory to another;
  400.              intended for copying to/from video memory in text mode
  401.              includes snow control logic for CGA systems.
  402. Source:      $wcopy.asm
  403.  
  404. Call with:   CX = words to copy
  405.              DS:[SI] -> source
  406.              ES:[DI] -> destination
  407.              DX = CRTC status port if CGA, else 0
  408.              DF = 0 or 1
  409. Returns:     ES:[DI] pointing past end of destination
  410.              DS:[SI] pointing past end of block
  411.              CX = 0
  412. Uses:        AX, CX, DI, SI, flags
  413. Called by:   WSave, WRestore, GetScreen, PutScreen, TCopy, VScroll, HScroll
  414.  
  415.  
  416.  
  417. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  418.  
  419. m$putwindow:  save screen, clear window & print window frame
  420. Source:       m$putw.asm (wsize.asm, wsave.asm, dosalloc.asm, wframe.asm,
  421.                           wclear.asm)
  422.  
  423. Call with:    DS:[BX] pointing to window corner data
  424. Returns:      ES = segment address of saved screen area
  425. Uses:         ES, flags
  426. Called by:    PICKSTR
  427.  
  428.  
  429. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  430.  
  431. $strlist:     copy group of ASCIIZ strings to block of fixed-length strings
  432. source:       $strlist.asm (dosalloc.asm, strlen.asm, m$count.asm)
  433.  
  434. Call with:    DS:[SI] pointing to first string to copy
  435.               CX = minimum field size
  436.               string group terminated with double NUL
  437.               requires sufficient free DOS memory
  438.  
  439. Returns:      if CF = 1, insufficient DOS memory available
  440.               if CF = 0:
  441.                ES = base segment address of string block
  442.                AX = number of strings
  443.                CX = string field size
  444. Uses:         AX, CX, ES, flags
  445. Called by:    PICKSTR, GPICKSTR
  446.  
  447.  
  448. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  449.  
  450. m$count:      counts a group of ASCIIZ strings
  451. Source:       m$count.asm (strlen.asm)
  452.  
  453. Call with:    DS:[BX] pointing to first string
  454.               string group terminated with double NUL
  455. Returns:      AX = number of strings
  456.               CX = length of longest string in group
  457. Uses:         AX, BX, CX, flags
  458. Called by:    PICKSTR, PULLDOWN
  459.  
  460.  
  461.  
  462. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  463.  
  464. m$nkey:       process normal keystroke for menu subroutines
  465. Source:       m$nkey.asm (isupper.asm, m$chr.asm)
  466.  
  467. Call with:    AL = key code
  468.               BX = initial cursor position
  469.               CX = field width
  470.               DX = number of menu choices
  471.               ES:[DI] pointing to first menu choice
  472. Returns:      BX = output position
  473.                if CF = 0, found matching character
  474.                if CF = 1, no match
  475. Uses:         AX, BX, CX, DX, DI, flags
  476. Called by:    $pick
  477.  
  478.  
  479. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  480.  
  481. m$chr:        determines if a keycode is the first uppercase character
  482.               in a string
  483. Source:       m$chr.asm (strlen.asm)
  484.  
  485. Call with:    AX = keycode
  486.               DS:[BX] pointing to string
  487. Returns:      if CF = 1, string length = 0
  488.               if CF = 0:
  489.                 CX = 0 if no upper case characters in the string
  490.                 if CX <> 0, AH = first UCASE character
  491.                 ZF = 1 if character is first ucase in string
  492.                 DS:[BX] points to first ucase character
  493. Uses:         AX, BX, CX, flags
  494. Called by:    $pick, PULLDOWN
  495.  
  496.  
  497. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  498.  
  499. $listwindow:  calculates window dimensions for input list; adjusts
  500.               upper left corner coordinates if required to fit on screen
  501. Source:       $listw.asm (crtinfo.asm)
  502.  
  503. Call with:    DS:[BX] pointing to 8-byte data area for window corner data
  504.               AX = number of choices in list
  505.               CX = list field width
  506.               DH = desired first screen row for list
  507.               DL = desired first column for list
  508.               $listwindow assumes that DH < total screen rows
  509. Returns:      DH = adjusted first row for $pick
  510.               DL = adjusted first column for $pick
  511.               8 bytes at DS:[BX] are updated with window corner coordinates
  512.               for WSave, WFrame, WRestore, etc.
  513. Uses:         DX; all other registers and flags are saved
  514. Called by:    PICKSTR, PICKFILE
  515.  
  516.  
  517. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  518.  
  519. $pick:        select one string from a list of fixed-length strings
  520.               used in text-mode menu subroutines
  521. Source:       $pick.asm (crtinfo.asm, str2vbuf.asm, a$putw.asm, m$input.asm,
  522.                          m$chr.asm, m$nkey.asm, a$menu.asm, v$extkey.asm)
  523.  
  524. Call with:    ES:[DI] pointing to list of choices
  525.               AX = number of menu choices
  526.               CX = field width
  527.               BX = initial cursor position
  528.               DH = top screen row
  529.               DL = left screen column
  530.               Returns to calling program when Esc, Enter or ^C pressed
  531.  
  532. Returns:      if BreakTrap enabled:
  533.                if CF = 1, ^C or ^Break was pressed
  534.               AX = last key pressed (AX = 3 if ^C pressed)
  535.               BX = string number selected (first string = 0)
  536. Uses:         AX, BX, CF
  537. Called by:    PICKSTR, PICKFILE
  538.  
  539. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  540.  
  541. v$extkey:     extended keycode processor for ASMLIB vertical list menus
  542.               (text and graph modes)
  543. Source:       v$extkey.asm
  544.  
  545. Call with:    AL = low word of ASMLIB extended key code
  546.               [bp-2] = field width of string list
  547.               [bp-4] = number of choices
  548.               [bp-6] = current choice
  549.               [bp-8] = first string to print (for scrolling if required)
  550.               [bp-10] = number of strings to print 
  551.                         ( = number of choices if no scrolling required)
  552.  
  553. Returns:      if CF = 0, modifies [bp-6] and [bp-8]
  554.               if CF = 1, keycode not a valid cursor movement key
  555.               valid keys: Up, Down, Home, End, PgUp, PgDown
  556.  
  557. Uses:         AX, flags
  558. Called by:    $pick, $gpick
  559.  
  560. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  561.  
  562. FIND_CGA:     determine if color monitor is installed
  563. FIND_MDA:     determine if monochrome monitor is installed
  564. Source:       $6845.asm
  565.  
  566. Call with:    no parameters
  567. Returns:      if CF = 0, monitor is installed
  568.               if CF = 1, monitor is not installed
  569. Uses:         flags
  570.  
  571.  
  572.  
  573. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  574.  
  575. $ytable:      calculate buffer offset for each row of screen
  576.               used to set up for dottype 0 - 4 graphics modes
  577. Source:       $ytable.asm ($herc.asm)
  578.  
  579. Call with:    AX = 0
  580.               ES:[DI] pointing to YTABLE data area
  581.               CX = ylimit+1
  582.               DF = 0
  583. Returns:      nothing
  584. Uses:         AX, BX, CX, DX, DI
  585.  
  586.  
  587.  
  588. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  589.  
  590. a$mname:      return month or day name to calling program
  591.               used by MONTHNAME and DAYNAME
  592. Source:       a$mname.asm
  593.  
  594. Returns:      ES:[BX] -> month name string
  595.               CX = string length
  596. Uses:         ES, BX, CX
  597.  
  598.  
  599. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  600.  
  601. $vga256:      determine color & machine code for given drawmode
  602. Source:       $vga256.asm ($graph.asm)
  603.  
  604. Call with:    no parameters
  605.               call $graph before calling $vga256
  606.               drawmode & gcolor must be current
  607. Returns:      AL = color
  608.               DL = machine code
  609.               DH = ABS(drawmode)
  610. Uses:         AX, DX, flags
  611.  
  612.  
  613.  
  614. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  615.  
  616. $reset:       restores default hardware settings for graphics modes
  617.               used as part of exit code from ASMLIB graphics subroutines
  618. Source:       $reset.asm ($graph.asm)
  619.  
  620. Call with:    no parameters
  621. Returns:      nothing
  622. Uses:         nothing
  623.  
  624.  
  625. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  626.  
  627. $putdot:      updates a pixel on graphics screen
  628. Source:       $putdot.asm ($graph.asm, $herc16.asm, banks.asm, dotmask.asm)
  629.  
  630. Call with:    AX = x-coordinate, BX = y-coordinate
  631.               ES = segment address of screen buffer
  632.               all $graph data must be current
  633. Returns:      nothing
  634. Uses:         flags
  635.  
  636.  
  637.  
  638. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  639.  
  640. $rotate:      rotates character font for GPrint & GPrintX
  641. Source:       $gp.asm
  642.  
  643. Call with:    DS:[SI] pointing to unrotated font
  644. Returns:      DS:[SI] pointing to new charcter font on stack
  645.               DS:@data
  646. Uses:         DS, SI, flags
  647.  
  648.  
  649.  
  650. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  651.  
  652. $vert:        draw vertical line
  653. Source:       $vert.asm ($ega16.asm, $herc16.asm, $vga256.asm, $hvpatrn.asm
  654.                           banks.asm, $graph.asm, dotmask.asm)
  655.  
  656. Call with:    DS:@data
  657.               ES = screen buffer segment
  658.               x0 = [BP-2]
  659.               y0 = [BP-4]
  660.               x1 = [BP-6]
  661.               y1 = [BP-8]
  662. Returns:      nothing
  663. Uses:         AX, BX, CX, DX, DI, SI, flags
  664.  
  665.  
  666. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  667.  
  668. $loslope:     draw a low-slope line
  669. Source:       $loslope.asm ($ega16.asm, $herc16.asm, $vga256.asm,
  670.                           $lopatrn.asm, banks.asm, $graph.asm, dotmask.asm)
  671.  
  672. Call with:    DS:@data
  673.               ES = screen buffer segment
  674.               x0 = [BP-2]
  675.               y0 = [BP-4]
  676.               x1 = [BP-6]
  677.               y1 = [BP-8]
  678. Returns:      nothing
  679. Uses:         AX, BX, CX, DX, DI, SI, flags
  680.  
  681.  
  682.  
  683. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  684.  
  685. m$input:      input module for ASMLIB menu subroutines
  686. Source:       m$input.asm (kifwait.asm, asmflags.asm)
  687.  
  688. Call with:    DS:@data
  689. Returns:      AX = keycode
  690.               BX = mouse buttons pressed
  691.                mouse motion is returned as a Left, Right, Up or Down
  692.                keycode.  IsMouse must be called before the menu subroutine
  693.                to enable mouse functions.
  694. Uses:         AX, BX, flags
  695.  
  696.  
  697. ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  698.  
  699. $lopatrn:     draw a low-slope line with pattern
  700.               called from $loslope
  701. Source:       $lopatrn.asm
  702.  
  703. $vpattern:    draw a vertical line with pattern
  704.               called from $vert
  705. Source:       $hvpatrn.asm
  706.