home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / basic / library / qb_pds / communic / cd_check / cd-check.bas next >
Encoding:
BASIC Source File  |  1994-05-30  |  813 b   |  19 lines

  1. ' This is a example of how to test yourself with a bios call
  2. ' if Carrier Detect is present in your basic programs. (quickly!)
  3. ' This compiles under the MicroSoft's Professional Basic Compiler  v7.x (DOS)
  4. ' ------------------------------------------------ By:   R. Pierce ----------
  5. ' $INCLUDE: 'QBX.BI'
  6. DIM regs AS RegType
  7. regs.dx = &H0'    0=com port 1 or 1=com port 2
  8. regs.ax = &H3
  9. CALL Interrupt(&H14, regs, regs)
  10. code% = regs.ax AND &H80
  11. ' <code%=128 if CD is present, zero otherwise>
  12. IF code% = 0 THEN PRINT "No Carrier" ELSE PRINT "Carrier Detected"
  13. END
  14. '
  15. 'A little ditty from:      The BoardWalk BBS   (you must load the qbx.qlb Lib
  16. '                          Pittsburgh, Pa.      when you start the QBX system
  17. '                          (412) 928-8577       like this: QBX /L QBX.QLB)
  18.  
  19.