home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol131 / getext.src < prev    next >
Encoding:
Text File  |  1984-04-29  |  1.1 KB  |  36 lines

  1. ****************************************************************
  2.  
  3. *                        GETEXT                                 *
  4.  
  5. *****************************************************************
  6.  
  7.                   NAME GETEXT
  8.                   ENTRY GETEXT
  9.  
  10. ;FUNCTION:Gets text from console.Maximum buffer size
  11. ;is set by cbuff0.Start address of buffer = conbuff.
  12.  
  13. BIOS equ 5
  14. RBUF equ 0Ah ;BIOS function code (= read console)
  15. BUFSIZ equ 40
  16.                 
  17. GETEXT:         push h
  18.                 push d
  19.                 push b
  20.                 lxi d,cbuff0  ;address for BIOS
  21.                 mvi c,rbuf
  22.                 call BIOS
  23.                 pop b
  24.                 pop d
  25.                 pop h
  26.                 ret
  27. cbuff0:         db BUFSIZ    ;first byte of buffer,transmits
  28.                              ;maximum size of buffer to BIOS.
  29. cbuff1:         db 0h        ;BIOS records here how many 
  30.                              ;bytes were read.
  31. conbuff:        ds BUFSIZ     ;reserves bytes for buffer
  32.  
  33.                 END GETEXT
  34.  
  35. *******************************************************************
  36.