home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing 21.9 Equip()
- EXTERNAL CALLS: - Dec2Bin(), contained in the file CHP2111.PRG
- - Ft_Peek(), contained in the file PEEK.OBJ
- written by the inimitable Ted Means, part of
- the public domain NANFORUM Library
- Author: Joe Booth
- Excerpted from "Clipper 5: A Developer's Guide"
- Copyright (c) 1991 M&T Books
- 501 Galveston Drive
- Redwood City, CA 94063-4728
- (415) 366-3600
- */
-
- //───── NOTE: must compile with the /N option!
-
- function equip
- LOCAL eByte1 := Ft_peek(0,272)
- LOCAL eByte2 := Ft_peek(0,273)
- LOCAL bString1 := "", bString2 := ""
- LOCAL arr_ := {}, cSport
- bString1 := padl(dec2bin(eByte1), 8, "0")
- bString2 := padl(dec2bin(eByte2), 8, "0")
- cSport := substr(bstring2, 7, 1) + substr(bstring2, 6, 1)
- Aadd(arr_, str(bin2dec(cSport), 2)+" Serial Ports")
- Aadd(arr_, if(substr(bstring2, 4, 1) == "1", "", "No ") + "Game Port")
- Aadd(arr_, if(substr(bstring2, 8, 1) == "1", "", "No ") + "DMA Chip")
- return arr_
-
- // end of file CHP2109.PRG
-