home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 2
/
ctrom_ii_b.zip
/
ctrom_ii_b
/
PROGRAM
/
BASIC
/
QBS_0103
/
QBS103-7.DOC
< prev
next >
Wrap
Text File
|
1993-04-30
|
39KB
|
1,137 lines
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #2737
Date: 03-25-93 15:31 (Public)
From: DIRK THEURER
To: ALL
Subject: CND-DET routines 1/8
────────────────────────────────────────────────────────────────────────────────
Zack,
Thanks for allowing me to post the following code (8 messages total, all
less than 80 lines).
'--------8<-------------------- snip here -------------------->8--------
'
' CND-DET routines (part 1)
'
' Calling Number Display ("Caller ID" in the US) routines
'
' (c)opyright 1993, Dirk Theurer
'
' This code is placed in the public domain. Use as you see fit. It is NOT
' completely free of 'bugs' but it works in the program it was written for.
'
' Notes: - All of the following code was really a 'hack' to see what could
' be derived from CND (CID). It is not documented very well but I
' think that most of it should be decipherable.
' - There are references to other routines and/or programs. Ignore
' them as best as you can.
' - USE AT YOUR OWN RISK!
' - Enjoy! :-)
'
TYPE CNDType
'
' Data TYPE for CND routines/programs
'
CNDDate AS STRING * 6
CNDTime AS STRING * 6
CNDNumber AS STRING * 13
CNDName AS STRING * 35
CNDCRC AS INTEGER
CNDAttrib AS INTEGER
'
' CNDAttrib
'
' 1 - in-area-code (7 digits)
' 2 - other-area-code (10 digits)
' 3 - in-area-code/DAT ' /in CND.DAT number attributes are
' 4 - other-area-code/DAT ' gained by adding 2 to previous
' ' -area-code attribute
' 5 - in-area-code/DAT/BAD ' /BAD number attributes are gained
' 6 - out-area-code/DAT/BAD ' by adding 2 to previous -area-code
' ' /DAT attribute
' 7 - out of area
' 8 - private
'
' 9 - unknown number format (not 7 or 10 digits but processed anyway)
' 10 - error getting CND data
' (non-fatal - data is processed but not reliable)
'
CNDOther AS INTEGER
'
' CNDOther is used by other programs to determine various attributes
'
' Currently, only CND-CHK uses bit 0 to see if it's already read the last
' entry.
'
CRLF AS STRING * 2
END TYPE
DIM SHARED CND AS CNDType
DECLARE FUNCTION GetCNDNumber% ()
DECLARE FUNCTION GetChar$ ()
CND.CRLF = CHR$(13) + CHR$(10)
'
' Continues...
'
---
* Origin: RAVE * Burnaby, BC (1:153/810)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #2738
Date: 03-25-93 15:32 (Public)
From: DIRK THEURER
To: ALL
Subject: CND-DET routines 2/8
────────────────────────────────────────────────────────────────────────────────
'
' CND-DET routines (part 2)
'
FUNCTION GetChar$
GetChar$ = ""
Regs.AX = &H300 ' Get FOSSIL status
Regs.DX = PortNo
Interrupt &H14, Regs, Regs
IF Regs.AX >= 0 THEN
IF (Regs.AX AND &H100) THEN
Regs.AX = &H200 ' Receive character with wait
Regs.DX = PortNo
Interrupt &H14, Regs, Regs
GetChar$ = CHR$(Regs.AX)
END IF
END IF
END FUNCTION
FUNCTION GetCNDNumber%
'
' GetCNDNumber% returns three values:
'
' 0 - (actually shouldn't be returned - indicates that number has been
' processed but function is not exitted)
' 1 - complete CND number and data received in CND
' 2 - function exit requested (Q from keyboard)
' 3 - junk in 'U's data stream
' 4 - junk between 'U's data stream and CTRL-D
' 5 - timed out getting number of chars in data
' 6 - time-out while receiving data
' 7 - received invalid number of characters (not the same as indicated)
' 8 - time-out receiving CRC value
' 9 - got CTRL-D without 'U's stream
'
'-------------------------------------------------------------------------
'
' CND data format:
'
' UUUUUUUUUUUUUUUUUUUUUUUUUUUUUU*nmmddhhmm###############c
'
' ^ ^^^ ^ ^ ^ ^ ^
' └─────── series of 30 'U's │││ │ │ │ │ │
' start of data (ASCII 4) ───┘││ │ │ │ │ │
' number of characters in data ────┘│ │ │ │ │ │
' 2 digit month (leading 0) ─────┘ │ │ │ │ │
' 2 digit day (leading 0) ───────┘ │ │ │ │
' 2 digit hour (leading 0) ─────────┘ │ │ │
' 2 digit minute (leading 0) ───────────┘ │ │
' phone number data (if any) ─────────────┘ │
' crc (???) ────────────────────────────┘
'
' Continues...
'
---
* Origin: RAVE * Burnaby, BC (1:153/810)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #2739
Date: 03-25-93 15:33 (Public)
From: DIRK THEURER
To: ALL
Subject: CND-DET routines 3/8
────────────────────────────────────────────────────────────────────────────────
'
' CND-DET routines (part 3)
'
'
' Notes:
'
' - I have NO idea why an "End of transmission" (ASCII 4) is used to
' signal the START of the actual phone number data stream!... and
' nothing is used to signal the actual END of data! What gives?!?!
' - number of characters in data indicates exactly how many characters
' there are between itself and the CRC value
' - phone number data can be single character indicating some "other"
' condition on the data:
' - out of area (a single upper-case O)
' - private (a single upper-case P)
' - others??? (I haven't seen any yet)
' - I have not been able to completely figure out how the CRC is
' calculated. I got this 'explanation' from a friend:
' "The CRC is the twos compliment of the modulo 256 sum of the other
' words in the data message". I suppose that the 'data message' is
' just the date/time/phone number portion...???
'
' - I've recently received a CRC routine that might work for the CRC
' portion of CND data. I've placed in a commented block near where it
' would "do the most good". Thanks go to Quinn Tyler Jackson for the
' 'snippet'!
'
'-------------------------------------------------------------------------
DIM Private AS INTEGER
DIM OutOfArea AS INTEGER
DIM PreviousNo AS INTEGER
DIM CTRLD AS INTEGER
DIM NoOfUs AS INTEGER
DIM Junk AS INTEGER
DIM DataLength AS INTEGER
DIM CNDData AS STRING
DIM TempCRCSum AS LONG
Private = False
OutOfArea = False
PreviousNo = False
CTRLD = False
NoOfUs = 0
Junk = False
DataLength = 0
CNDData = ""
'
' initialize CND data
'
CND.CNDAttrib = 0
CND.CNDDate = ""
CND.CNDTime = ""
CND.CNDNumber = ""
CND.CNDCRC = 0
CND.CNDName = ""
CND.CNDOther = 0
'
' Continues...
'
---
* Origin: RAVE * Burnaby, BC (1:153/810)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #2740
Date: 03-25-93 15:34 (Public)
From: DIRK THEURER
To: ALL
Subject: CND-DET routines 4/8
────────────────────────────────────────────────────────────────────────────────
'
' CND-DET routines (part 4)
'
'
' initialize function value
'
GetCNDNumber% = 0
'
' main loop checks for incoming CND data or keyboard data
'
' start of loop
' if incoming CND data
' process data (ignore keyboard)
' if keyboard data
' process keyboard data (ignore CND)
' end of loop
'
DO
'
' check for incoming CND data
'
i$ = GetChar$
IF i$ <> "" THEN
SELECT CASE ASC(i$)
CASE 85 ' U
IF NoOfUs = 0 THEN
Junk = False
ELSE
IF Junk THEN
'
' fatal error - junk in middle of "U"s stream
'
FOR i = 1 TO 500: NEXT i
FOSSILFlush
GetCNDNumber% = 3
EXIT FUNCTION
END IF
END IF
NoOfUs = NoOfUs + 1
CASE 4 ' CTRL-D
IF NoOfUs THEN
IF NOT Junk THEN
IF NoOfUs <> 30 THEN
'
' non-fatal error in data stream?
' (at least till someone tells me otherwise)
'
CND.CNDAttrib = 10
END IF
ELSE
'
' fatal error - got junk between "U"s and CTRL-D
'
FOR i = 1 TO 500: NEXT i
FOSSILFlush
GetCNDNumber% = 4
EXIT FUNCTION
END IF
'
' Continues...
'
---
* Origin: RAVE * Burnaby, BC (1:153/810)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #2741
Date: 03-25-93 15:35 (Public)
From: DIRK THEURER
To: ALL
Subject: CND-DET routines 5/8
────────────────────────────────────────────────────────────────────────────────
'
' CND-DET routines (part 5)
'
'
' get number of characters in data to follow
'
NoOfUs = 0
Timeout = 0
DO
i$ = GetChar$
IF i$ <> "" THEN
Timeout = 0
EXIT DO
END IF
Timeout = Timeout + 1
LOOP WHILE Timeout < 500
IF Timeout THEN
'
' fatal error - timed out getting number of chars in data
'
FOR i = 1 TO 500: NEXT i
FOSSILFlush
GetCNDNumber% = 5
EXIT FUNCTION
END IF
DataLength = ASC(i$)
NoOfGottenChars = 0
'
' Timeout should be zero coming in here
'
DO
i$ = GetChar$
IF i$ <> "" THEN
SELECT CASE ASC(i$)
CASE 48 TO 57 ' 0 to 9
'
' number is fine
'
CASE 79, 80 ' O (out of area) or P (private)
'
' should only occur at end of data - non-fatal error
' otherwise
'
IF NoOfGottenChars + 1 <> DataLength THEN
CND.CNDAttrib = 10
END IF
CASE ELSE
'
' any other characters during data stream indicates
' non-fatal error
'
CND.CNDAttrib = 10
END SELECT
CNDData = CNDData + i$
NoOfGottenChars = NoOfGottenChars + 1
Timeout = 0
ELSE
Timeout = Timeout + 1
IF Timeout > 500 THEN
'
' fatal error - timed out trying to receive indicated
' number of data characters
'
FOR i = 1 TO 50: NEXT i
FOSSILFlush
GetCNDNumber% = 6
EXIT FUNCTION
END IF
END IF
LOOP WHILE NoOfGottenChars < DataLength
'
' Continues...
'
---
* Origin: RAVE * Burnaby, BC (1:153/810)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #2742
Date: 03-25-93 15:36 (Public)
From: DIRK THEURER
To: ALL
Subject: CND-DET routines 6/8
────────────────────────────────────────────────────────────────────────────────
'
' CND-DET routines (part 6)
'
IF NoOfGottenChars < DataLength THEN
GetCNDNumber% = 7
FOR i = 1 TO 500: NEXT i
FOSSILFlush
EXIT FUNCTION
'
' fatal error - number of characters received did not match
' indicated number of characters
'
ELSE
Timeout = 0 ' might not need to set this one
DO
i$ = GetChar$
IF i$ <> "" THEN
Timeout = 0
EXIT DO
END IF
Timeout = Timeout + 1
LOOP WHILE Timeout < 500
IF Timeout THEN
'
' fatal error - timed out getting CRC value
'
GetCNDNumber% = 8
FOR i = 1 TO 500: NEXT i
FOSSILFlush
EXIT FUNCTION
END IF
'
' received all CND data for current call
'
' format into CND data type
'
CND.CNDCRC = ASC(i$)
'
' - The following 'snippet' is from Quinn Tyler Jackson. It is a POSSIBLE
' method of calculating the CRC for the CND data packet. (It makes sense
' to me too, Quinn. :-) )
' - I've modified Quinn's original snippet to use my own variable
' names ("CNDData" which is DIMmed as variable length string and
' I DIMmed TempCRCSum as LONG for the temporary sum).
' - This snippet has NOT BEEN TESTED! (I _hope_ it works. %-} )
'
' Verbal description given to me:
' "The CRC is the twos compliment of the modulo 256 sum of the other
' words in the data message."
'
' Quinn's interpretation (most likely accurate or VERY close):
' "Add up the ASCII values of the bytes of the data, MOD 256 the
' result, and NOT that."
'
' TempCRCSum = 0
' FOR i% = LEN(CNDData)
' TempCRCSum = TempCRCSum + ASC(MID$(CNDData, i%, 1))
' NEXT i%
' TempCRCSum = NOT(TempCRCSum MOD 256)
'
' TempCRCSum can be converted to an integer and compared directly to
' CND.CNDCRC. If they match, then all the credit goes to Quinn! :-)
'
'
' Continues...
'
---
* Origin: RAVE * Burnaby, BC (1:153/810)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #2743
Date: 03-25-93 15:37 (Public)
From: DIRK THEURER
To: ALL
Subject: CND-DET routines 7/8
────────────────────────────────────────────────────────────────────────────────
'
' CND-DET routines (part 7)
'
CND.CNDDate = LEFT$(CNDData, 2) + "-" + MID$(CNDData, 3, 2)
CND.CNDTime = MID$(CNDData, 5, 2) + ":" + MID$(CNDData, 7, 2)
SELECT CASE RIGHT$(CNDData, 1)
CASE "O"
IF NOT CND.CNDAttrib THEN CND.CNDAttrib = 7
CND.CNDNumber = "Out of area "
CASE "P"
IF NOT CND.CNDAttrib THEN CND.CNDAttrib = 8
CND.CNDNumber = "Private "
CASE ELSE
SELECT CASE DataLength - 8 ' phone data length
CASE 7
IF NOT CND.CNDAttrib THEN CND.CNDAttrib = 1
' the following 2 lines can be 'concatenated' into
' a single line
CND.CNDNumber = MID$(CNDData, 9, 3) + "-"
CND.CNDNumber = CND.CNDNumber + MID$(CNDData, 12, 4)
CASE 10
IF NOT CND.CNDAttrib THEN CND.CNDAttrib = 2
' the following 4 lines can be 'concatenated' into
' a single line
CND.CNDNumber = MID$(CNDData, 9, 3) + "-"
CND.CNDNumber = CND.CNDNumber + MID$(CNDData, 12, 3)
CND.CNDNumber = CND.CNDNumber + "-"
CND.CNDNumber = CND.CNDNumber + MID$(CNDData, 15, 4)
CASE ELSE
IF NOT CND.CNDAttrib THEN CND.CNDAttrib = 9
CND.CNDNumber = MID$(CNDData, 9, DataLength - 9)
END SELECT
END SELECT
'
' GetCNDNumber% got and parsed all CND info for this call
'
CNDData = ""
GetCNDNumber% = 1
FOR i = 1 TO 500: NEXT i
FOSSILFlush
EXIT FUNCTION
END IF
ELSE
'
' got CTRL-D without 'U's stream
'
GetCNDNumber% = 9
FOR i = 1 TO 500: NEXT i
FOSSILFlush
EXIT FUNCTION
END IF
'
' end of CTRL-D case
'
CASE ELSE
Junk = True
END SELECT
'
' end of get character from FOSSIL
'
END IF
'
' Continues...
'
---
* Origin: RAVE * Burnaby, BC (1:153/810)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #2744
Date: 03-25-93 15:37 (Public)
From: DIRK THEURER
To: ALL
Subject: CND-DET routines 8/8
────────────────────────────────────────────────────────────────────────────────
'
' CND-DET routines (part 8)
'
'
' see if anything in keyboard
'
i$ = INKEY$
SELECT CASE LEN(i$)
CASE 0
'
' no character
'
CASE 1
SELECT CASE ASC(UCASE$(i$))
CASE 81 ' Q uit
GetCNDNumber% = 2
FOR i = 1 TO 500: NEXT i
FOSSILFlush
EXIT FUNCTION
CASE ELSE
END SELECT
CASE 2
SELECT CASE ASC(RIGHT$(i$, 1))
CASE 72 ' up arrow
FOR i = 1 TO 500: NEXT i
FOSSILFlush
GetCNDNumber% = 72
EXIT FUNCTION
CASE 80 ' down arrow
FOR i = 1 TO 500: NEXT i
FOSSILFlush
GetCNDNumber% = 80
EXIT FUNCTION
CASE 71 ' Home
FOR i = 1 TO 500: NEXT i
FOSSILFlush
GetCNDNumber% = 71
EXIT FUNCTION
CASE 79 ' End
FOR i = 1 TO 500: NEXT i
FOSSILFlush
GetCNDNumber% = 79
EXIT FUNCTION
CASE 73 ' PgUp
FOR i = 1 TO 500: NEXT i
FOSSILFlush
GetCNDNumber% = 73
EXIT FUNCTION
CASE 81 ' PgDn
FOR i = 1 TO 500: NEXT i
FOSSILFlush
GetCNDNumber% = 81
EXIT FUNCTION
CASE ELSE
END SELECT
CASE ELSE
'
' shouldn't be any such case!
'
END SELECT
LOOP
'
' end of GetCNDNumber%
'
END FUNCTION
,
,--------8<-------------------- snip here -------------------->8--------
Use and ENJOY!
Dirk
---
* Origin: RAVE * Burnaby, BC (1:153/810)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #2931
Date: 03-26-93 09:24 (Public)
From: DOUGLAS LUSHER
To: ROBERT CHURCH
Subject: DISK NOT READY, AND GENER
────────────────────────────────────────────────────────────────────────────────
RC>How can I detect these before they happen? Here's the scenario.
RC>I call FindFirst. Remember this is on a floppy drive. If the disk isn't
RC>there the system locks up! I don't wan't to use error trapping if I can
RC>help it. What can I do? BTW, the FindFirst routine sets an error flag if
RC>an error occured (DOSError%).
You can use the function below to determine if there is a disk in
a floppy drive. It returns True (-1) if the specified floppy drive is
has a disk in it and is ready to go. Be sure to load QB with the /L
switch. Then use the function as follows:
'$INCLUDE: 'QB.BI'
D$ = "A:"
IF FloppyDriveReady(D$) THEN
'do whatever you want on the drive, there's a disk in it
ELSE
'no disk is present in the drive, or there is some other
'problem with it.
END IF
FUNCTION FloppyDriveReady% (Drive$)
DIM Register as RegType
Drive% = (ASC(Drive$) OR 32) - 97
'reset floppy drive
Register.AX = 0
Register.DX = Drive%
CALL Interrupt(&H13, Register, Register)
Register.AX = &H401
Register.CX = &H101
Register.DX = Drive%
CALL Interrupt(&H13, Register, Register)
'call the interrupt twice since if a disk has just been inserted,
'the first time gives a wrong answer
Register.AX = &H401
Register.CX = &H101
Register.DX = Drive%
CALL Interrupt(&H13, Register, Register)
FloppyDriveReady% = ((Register.Flags AND 1) = 0)
END FUNCTION
By the way, if you're doing a lot of work on floppy drives, you might
also want to check if the disk in the drive is write-protected or not.
I have code for that also, if you need it. The function above tests only
that a disk is present. If you try to write to a protected disk, you'll
still get an error.
---
■ SLMR 2.1a ■ I love it when a plan comes together.
--- TMail v1.30.4
* Origin: TC-AMS MLTBBS 2.2 - Minnetonka, MN (612)-938-4799 (1:282/7)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #3296
Date: 03-25-93 05:57 (Public)
From: JOHN GUILLORY
To: DICK DENNISON
Subject: CD-ROM
────────────────────────────────────────────────────────────────────────────────
---------------------------------------------
INT 2F - Multiplex - CDROM - INSTALLATION CHECK
AX = 1500h
BX = 0000h
Return: BX = number of CDROM drive letters used
CX = starting drive letter (0=A:)
Note: this installation check DOES NOT follow the format used by other
software
---------------------------------------------
INT 2F - Multiplex - CDROM - GET DRIVE DEVICE LIST
AX = 1501h
ES:BX -> buffer to hold drive letter list (5 bytes per drive letter)
Return: buffer filled, for each drive letter
BYTE subunit number in driver
DWORD address of device driver header
---------------------------------------------
INT 2F - Multiplex - CDROM - GET COPYRIGHT FILE NAME
AX = 1502h
ES:BX -> 38-byte buffer for name of copyright file
CX = drive number (0=A:)
Return: CF set if drive is not a CDROM drive
AX = 15 (invalid drive)
SeeAlso: AX=1503h
---------------------------------------------
INT 2F - Multiplex - CDROM - GET ABSTRACT FILE NAME
AX = 1503h
ES:BX -> 38-byte buffer for name of abstract file
CX = drive number (0=A:)
Return: CF set if drive is not a CDROM drive
AX = 15 (invalid drive)
SeeAlso: AX=1502h
---------------------------------------------
INT 2F - Multiplex - CDROM - GET BIBLIOGRAPHIC DOC FILE NAME
AX = 1504h
ES:BX -> 38-byte buffer for name of bibliographic documentation file
CX = drive number (0=A:)
Return: CF set if drive is not a CDROM drive
AX = 15 (invalid drive)
---------------------------------------------
INT 2F - Multiplex - CDROM - READ VTOC
AX = 1505h
ES:BX -> 2048-byte buffer
CX = drive number (0=A:)
DX = sector index (0=first volume descriptor,1=second,...)
Return: CF set on error
AX = error code (15=invalid drive,21=not ready)
CF clear if successful
AX = volume descriptor type (1=standard,FFh=terminator,0=other)
---------------------------------------------
INT 2F - Multiplex - CDROM - TURN DEBUGGING ON
AX = 1506h
BX = debugging function to enable
Note: reserved for development
SeeAlso: AX=1507h
---------------------------------------------
INT 2F - Multiplex - CDROM - TURN DEBUGGING OFF
AX = 1507h
BX = debugging function to disable
Note: reserved for development
SeeAlso: AX=1506h
---------------------------------------------
INT 2F - Multiplex - CDROM - ABSOLUTE DISK READ
AX = 1508h
ES:BX -> buffer
CX = drive number (0=A:)
SI:DI = starting sector number
DX = number of sectors to read
Return: CF set on error
AL = error code (15=invalid drive,21=not ready)
SeeAlso: AX=1509h
---------------------------------------------
INT 2F - Multiplex - CDROM - ABSOLUTE DISK WRITE
AX = 1509h
ES:BX -> buffer
CX = drive number (0=A:)
SI:DI = starting sector number
DX = number of sectors to write
Note: corresponds to INT 26h and is currently reserved and nonfunctional
SeeAlso: AX=1508h
---------------------------------------------
INT 2F - Multiplex - CDROM - RESERVED
AX = 150Ah
---------------------------------------------
INT 2F - Multiplex - CDROM 2.00 - DRIVE CHECK
AX = 150Bh
CX = drive number (0=A:)
Return: BX = ADADh if MSCDEX.EXE installed
AX = 0000h if drive not supported
nonzero if supported
SeeAlso: AX=150Dh
---------------------------------------------
INT 2F - Multiplex - CDROM 2.00 - GET MSCDEX.EXE VERSION
AX = 150Ch
Return: BH = major version
BL = minor version
Note: MSCDEX.EXE versions prior to 1.02 return BX=0
---------------------------------------------
INT 2F - Multiplex - CDROM 2.00 - GET CDROM DRIVE LETTERS
AX = 150Dh
ES:BX -> buffer for drive letter list (1 byte per drive)
Return: buffer filled with drive numbers (0=A:). Each byte corresponds
to the drive in the same position for function 1501h
SeeAlso: AX=150Bh
---------------------------------------------
INT 2F - Multiplex - CDROM 2.00 - GET/SET VOLUME DESCRIPTOR PREFERENCE
AX = 150Eh
BX = subfunction
00h get preference
DX = 0000h
Return: DX = preference settings
01h set preference
DH = volume descriptor preference
01h = primary volume descriptor
02h = supplementary volume descriptor
DL = supplementary volume descriptor preference
01h = shift-Kanji
CX = drive number (0=A:)
Return: CF set on error
AX = error code (15=invalid drive,1=invalid function)
---------------------------------------------
INT 2F - Multiplex - CDROM 2.00 - GET DIRECTORY ENTRY
AX = 150Fh
CX = drive number (0=A:)
ES:BX -> ASCIZ path name
SI:DI -> 255-byte buffer for directory entry
Return: CF set on error
AX = error code
CF clear if succesful
AX = disk format (0=High Sierra,1=ISO 9660)
Format of directory entry:
Offset Size Description
00h BYTE length of directory entry
01h BYTE length of XAR in LBN's (don't ask me what that means...)
02h DWORD LBN of data, Intel (little-endian) format
06h DWORD LBN of data, Motorola (big-endian) format
0Ah DWORD length of file, Intal format
0Eh DWORD length of file, Motorola format
---High Sierra---
12h 6 BYTEs date and time
18h BYTE bit flags
19h BYTE reserved
---ISO 9660---
12h 7 BYTEs date and time
19h BYTE bit flags
---both formats---
1Ah BYTE interleave size
1Bh BYTE interleave skip factor
1Ch WORD volume set sequence number, Intel format
1Eh WORD volume set sequence number, Motorola format
20h BYTE length of file name
21h N BYTEs file name
BYTE (optional) padding if filename is odd length
N BYTEs system data
---------------------------------------------
INT 2F - Multiplex - CDROM 2.10 - SEND DEVICE DRIVER REQUEST
AX = 1510h
CX = CD-ROM drive letter (0 = A, 1 = B, etc)
ES:BX -> CD-ROM device driver request header (see AX=0802h)
---------------------------------------------
INT 2F - Multiplex - ???
AH = 16h
???
Return: ???
Note: called by MS Windows
---------------------------------------------
INT 2F - Multiplex - MS WINDOWS "WINOLDAP" - IDENTIFY WinOldAp VERSION
AX = 1700h
Return: AX = 1700h if this version of WINOLDAP doesn't support clipboard
AX <> 1700h
AL = WINOLDAP major version
AH = WINOLDAP minor version
Note: WinOldAp (WINOLDAP.MOD) is a Microsoft Windows extension supporting
"old" (character-mode) application access to Dynamic Data Exchange,
menus, and the Windows clipboard.
---------------------------------------------
INT 2F - Multiplex - MS WINDOWS "WINOLDAP" - OPEN CLIPBOARD
AX = 1701h
Return: AX <> 0 success
AX = 0 clipboard is already open
---------------------------------------------
INT 2F - Multiplex - MS WINDOWS "WINOLDAP" - EMPTY CLIPBOARD
AX = 1702h
Return: AX <> 0 clipboard has been emptied
AX = 0 failure
---------------------------------------------
INT 2F - Multiplex - MS WINDOWS "WINOLDAP" - SET CLIPBOARD DATA
AX = 1703h
DX = clipboard format supported by WinOldAp:
01h text
02h bitmap
03h metafile picture
04h SYLK
05h DIF
06h TIFF
07h OEM text
ES:BX -> data (see below for formats)
SI:CX = size of data
Return: AX <> 0 data copied into the Clipboard
AX = 0 failure
Format of bitmap:
Offset Size Description
00h WORD type (0000h)
02h WORD width of bitmap in pixels
04h WORD height of bitmap in pixels
06h WORD bytes per line
08h BYTE number of color planes
09h BYTE number of adjacent color bits in pixel
0Ah DWORD pointer to start of data
0Eh WORD width in 0.1mm units
10h WORD height in 0.1mm units
12h N BYTEs bitmap data
Format of metafile picture:
Offset Size Description
00h WORD mapping mode
02h WORD X extent
04h WORD Y extent
06h WORD picture data
---------------------------------------------
INT 2F - Multiplex - MS WINDOWS "WINOLDAP" - GET CLIPBOARD DATA SIZE
AX = 1704h
DX = clipboard format supported by WinOldAp (see AX=1703h)
Return: DX:AX = size of data in bytes, including any headers
Failure: DX:AX = 0 no data in this format in the Clipboard
---------------------------------------------
INT 2F - Multiplex - MS WINDOWS "WINOLDAP" - GET CLIPBOARD DATA
AX = 1705h
DX = clipboard format supported by WinOldAp (see AX=1703h)
ES:BX -> buffer
Return: AX <> 0 success
AX = 0 error, or no data in this format in Clipboard
---------------------------------------------
INT 2F - Multiplex - MS WINDOWS "WINOLDAP" - CloseClipboard
AX = 1708h
Return: AX <> 0 success
AX = 0 failure
---------------------------------------------
INT 2F - Multiplex - MS WINDOWS "WINOLDAP" - COMPACT CLIPBOARD
AX = 1709h
SI:CX = desired size in bytes
Return: DX:AX = number of bytes in largest block of free memory
Note: WinOldAp is responsible for including the size of any headers
---------------------------------------------
INT 2F - Multiplex - MS WINDOWS "WINOLDAP" - GET DEVICE CAPABILITIES
AX = 170Ah
DX = GDI information index
00h device driver version
02h device classification
04h width in mm
06h height in mm
08h width in pixels
0Ah height in pixels
0Ch bits per pixel
0Eh number of bit planes
10h number of brushes supported by device
12h number of pens supported by device
14h number of markers supported by device
16h number of fonts supported by device
18h number of colors
1Ah size required for device descriptor
1Ch curve capabilities
1Eh line capabilities
20h polygon capabilities
22h text capabilities
24h clipping capabilities
26h bitblt capabilities
28h X aspect
2Ah Y aspect
2Ch length of hypotenuse of aspect
58h logical pixels per inch of width
5Ah logical pixels per inch of height
Return: AX = integer value of the desired item
device classification
00h vector plotter
01h raster display
02h raster printer
03h raster camera
04h character-stream, PLP
05h Metafile, VDM
06h display-file
curve capabilities
bit 0 circles
bit 1 pie wedges
bit 2 chord arcs
bit 3 ellipses
bit 4 wide lines
bit 5 styled lines
bit 6 wide styled lines
bit 7 interiors
line capabilities
bit 1 polylines
bit 2 markers
bit 3 polymarkers
bit 4 wide lines
bit 5 styled lines
bit 6 wide styled lines
bit 7 interiors
-end-
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #4422
Date: 03-26-93 16:32 (Public)
From: ANDY WARREN
To: ALL
Subject: VOLUME SERIAL NUMBERS
────────────────────────────────────────────────────────────────────────────────
'Recently I asked for some assistance in learning to change the volumer
'serial numbers on disks formatted by DOS 4.0+. Here's a short program
'that will allow the user to display/change the serial number. BTW, what
'got me started on this was an idea I had to use the serial number as a
'way to limit distribution of beta copies of a program I wrote. Any
'comments?
CLS:?STRING$(50,178):'This file created by PostIt! v4.0
DEFINT A-Z:FOR A=0 TO 6:P(A)=2^A:NEXT:OPEN "B",1,"SERIAL.BAS"
T$="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789()"
G"NOnXetmXetmXetmXetmXetmXetmXetmXetmXetmXetmXetmXetmXetmXetmXetmXetmXet
G"mXetmXetmXetmXetmXetmXetmXetmXe)BdkCYSGaLupDKub1ei6aYufjvsbXKlcf0uGaci
G"GaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaYSnO
G"WjZccuvjfupnvrGOdisvwyK9YqOfMBNvgieL2CRbYuLjxAHXgiovxBIvMCOivzXvxAYv2C
G"Gq0ttbsp(acnUatkGaciGaciGaciGaciZ2GcNmlibvfvi9KuGaIoGeKBKLhixfMCYvMBGa
G"ciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGmBd
G"kCYSGivrwL0uj9Kt6asmUadiGedmG0uyYbsoZaciGaciGaciGaciGaciGaciGaciGaciGa
G"ciGaciGaciGaciGaciGaciGaciGaciGaYSnOWjZcYuufevvnfiGOdiqvNySL2yGq0BTfwA
G"UbciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciZ2
G"GcNmlio9evfnfiGaIoG0uEGqhAH52AZbcDVbcrPn2AGquzU5wAZ9MBGy2BYbcDOvgiOvgB
G"WLMBNbcAH5gzHaciGaciGaciGaciGaciGmBdkCcWetmXetmXetmXetmXetmXetmXetmXet
G"mXetmXetmXetmXetmXetmXetmXetmXetmXetmXetmXetmXetmXetmXetmXetmXetmXetC2
G"nOqdkCcjj50qmvfrfPdiNeNyUiwANaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGC
G"IyLbYC1jxzGq3BGmhDHjhDGeLqnOqcjKqcjKqcjKqcjKWj1nxAUDgi0HwzG8ctG8gC0L2B
G"UfsdkqvwqveitvMCPfgBefgDH1GcjKKBM9gibnfij5evfDurs1GcjmvzYLwyS5uDTbsqtb
G"ctp50rnOqcgfgDGe0uGmfvsLKthbIkGGtdkKatHjwzSjdibnfitrLuj50rGOciXetdkKat
G"HjwzSndibnfitrLuj50rGOciXetdkuKtebcvzbvrnOqdkqusnbIuLDwAZrxzYnhibnfisv
G"0zuLhCL1GceLutGivzNnhibnfisv2zuLhCLHfiGaciGaciGaciGaciGaciGaciGaciGaci
G"GaciNmxz0bsDWbcDOvgiYv2zPnhDLj3CnOarj1eiuvwBWbsqtbYuLjxAHXgrHrxyGaciGa
G"ciGaciGaciGaciGaciGaciGaciGaYjMacDOvgiKfgDH1GcnOqdkivzNL2C0vMCZ5sqybsp
G"GycsZadmWaciGaciGaciGaciGaciGaciGaciGaciGaciGCIjOndmG0dihvgDe92CwvMCnO
G"WqbXetGKKB0vMCYvhC0HIjijtmSaIuLDwAZrxzYnhlGivzNL2C0vMCZLciGaciGaYjJfgB
G"SbsA05IlU0GcnOqsgbIuLDwAZrxzYnNlbHfib5erGitn1acpGqdiuHurobciGaciGaciGa
G"ciGaciGaYjNvgDGyxySvxzGmhDVjxzKbsAUbsqm1GcjaLuj5evGiIuLfxDPjxzZbcrpnfi
G"wvMCZL2BUbcnUadiVjhiOL2zOvMCIaciNeMB5rhAP52zGWwzZnhi0HwyUbcnnOqcf5erGa
G"ciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaYj39MBNqhi39MCR1Gc
G"f5erGKKrnOqdkKKrGWuroHIuujvsnrckd9utnfKterskPaspGidiuHurobciGaciGaciGa
G"ciGaciGCICLfgzGmxzYLwySXciU9gi3jxA0vwdkKarYLMDLbspGe0udHctfzevKGYqp1ut
G"b5erKWciXKskG0ci2qdiGaciGaciGCsq9edlGiupYWciLr3yU4sdkKqqJrxAV5gi9aIjiz
G"toWadiGaciGaciGaciGaciGaciGaciGaciGaciGaciGCYCLrhiZvMC2L2yLbcDVbICLfgz
G"G8MBSLxdkuettvusgbctf5ekd9utnfKterskG0diXediuHurobciGaciGaciGaciGaciGa
G"ciGCYyOfMBNvgiZvMCPfgBnOqcejxA2vgi9asqtnekmvKrurckd9utnfKterclGetkPasl
G"GydnnOqcbngDP9MBG0diMGKn5atmGaciGaciGaciGaciGaciGaciGaciGaciGaciGaYjZv
G"gDGmxzYzxAJvgi09giYvwyK9YDYLgDL1GcjqvzTbNltvMCPfgBovxBG0diwfetOiIjijci
G"RaIujDesurckd9utnfKterclGGtkPaciNegzKbIjibcDVbIBLDxdkuettveiGaciGaciGa
G"ciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGCYCLjxAHXgiH5gzGm2BUzxz
G"Yrhi09giS9MBN1GcjaLuj5evGiYufjvsbXeiBrMCPzxz60fiBnxzYLwySHcE4HhE4HhE4L
G"sxIaciN42BViwyKbYyV1wBH5gzGWwAUvwdkKqroreiGaciGaciGaciGaciGaciGaciGaci
G"GaciGaciGaciGaciGaciGaciGCYCO92DG8gC0L2BUnxdkuKtebssg1GcnOGuLD2CUeewG0
G"dibngDP9MBGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaYjZvgDGmxzYzxAJvwd
G"kivzNnNlIHhi9acrYLMDLbciGaciGaciGaciGaciGaciGaciGaciGaciGaciGaciGCIjGq
G"MCPzxznOGuLD2CUq0uG0diwfKutv0rOqvzTbxknOGuLD2CUqewG0diwfKuqrLuOqvzTbxk
G"nOWqbXetGKKB0vMCYvhC0HfkMGKmXWcisv2zZXcisv2zZLciGaciGaciGaciGaciGaYjJf
G"gBSbsA01GcnOWuLjxAHXMtIjhjG0diivewKGcvL1gCUmvzYLwyS5uDTLciGaciGaciGaci
G"GaciGaYjJ9MB2vMC0bcDVbcALHxdk0GcqjvsorfiImvzYLwySbIt11MyLjNoGiYoGWurgr
G"fjOmvzYLwyS5KyYrclGqtk7aIiTiYoGivshHevKGYuLjxAHXMtIjhjSacnP0Gcf5ernOqd
G"ka"
N=2416:K=255:IF LEN(C$)<>3222 THEN ?"Incomplete script file!":BEEP:END
FOR A=1 TO N:LOCATE 1:?STRING$(50*(A/N),177):IF L=0 THEN GOSUB G:L=6
W=T\P(6-L):GOSUB G:W=W OR T*P(L):L=L-2:B$=CHR$(W AND K):PUT 1,,B$:NEXT
?:IF C<>41 THEN ?"Bad checksum!":BEEP:END ELSE ?"Success!":END
G:I=I+1:T=INSTR(T$,MID$(C$,I,1))-1:C=(C+T)*2:C=C\256+(C AND 255):RETURN
SUB G(A$):SHARED C$:C$=C$+LEFT$(A$,70):END SUB
---
■ SLMR 2.1a ■ Backup not found: (A)bort (R)etry (P)anic
--- TMail v1.31.3
* Origin: Cornucopia TBBS - Winter Park, FL - 407/645-4929 (1:363/18)