home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / fortran / fv121s.zip / FAT2.DOC < prev    next >
Text File  |  1988-06-04  |  12KB  |  370 lines

  1.         APR 1988                FAT-VIDEO 1.21  POKEB            Page V-24
  2.  
  3.  
  4.  
  5.         POKEB(OFF,SEG,VAL) - Put BYTE in memory location SEG:OFF
  6.  
  7.         Usage:
  8.  
  9.           call pokeb(off,seg,val)
  10.  
  11.           integer*2 off,seg or integer*4 off,seg
  12.           integer*2 val
  13.  
  14.           inputs:  off,seg,val
  15.  
  16.           returns: none
  17.  
  18.           MS-Fortran 4.0 Large Model
  19.  
  20.         Description:
  21.  
  22.            This routine pokes the lower byte of VAL into the byte
  23.         defined by seg:off.
  24.  
  25.            This function must be passed an integer*2 for VAL,
  26.         and an integer*2 or integer*4 for off and seg. If off and/or
  27.         seg is passed as an integer*4, only the lower word is altered.
  28.         Seg and off must be declared as integer*4 if they exceed +32k
  29.         or -32k, as this is the largest integer*2 value Fortran can
  30.         assign. That is if you explicitly declare seg=#B800 (hexadecimal
  31.         cga screen address), then seg must be declared as integer*4 or
  32.         else the compiler will assign a negative value to seg. In general,
  33.         just declare any seg definitions as integer*4.  Note: If a
  34.         video function returns a segment address for later use it may be
  35.         declared integer*2 in all cases, as the video functions treat
  36.         integer*2 values as 0 through +64k (unsigned integers).
  37.  
  38.         See also peekb(), peekw(), pokew(), allmem(), fremem().
  39.  
  40.         Off     = offset
  41.         Seg     = segment paragraph
  42.         Val     = returned
  43.  
  44.         CGA, Mono, EGA
  45.        APR 1988                FAT-VIDEO 1.21  POKEW           Page V-25
  46.  
  47.  
  48.  
  49.         POKEW(OFF,SEG,VAL) - Put WORD in memory location SEG:OFF
  50.  
  51.         Usage:
  52.  
  53.           call pokew(off,seg,val)
  54.  
  55.           integer*2    off,seg or integer*4 off,seg
  56.           integer*2    val
  57.  
  58.           inputs: off,seg,val
  59.  
  60.           returns: none
  61.  
  62.           MS-Fortran 4.0 Large Model
  63.  
  64.         Description:
  65.  
  66.            This routine pokes VAL into the word at the location seg:off.
  67.  
  68.            This function must be passed an integer for VAL and may be
  69.         passed an integer*2 or integer*4 for off and seg.  If off
  70.         and/or seg is passed as an integer*4, only the lower word is
  71.         altered. Seg and off must be declared as integer*4 if they exceed
  72.         +32k or -32k, as this is the largest integer*2 value Fortran can
  73.         assign. That is, if you explicitly declare seg=#B800 (hexadecimal
  74.         cga screen address), then seg must be declared as integer*4, or
  75.         else the compiler will assign a negative value to seg. In general,
  76.         just declare any seg definitions as integer*4.  Note: If a video
  77.         function returns a segment address for later use, it may be
  78.         declared integer*2 in all cases as the video functions treat
  79.         integer*2 values as 0 through +64k (unsigned integers).
  80.  
  81.         See also peekb(), peekw(), pokeb(), allmem(), fremem().
  82.  
  83.         Off     = offset
  84.         Seg     = segment paragraph
  85.         val     = returned
  86.  
  87.         Int none
  88.  
  89.         CGA, Mono, EGA
  90.  
  91.        APR 1988                FAT-VIDEO 1.21  MEMSTR          Page V-26
  92.  
  93.  
  94.         MEMSTR(OFF,SEG,STRING,NBYTES) - Copy Memory to a String.
  95.  
  96.         Usage:
  97.  
  98.           call memstr(OFF,SEG,STRING,NBYTES)
  99.  
  100.           integer*2   off,seg,nbytes  or integer*4  off,seg,nbytes
  101.           character*n string
  102.  
  103.           inputs:  off,seg,nbytes
  104.  
  105.           returns: string
  106.  
  107.           MS-Fortran-4.0-Large Dos 2.0
  108.  
  109.         Description:
  110.  
  111.            This routine copies memory (by bytes) starting at seg:off, to a
  112.         character string. Such as screen memory to a buffer.
  113.  
  114.             See also StrMem(),Peekb(),Peekw(),Pokeb(),Pokew()
  115.  
  116.         OFF    = offset (0-64k)
  117.         SEG    = paragraph segment
  118.         STRING = buffer
  119.         NBYTES = # bytes to copy, max = 32K
  120.  
  121.         Int none
  122.  
  123.         CGA, Mono, EGA
  124.  
  125.         APR 1988                FAT-VIDEO 1.21  STRMEM          Page V-27
  126.  
  127.  
  128.         STRMEM(OFF,SEG,STRING,NBYTES) - Copies a String to Memory.
  129.  
  130.         Usage:
  131.  
  132.           call strmem(OFF,SEG,STRING,NBYTES)
  133.  
  134.           integer*2   off,seg,nbytes  or integer*4  off,seg,nbytes
  135.           character*n string
  136.  
  137.           inputs: off,seg,string,nbytes
  138.  
  139.           returns: none
  140.  
  141.           MS-Fortran-4.0 - Large Dos 2.0
  142.  
  143.         Description:
  144.  
  145.            This routine copies bytes from the string to memory at seg:off.
  146.         Such as a string buffer to the screen memory.
  147.  
  148.             See also MemStr(),Peekb(),Peekw(),Pokeb(),Pokew()
  149.  
  150.         OFF    = offset (0-64k)
  151.         SEG    = paragraph segment
  152.         STRING = buffer
  153.         NBYTES = # bytes to copy, max = 32k
  154.  
  155.         Int none
  156.  
  157.         CGA, Mono, EGA
  158.  
  159.        APR 1988                FAT-VIDEO 1.21  GETVID          Page V-28
  160.  
  161.  
  162.         GETVID(NRS,NCS,NRE,NCE,SEG) - Copy Screen to memory at SEG.
  163.  
  164.         Usage:
  165.  
  166.           call getvid(nrs,ncs,nre,nce,seg)
  167.  
  168.           integer*2 nrs,ncs
  169.           integer*2 nre,nce
  170.           integer*2 seg or integer*4 seg
  171.  
  172.           inputs: nrs,ncs,nre,nce,seg
  173.  
  174.           returns: none
  175.  
  176.           MS-Fortran 4.0 Large Model
  177.  
  178.         Description:
  179.  
  180.            This subroutine saves the window section defined by nrs,ncs
  181.         and nre,nce into the memory location starting at seg. It is up
  182.         to the calling program to allocate storage, via ALLMEM().
  183.            This routine stores the video buffer character and attribute
  184.         bytes for the window defined, into the buffer starting at seg.
  185.            The Rom-Bios read attribute and character at the cursor routine
  186.         is used. This should be compatible if your Rom-Bios is compatable.
  187.         This is slower than using GETCGA, or GETMON.
  188.            This function does not clear the window after saving it, but
  189.         once saved you may do anything to the window area, and restore
  190.         the saved window contents using PUTVID().
  191.  
  192.         nrs = first row of window
  193.         ncs = first col of window
  194.         nre = last row of window
  195.         nce = last col of window
  196.         seg = segment of allocated memory, as output from ALLMEM().
  197.  
  198.         Note: To calcualte the number of paragraphs to request from ALLMEM()
  199.               calculate the following:
  200.  
  201.                 Npar= (((nr*nc)*2)+15)/16  ; nr=nre-nrs+1, nc=nce=ncs+1
  202.  
  203.         Example:
  204.                 Npar=  (((11*41)*2)+15)/16
  205.                 call ALLMEM(Npar,SEG,MaxPar)
  206.                 if(SEG.eq.7 .or. SEG.eq.8)Go To 1000 ;Error !
  207.                 call GETVID(0,0,10,40,SEG)
  208.  
  209.         See Wopen(),Wclose().
  210.         Int 10h, fx 08h
  211.  
  212.         CGA, Mono, EGA
  213.        APR 1988                FAT-VIDEO 1.21  PUTVID          Page V-29
  214.  
  215.  
  216.         PUTVID(NRS,NCS,NRE,NCE,SEG) - Copy memory at SEG to Screen.
  217.  
  218.         Usage:
  219.  
  220.           call putvid(nrs,ncs,nre,nce,seg)
  221.  
  222.           integer*2 nrs,ncs
  223.           integer*2 nre,nce
  224.           integer*2 seg or integer*4 seg
  225.  
  226.           inputs: nrs,ncs,nre,nce,seg
  227.  
  228.           returns: none
  229.  
  230.           MS-Fortran 4.0 Large Model
  231.  
  232.         Description:
  233.  
  234.            This subroutine restores the window section defined by nrs,ncs
  235.         and nre,nce onto the screen.  It is up to the calling program to
  236.         free storage via FREMEM(). This routine restores the video
  237.         buffer, character bytes, and attribute bytes for the window
  238.         defined.
  239.            The Rom-Bios write attribute and byte at the cursor routine is
  240.         used. Therefore, this should be compatible if your Rom-Bios is
  241.         compatible. This is slower than putcga and putmon, though.
  242.            This will over write the current screen contents in the window
  243.         defined, with the contents in the buffer at SEG.
  244.  
  245.         nrs = first row of window
  246.         ncs = first col of window
  247.         nre = last row of window
  248.         nce = last col of window
  249.         Seg = segmen address used in GETVID()
  250.  
  251.         Example:
  252.                 call PUTVID(0,0,10,40,seg)
  253.                 call FREMEM(Seg,Ier)
  254.                 if(Ier.ne.0)Go To 1000   ; Error !
  255.  
  256.         See Wopen(),Wclose()
  257.         Int 10h, fx-09h
  258.  
  259.         CGA, Mono, EGA
  260.        APR 1988                FAT-VIDEO 1.21  GETCGA          Page V-30
  261.  
  262.  
  263.         GETCGA(NRS,NCS,NRE,NCE,SEG) - Copies Screen to memory at SEG.
  264.  
  265.         Usage:
  266.  
  267.           call getcga(nrs,ncs,nre,nce,seg)
  268.  
  269.           integer*2 nrs,ncs
  270.           integer*2 nre,nce
  271.           integer*2 seg or integer*4 seg
  272.  
  273.           inputs: nrs,ncs,nre,nce,seg
  274.  
  275.           returns: none
  276.  
  277.           MS-Fortran 4.0 Large Model
  278.  
  279.         Description:
  280.  
  281.            This subroutine stores the window section defined by nrs,ncs
  282.         and nre,nce on the screen into the buffer starting at seg.  It is
  283.         up to the calling program to allocate storage via ALLMEM().
  284.  
  285.            This routine stores the cga buffer character and attribute
  286.         bytes for the window defined, in the memory at SEG.
  287.  
  288.            This routine reads directly from the cga video memory buffer,
  289.         but checks the video controllers retrace to eliminate snow.
  290.  
  291.            This function does not clear the window after saving it, but
  292.         once saved you may do anything to the window area, and restore
  293.         the saved window contents using PUTCGA().
  294.  
  295.         nrs = upper-left row of window
  296.         ncs = upper-left col of window
  297.         nre = lower-right row of window
  298.         nce = lower-right col of window
  299.         seg = segment of allocated memory, as output from ALLMEM().
  300.  
  301.         Note: To calcualte the number of paragraphs to request from ALLMEM()
  302.               calculate the following:
  303.  
  304.                 Npar= (((nr*nc)*2)+15)/16  ; nr=nre-nrs+1, nc=nce=ncs+1
  305.  
  306.         Example:
  307.                 Npar=  (((11*41)*2)+15)/16
  308.                 call ALLMEM(Npar,SEG,MaxPar)
  309.                 if(SEG.eq.7 .or. SEG.eq.8)Go To 1000 ;Error !
  310.                 call GETVID(0,0,10,40,SEG)
  311.  
  312.         Restrictions:   80 column mode only !
  313.  
  314.         See Wopen(),Wclose()
  315.  
  316.         Int none
  317.  
  318.         CGA Only !!!
  319.        APR 1988                FAT-VIDEO 1.21  PUTCGA          Page V-31
  320.  
  321.  
  322.         PUTCGA(NRS,NCS,NRE,NCE,SEG) - Copy memory at SEG to the screen.
  323.  
  324.         Usage:
  325.  
  326.           call putcga(nrs,ncs,nre,nce,seg)
  327.  
  328.           integer*2 nrs,ncs
  329.           integer*2 nre,nce
  330.           integer*2 seg or integer*4 seg
  331.  
  332.           inputs: nrs,ncs,nre,nce,seg
  333.  
  334.           returns: none
  335.  
  336.           MS-Fortran 4.0 Large Model
  337.  
  338.         Description:
  339.  
  340.            This subroutine restores the window section defined by nrs,ncs
  341.         and nre,nce onto the screen.  It is up to the calling program to
  342.         free storage via FREMEM().
  343.  
  344.            This routine restores the cga buffer character and attribute
  345.         bytes, for the window defined.
  346.  
  347.            This routine writes directly to the cga video memory buffer,
  348.         but checks the video controllers retrace to eliminate snow.
  349.  
  350.         nrs = upper-left row of window
  351.         ncs = upper-left col of window
  352.         nre = lower-right row of window
  353.         nce = lower-right col of window
  354.         Seg = segmen address used in GETCGA()
  355.  
  356.         Example:
  357.                 call PUTCGA(0,0,10,40,seg)
  358.                 call FREMEM(Seg,Ier)
  359.                 if(Ier.ne.0)Go To 1000   ; Error !
  360.  
  361.         Restrictions:   80 column mode only !
  362.  
  363.         See Wopen(),Wclose().
  364.  
  365.         Int none
  366.  
  367.         CGA Only !!!
  368.  
  369.