home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a012 / 1.ddi / CHAP21.EXE / CHP2109.PRG < prev    next >
Encoding:
Text File  |  1991-04-30  |  1.1 KB  |  31 lines

  1. /*
  2.    Listing 21.9  Equip()
  3.    EXTERNAL CALLS: - Dec2Bin(), contained in the file CHP2111.PRG
  4.                    - Ft_Peek(), contained in the file PEEK.OBJ
  5.                      written by the inimitable Ted Means, part of
  6.                      the public domain NANFORUM Library
  7.    Author: Joe Booth
  8.    Excerpted from "Clipper 5: A Developer's Guide"
  9.    Copyright (c) 1991 M&T Books
  10.                       501 Galveston Drive
  11.                       Redwood City, CA 94063-4728
  12.                       (415) 366-3600
  13. */
  14.  
  15. //───── NOTE: must compile with the /N option!
  16.  
  17. function equip
  18. LOCAL eByte1 := Ft_peek(0,272)
  19. LOCAL eByte2 := Ft_peek(0,273)
  20. LOCAL bString1 := "", bString2 := ""
  21. LOCAL arr_ := {}, cSport
  22. bString1 := padl(dec2bin(eByte1), 8, "0")
  23. bString2 := padl(dec2bin(eByte2), 8, "0")
  24. cSport := substr(bstring2, 7, 1) + substr(bstring2, 6, 1)
  25. Aadd(arr_, str(bin2dec(cSport), 2)+" Serial Ports")
  26. Aadd(arr_, if(substr(bstring2, 4, 1) == "1", "", "No ") + "Game Port")
  27. Aadd(arr_, if(substr(bstring2, 8, 1) == "1", "", "No ") + "DMA Chip")
  28. return arr_
  29.  
  30. // end of file CHP2109.PRG
  31.