BBS: Inland Empire Archive Date: 02-06-93 (09:42) Number: 342 From: DAVID COLSTON Refer#: NONE To: ALL Recvd: NO Subj: Simple door 2/4 Conf: (2) Quik_Bas
>>> Continued from previous message
SUB CtrlBreak (Port, Present)
SELECT CASE Port
CASE 0
Address = &H3F8
CASE 1
Address = &H2F8
CASE 2
Address = &H3E8
CASE ELSE
Address = &H2E8
END SELECT
Old1 = INP(Address + 1)
OUT Address + 1, 0
Old2 = INP(Address + 3)
SetLow = Old2 OR &H40
A# = TIMER
OUT Address + 3, SetLow
Delay .5
OUT Address + 3, Old2 'Set it back the way it was!
OUT Address + 1, Old1
END SUB
DEFSNG A-Z
SUB Delay (X!) STATIC
CheckTime! = TIMER
WHILE TIMER < CheckTime! + X!
WEND
END SUB
DEFINT A-Z
SUB ErrorMessage (A$, X) STATIC
A$ = ""
SELECT CASE X
CASE 3
A$ = "Return with out GOSUB."
CASE 4
A$ = "Out of Data."
CASE 5
A$ = "Illegal Function Call."
CASE 6
A$ = "Math Overflow."
CASE 7
A$ = "Out of Memory."
CASE 9
A$ = "Subscript out of range."
CASE 11
A$ = "Division by Zero."
CASE 14
A$ = "Out of String Space."
CASE 16
A$ = "String Formula Too Complex."
CASE 19
A$ = "No RESUME."
CASE 20
A$ = "RESUME without error."
CASE 24
A$ = "Device TimeOut."
CASE 25
A$ = "Device Fault."
CASE 27
A$ = "Out of Paper."
CASE 39
A$ = "Case Else Expected."
CASE 40
A$ = "Variable Required."
CASE 50
A$ = "Field OverFlow."
CASE 51
A$ = "Internal Error."
CASE 52
A$ = "Bad File Name or Number."
CASE 53
A$ = "File Not Found."
CASE 54
A$ = "Bad File Mode."
CASE 55
A$ = "File Already Open."
CASE 56
A$ = "Field Statement Active."
CASE 57
A$ = "Device I/O Error."
CASE 58
A$ = "File Already exists."
CASE 59
A$ = "Bad Record Length."
CASE 61
A$ = "Disk Full."
CASE 62
A$ = "Input past end of file."
CASE 63
A$ = "Bad Record Number."
CASE 64
A$ = "Bad File Name."
CASE 67
A$ = "Too many files."
CASE 68
A$ = "Device Unavailable."
CASE 69
A$ = "Communications Buffer OverFlow."
CASE 70
A$ = "Access Denied."
CASE 71
A$ = "Disk or Drive Not Ready."
CASE 72
A$ = "Disk Media Error. (Bad Disk!)"
CASE 75
A$ = "Path/File access error."
CASE 76
A$ = "Path not Found."
CASE ELSE
A$ = "Unknown Error #" + STR$(X)
END SELECT
END SUB
SUB FossDeinit (Port, Reg AS RegType)
' Release the FOSSIL device driver
Reg.ax = &H500
Reg.dx = Port
Interrupt &H14, Reg, Reg
END SUB
SUB FossInit (Port, Present, Reg AS RegType)
Present = -1
' Initialize the FOSSIL device driver
'
' dx = Communications port number (0-3)
' ah = &H04 Fossil Function Number - Initialize FOSSIL driver
' (Raises DTR in the porcess)
Reg.dx = Port
Reg.ax = &H400
Interrupt &H14, Reg, Reg
IF Reg.ax <> &H1954 THEN
Present = 0 'Fossil Not Found
END IF
END SUB
>>> Continued to next message
* OLX 2.1 TD * Colston & Associates, Inc. 501-452-2928 or 501-785-2208
--- WM v2.06/92-0178
* Origin: Paradox of Arkansas *Wildcat 3.0* 501-646-7158 (1:3822/1)

Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET