home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 2
/
ctrom_ii_b.zip
/
ctrom_ii_b
/
PROGRAM
/
BASIC
/
QBS_0103
/
QBS103-6.DOC
< prev
next >
Wrap
Text File
|
1993-04-30
|
42KB
|
1,227 lines
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #7106
Date: 03-20-93 00:52 (Public)
From: STEVE DEMO
To: ALL
Subject: Mview Code 1 Of 5
────────────────────────────────────────────────────────────────────────────────
Here is a little program I wrote I know it's not as great as some of the
other code around here but I thought someone might be able to use it.
'________O_/________________________| SNIP |______________________\_O_______
' O \ | HERE | / O
'This file created by PostIt! v5.1.
'>>> Start of page 1.
' MVIEW.BAS ----- Mouse Driven File Viewer
' Written By: Steve Demo
'
' This program requires:
' a Mickey
' At least EGA You need 256k video mem. Because of 43 line mode + Pcopy
' Credit given to:
'
' Chirs Wagner for Mickey routines
' Orginal VIEW.BAS written by Matt Hart
'
' Do with this what you will but don't forget those who
' contributed to it's out come.
' It should be Bug Free <g> If not V 1.03
'
' LOAD QB as follows: QB /L QB /AH MVIEW or it WON'T WORK
'
DEFINT A-Z
'$INCLUDE: 'QB.BI'
DECLARE SUB mouseon ()
DECLARE SUB mouseoff ()
DECLARE SUB ViewHdcat (File$)
DECLARE FUNCTION MouseInstalled% ()
DECLARE SUB MouseSetHor (Min%, Max%)
DECLARE SUB MouseSetVert (Min%, Max%)
DECLARE SUB MouseLocate (Xpos%, Ypos%)
DECLARE SUB MouseStatus (vert%, hor%, Mbuttons$)
DIM SHARED RegX AS RegTypeX
ON ERROR GOTO noega
IF MouseInstalled% THEN
COLOR 15, 0
PRINT "MView V 1.02"
PRINT "One Mickey Escapes Mr.Cat : Using Mouse"
PLAY "msL20<defgab.>"
SOUND 9000, 2
ELSE
PRINT "MView V 1.02"
PRINT "Oh NO Mickey not found Bad Cat. Sorry"
PLAY "msL20<dBAGFED.>"
SOUND 9000, 2
SLEEP 2
GOTO ending
END IF
File$ = COMMAND$
IF File$ = "" THEN
LINE INPUT "FILE ? ", File$
END IF
IF File$ = "" THEN
PRINT "You didn't enter a file"
PRINT "One last try"
PLAY "msL20<dBAGFED.>"
SHELL "dir /w/p"
SOUND 9000, 2
LINE INPUT "FILE ? ", File$
END IF
IF File$ = "" THEN GOTO ending ' Sore head
ViewHdcat UCASE$(File$)
ending:
WIDTH 80, 25 ' Restore Screen to 80 x 25
COLOR 15, 0 ' reset color white on black
CLS
PRINT : PRINT
PRINT "Have you hugged your Computer today ?"
PRINT "MView V 1.02 -----------> SRD Software"
END
noega:
SELECT CASE ERR
CASE 9 ' We can't have this
RESUME NEXT ' <---------------------- Take that. Allows a Little
CASE ELSE ' More Seek and Find.
WIDTH 80, 25: COLOR 15, 0: CLS : PRINT : PRINT
PRINT "Coffee and Keyboards don't mix Did you spill some? Error"+_
" "; ERR
PRINT "MView V 1.02 -----------> SRD Software"
PRINT : PRINT
PRINT "Usage : MVIEW FILE.TXT or MVIEW and follow the prompts":_
PRINT
END
END SELECT
'>>> Continued on page 2.
___ Blue Wave/QWK v2.11
--- Maximus 2.01wb
* Origin: Semper Fi BBS Ft. Wayne, IN (219) 424-4292 (1:236/21)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #7112
Date: 03-20-93 00:54 (Public)
From: STEVE DEMO
To: ALL
Subject: Mview Code 2 Of 5
────────────────────────────────────────────────────────────────────────────────
'>>> Start of page 2.
FUNCTION MouseInstalled%
DEF SEG = 0
MouseSeg& = 256& * PEEK(207) + PEEK(206)
MouseOfs& = 256& * PEEK(205) + PEEK(204) + 2
DEF SEG = MouseSeg&
IF (MouseSeg& = 0 AND MouseOfs& = 0) OR PEEK(MouseOfs&) = 207 THEN
MouseInstalled% = 0
EXIT FUNCTION
ELSE
MouseInstalled% = -1
END IF
DEF SEG
RegX.ax = 0
CALL INTERRUPTX(&H33, RegX, RegX)
IF RegX.ax = -1 THEN
MouseInstalled% = -1
ELSE
MouseInstalled% = 0
END IF
END FUNCTION
SUB MouseLocate (Xpos%, Ypos%)
RegX.dx = (Xpos% * 8) - 1
RegX.cx = (Ypos% * 8) - 1
RegX.ax = 4
CALL INTERRUPTX(&H33, RegX, RegX)
END SUB
SUB mouseoff
RegX.ax = 2
CALL INTERRUPTX(&H33, RegX, RegX)
END SUB
SUB mouseon
RegX.ax = 1
CALL INTERRUPTX(&H33, RegX, RegX)
END SUB
SUB MouseSetHor (Min%, Max%)
RegX.cx = (Min% * 8) - 1
RegX.dx = (Max% * 8) - 1
RegX.ax = 7
CALL INTERRUPTX(&H33, RegX, RegX)
END SUB
SUB MouseSetVert (Min%, Max%)
RegX.cx = (Min% * 8) - 1
RegX.dx = (Max% * 8) - 1
RegX.ax = 8
CALL INTERRUPTX(&H33, RegX, RegX)
END SUB
SUB MouseStatus (vert%, hor%, Mbuttons$)
RegX.ax = 3
CALL INTERRUPTX(&H33, RegX, RegX)
vert% = (RegX.dx / 8) + 1
hor% = (RegX.cx / 8) + 1
SELECT CASE RegX.bx
CASE 0
Mbuttons$ = ""
CASE 1
Mbuttons$ = "L"
CASE 2
Mbuttons$ = "R"
CASE 3
Mbuttons$ = "LR"
CASE 4
Mbuttons$ = "C"
END SELECT
END SUB
SUB ViewHdcat (File$)
CONST False = 0
CONST True = NOT False
' Build Screen
WIDTH 80, 43 ' Switch to EGA 43
' line
COLOR 14, 0: CLS ' Mode
LOCATE 42, 1: COLOR 9, 7
PRINT STRING$(80, CHR$(219));
LOCATE 43, 1
PRINT STRING$(80, CHR$(219));
LOCATE 1, 1
PRINT STRING$(240, CHR$(219));
COLOR 15, 1
LOCATE 2, 1
PRINT STRING$(80, " ");
LOCATE 2, 15
PRINT "MView-EGA ESC Pgup Pgdn end home "; CHR$(24);
PRINT SPACE$(2); CHR$(25); SPACE$(2); CHR$(27); SPACE$(2); CHR$(26);
PRINT SPACE$(2); "Print";
'>>> Continued on page 3.
___ Blue Wave/QWK v2.11
--- Maximus 2.01wb
* Origin: Semper Fi BBS Ft. Wayne, IN (219) 424-4292 (1:236/21)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #7113
Date: 03-20-93 00:55 (Public)
From: STEVE DEMO
To: ALL
Subject: Mview Code 3 Of 5
────────────────────────────────────────────────────────────────────────────────
'>>> Start of page 3.
OPEN File$ FOR APPEND AS 1 ' Test for file
' of
IF LOF(1) < 3 THEN ' more than 1
' char
COLOR 31, 0 '|
LOCATE 20, 30 '|
PRINT "File NOT fouund" '+----->>+
PLAY "msL20<dBAGFED.>" '|
SOUND 9000, 2 '|
CLOSE 1 '|
KILL File$ '<-------------------------+ ' >----+---<
SLEEP 2 '|
EXIT SUB '+----->> Kill that
' pesky
END IF ' non-file
CLOSE 1
mouseon
COLOR 14, 0
LOCATE 19, 30
PRINT "Loading "; File$ 'Success
OPEN "I", 1, File$
'$DYNAMIC
REDIM Seeks&(1 TO 29384) ' Max number of lines
' 29384
CurSeek& = 1 '|
Numlines& = 0 '|
DO UNTIL EOF(1) '|
LINE INPUT #1, Text$ '|
Numlines& = Numlines& + 1 '/ \
IF Numlines& >= 32760 THEN ' Stretch it just a hair with
COLOR 12 ' The Error routine any more and
PRINT ' crash city. Allows atleast a
' 1 meg file
PRINT "File to large Entire file NOT loaded"
COLOR 28
PRINT "press any key to continue"
PLAY "msL20<dBAGFED.>"
Press$ = INPUT$(1)
EXIT DO
END IF
LOCATE 22, 30
PRINT "Loading line:"; Numlines&
Seeks&(Numlines&) = CurSeek& ' Save starting position
CurSeek& = CurSeek& + LEN(Text$) + 2 ' Next position - 2 is
LOOP ' for C/R & LF
CurCol = 1 ' Current Column
SeekEl = 1 ' Current line
Escape = False
COLOR 0, 7 'put final touch on screen
LOCATE 4, 1 '+-------->>+
PRINT STRING$(80, " "); '|
LOCATE 41, 1 '|
PRINT STRING$(80, " "); '|
VIEW PRINT 5 TO 40 '|
mouseoff '|
CLS 2 ' <----+---<
mouseon
DO
GOSUB LoadAndDisplay
GOSUB KeyProcess
LOOP UNTIL Escape
CLOSE 1
EXIT SUB ' were otta here
LoadAndDisplay:
SEEK #1, Seeks&(SeekEl)
FOR I = 5 TO 40
dummy$ = INKEY$ 'clear keyboard buffer
IF NOT EOF(1) THEN
LINE INPUT #1, Text$
Foundone = INSTR(Text$, CHR$(11)) 'filter out ALL bad chars
IF Foundone THEN '+-------->>+
MID$(Text$, Foundone) = " " '|
Testit = LEN(Text$) '|
MID$(Text$, Foundone) = " " '| No
FOR Dotest = 1 TO Testit '|
T$ = MID$(Text$, Dotest, 1) '| Runs
IF T$ = CHR$(11) THEN '|
MID$(Text$, Dotest) = " " '| No
END IF '|
NEXT Dotest '| Beeps
Foundone = 0 '|
END IF '| No
Foundone = INSTR(Text$, CHR$(7)) '|
IF Foundone THEN '| Errors
Testit = LEN(Text$) '|
'>>> Continued on page 4.
___ Blue Wave/QWK v2.11
--- Maximus 2.01wb
* Origin: Semper Fi BBS Ft. Wayne, IN (219) 424-4292 (1:236/21)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #7114
Date: 03-20-93 00:43 (Public)
From: STEVE DEMO
To: ALL
Subject: Mview Code 4 Of 5
────────────────────────────────────────────────────────────────────────────────
'>>> Start of page 4.
MID$(Text$, Foundone) = " " '|
FOR Dotest = 1 TO Testit '| A little Slow
T$ = MID$(Text$, Dotest, 1) '| but I know No
IF T$ = CHR$(7) THEN '| Better Way
MID$(Text$, Dotest) = " " '|
END IF '|
NEXT Dotest '| S
END IF '| U
Foundone = INSTR(Text$, CHR$(12)) '| G
IF Foundone THEN '| G
MID$(Text$, Foundone) = " " '| E
Testit = LEN(Text$) '| S
MID$(Text$, Foundone) = " " '| T
FOR Dotest = 1 TO Testit '| I
T$ = MID$(Text$, Dotest, 1) '| O
IF T$ = CHR$(12) THEN '| N
MID$(Text$, Dotest) = " " '| S
END IF '| ?
NEXT Dotest '|END filter
Foundone = 0 ' +-------------<
END IF
ELSE
Text$ = ""
Text$ = SPACE$(80)
END IF
IF Text$ = "" THEN Text$ = SPACE$(80)
Strg$ = SPACE$(80)
IF LEN(Text$) < CurCol THEN Text$ = Text$ + SPACE$(CurCol -_
LEN(Text$))
LSET Strg$ = MID$(Text$, CurCol)
LOCATE I, 1
PRINT Strg$;
NEXT I
RETURN
KeyProcess:
Press$ = INKEY$
MouseStatus vert%, hor%, Mbuttons$
IF Mbuttons$ = "R" THEN
mouseoff
PCOPY 0, 3
COLOR 14, 4
LOCATE 17, 30
PRINT "+---------[ Info ]----------+";
LOCATE 18, 30
PRINT "| Only use Left Paw Please |";
LOCATE 19, 30
PRINT "| |";
LOCATE 20, 30
PRINT "| Click Left button Please |";
LOCATE 21, 30
PRINT "+---------------------------+";
DO UNTIL Mbuttons$ = "L"
MouseStatus vert%, hor%, Mbuttons$
LOOP
COLOR 0, 7
PCOPY 3, 0
mouseon
END IF
IF Mbuttons$ = "L" THEN
IF vert% = 2 THEN
IF hor% >= 26 AND hor% <= 28 THEN Press$ = CHR$(27) 'esc
IF hor% >= 32 AND hor% <= 35 THEN Press$ = CHR$(0) + CHR$(73)_
'pgup
IF hor% >= 39 AND hor% <= 42 THEN Press$ = CHR$(0) + CHR$(81)_
'pgdn
IF hor% >= 45 AND hor% <= 47 THEN Press$ = CHR$(0) + CHR$(79)_
'end
IF hor% >= 50 AND hor% <= 53 THEN Press$ = CHR$(0) + CHR$(71)_
'home
IF hor% = 56 THEN Press$ = CHR$(0) + CHR$(72) 'up arrow
IF hor% = 59 THEN Press$ = CHR$(0) + CHR$(80) 'dn arrow
IF hor% = 62 THEN Press$ = CHR$(0) + CHR$(77) 'right arrow
IF hor% = 65 THEN Press$ = CHR$(0) + CHR$(75) 'left arrow
IF hor% >= 67 AND hor% < 72 THEN Press$ = "P"
ELSE
PLAY "msL64<dBAGFED.>"
END IF
END IF
IF Press$ = "" THEN GOTO KeyProcess
SELECT CASE UCASE$(Press$)
CASE CHR$(27)
GOTO Goodby 'Escape = true ' ESC
CASE CHR$(0) + CHR$(72) ' Up Arrow
SeekEl = SeekEl - 1
IF SeekEl < 1 THEN
SeekEl = 1
GOTO KeyProcess
END IF
CASE CHR$(0) + CHR$(80) ' Dn Arrow
'>>> Continued on page 5.
___ Blue Wave/QWK v2.11
--- Maximus 2.01wb
* Origin: Semper Fi BBS Ft. Wayne, IN (219) 424-4292 (1:236/21)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #7115
Date: 03-20-93 00:45 (Public)
From: STEVE DEMO
To: ALL
Subject: Mview Code 5 Of 5
────────────────────────────────────────────────────────────────────────────────
'>>> Start of page 5.
SeekEl = SeekEl + 1
IF SeekEl + 1 > Numlines& THEN
SeekEl = SeekEl - 1
GOTO KeyProcess
END IF
CASE CHR$(0) + CHR$(77) ' Right Arrow
CurCol = CurCol + 1
CASE CHR$(0) + CHR$(75) ' Left Arrow
CurCol = CurCol - 1
IF CurCol < 1 THEN
CurCol = 1
GOTO KeyProcess
END IF
CASE CHR$(0) + CHR$(73) ' Page Up
SeekEl = SeekEl - 35
IF SeekEl < 1 THEN SeekEl = 1
CASE CHR$(0) + CHR$(81) ' Page Dn
SeekEl = SeekEl + 35
IF SeekEl > Numlines& THEN
SeekEl = Numlines& - 34
GOTO KeyProcess
END IF
CASE CHR$(0) + CHR$(71) ' Home
SeekEl = 1
CASE CHR$(0) + CHR$(79) ' End
SeekEl = Numlines& - 34
IF SeekEl < 1 THEN
SeekEl = 1
GOTO KeyProcess
END IF
CASE "P"
ShellTemp$ = "type " + File$ + " >prn" ' I know Basic can do
' this
' but NO need for error
' control with this way
PCOPY 0, 1 ' Save Screen
CLS 2
LOCATE 20, 30
PRINT "Printing "; File$
LOCATE 22, 30
PRINT "Press Ctrl C to STOP printing"
PLAY "msL64<defgab.>"
SHELL ShellTemp$ ' Print file
PLAY "msL64<dBAGFED.>"
PCOPY 1, 0 ' Restore Screen
CASE ELSE
PLAY "msL64<dBAGFED.>" ' Wrong key Pressed
GOTO KeyProcess
END SELECT
RETURN
Goodby:
VIEW PRINT
ERASE Seeks&
CLOSE
EXIT SUB
END SUB
'________O_/________________________| SNIP |______________________\_O_______
' O \ | HERE | / O
... Do what you will with this tagline, just don't bother me about it!
___ Blue Wave/QWK v2.11
--- Maximus 2.01wb
* Origin: Semper Fi BBS Ft. Wayne, IN (219) 424-4292 (1:236/21)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #1532
Date: 03-22-93 10:52 (Public)
From: JOE NEGRON
To: CLAUDE SHERMAN
Subject: # of open files
────────────────────────────────────────────────────────────────────────────────
CS> In my Qbasic manual it shows the limit for open files is
> 256, but when I try to open more than 15 files at the same
> time, I receive error 75 "file/path not valid". I have
> "files = 99" in my config.sys and "buffers = 17". Any idea
> why I get the error??? Any help would be appreciated.
This will fix it:
============================== Begin code ==============================
DEFINT A-Z
DECLARE FUNCTION SetMaxFiles% (NumFiles%)
'***********************************************************************
'* FUNCTION SetMaxFiles%
'*
'* PURPOSE
'* Uses DOS ISR 21H, Function 67H (Set Maximum Handle Count) to set
'* the maximum number of handles.
'*
'* EXTERNAL ROUTINE(S)
'* QBX.LIB
'* -------
'* SUB Interrupt (IntNum%, IRegs AS RegType, ORegs AS RegType)
'***********************************************************************
FUNCTION SetMaxFiles% (NumFiles%) STATIC
IRegs.ax = &H6700
IRegs.bx = NumFiles%
SetMaxFiles% = 0
Interrupt &H21, IRegs, ORegs
IF (ORegs.Flags AND 1) = 1 THEN
SetMaxFiles% = ORegs.ax 'Error number
END IF
END FUNCTION
=============================== End code ===============================
Unfortunately, I cannot get this to work with 4DOS, though it is a
documented DOS interrupt.
--Joe in Bay Ridge, Brooklyn, NY, Sun, 03-21-1993--
... Man looks into the abyss, and sees himself.
___
X Blue Wave/QWK v2.12 X
--- Maximus 2.01wb
* Origin: * BlueDog BBS * (212) 594-4425 * NYC FileBone Hub (1:278/709)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #1534
Date: 03-22-93 09:29 (Public)
From: JOE NEGRON
To: ALL
Subject: QB/PDS's future?
────────────────────────────────────────────────────────────────────────────────
Hello all.
I am writing this in the hope of starting a "movement" to try and
resurrect Microsoft's interest in continuing a DOS-based QB/PDS. I've
heard that Microsoft had originally intended to completely drop QB/PDS,
but, based on pleas made by Ethan Winer of Crescent Software (and
others), were convinced to continue to sell and support QB/PDS for a
while.
While Microsoft has released VB/DOS Standard and VB/DOS Pro, many BASIC
programmers are unhappy with these products. First, they seem to be
designed to urge programmers to move to Windows (many do not use
Windows, and many who do, do not want to be "urged"). Second, VB/DOS
does not address most of the features BASIC programmers have been
requesting for years.
Well, I figure:
1. Microsoft is a company that wants to make money.
and
2. They just might be open to the idea of upgrading these products if
enough programmers let them know that it is what they want.
Pursuant to this goal, I would like to encourage all of you to send me a
letter (addressed to Microsoft) in the following general form:
============================== Begin text ==============================
[Your name]
[Your address]
[Your City, State Zip-code]
[Your phone number]
Microsoft Corporation
Attn: BASIC Language Division
1 Microsoft Way
Redmond, Washington 98073-9902
[Date]
Dear Sir/Madam:
This purpose of this letter is to express my desire for the
continuation and upgrade of Microsoft QuickBASIC 4.5 and Microsoft
Professional Development System 7.1.
The features I would like to see in QB 5.0/PDS 8.0:
. [list the features you would like to see...follows are some of
mine]
. Byte data type
. 386 code generation
. "Smart" linking
. ISAM network compatibility
. OS/2 code generation
. Unions
. Pointers
. Better array operations, such as inserting, deleting, sorting
array elements.
. Bit operations - shift, rotate, test, set, reset, toggle.
. The ability for PEEK/POKE to read more than one byte at a
time as well as the ability to specify the segment as well as
the offset. For example:
X$ = PEEK(0000,1234,1) 'read 1 byte
or
X$ = PEEK(0000,1234,10) 'read 10 bytes
. Inline ASM
Sincerely,
_______________________
[Your name]
=============================== End text ===============================
Of course, you may say whatever you like, but I offer the above as a
"template" to make it easier for those who don't wish to take the time
to compose their own letters.
Also, please make sure you sign your letters. I feel this adds some
credibility to this campaign.
Any interested parties, please send me your letters at the following
address:
Joe Negron
48 Gatling Place
Brooklyn, NY 11209-6006
Once I have received a sufficient number of letters, I will forward them
to Microsoft (delivered directly to the head of the BASIC language
division via FedEx) along with a cover letter listing the names of all
who sent letters.
Please, send me your letters!
--Joe in Bay Ridge, Brooklyn, NY, Mon, 03-22-1993--
... There are myriad ways to remove the epidermis of felines.
___
X Blue Wave/QWK v2.12 X
--- Maximus 2.01wb
* Origin: * BlueDog BBS * (212) 594-4425 * NYC FileBone Hub (1:278/709)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #1933
Date: 03-23-93 00:00 (Public)
From: STAN FOY
To: STEVE PERRY
Subject: MAXIMUS BBS
────────────────────────────────────────────────────────────────────────────────
-=> Quoting Steve Perry to All <=-
SP> Has anyone out there done any Quickbasic programming with Maximus
SP> BBS? Specifically, I need to know the record structure for the user.bbs
SP> and lastuser.bbs files. Any other info about Maximus would be
SP> appreciatred also!
Steve
Here's what I have used previously for the USER.BBS file. Hope it helps.
============================= Cut Here ================================
TYPE UserRec ' Bytes:
Name AS STRING * 36 ' 1 - 36
City AS STRING * 36 ' 37 - 72
Alias AS STRING * 21 ' 73 - 93
Phone AS STRING * 15 ' 94 - 108
LastRead AS INTEGER ' 109 - 110
TimeRemain AS INTEGER ' 111 - 112
Password AS STRING * 16 ' 113 - 128
TimesCalled AS INTEGER ' 129 - 130
Help AS STRING * 1 ' 131 - 131
Rsvd1 AS STRING * 2 ' 132 - 133
Video AS STRING * 1 ' 134 - 134
Nulls AS STRING * 1 ' 135 - 135
Bits1 AS STRING * 1 ' 136 - 136
Rsvd2 AS STRING * 2 ' 137 - 138
Bits2 AS INTEGER ' 139 - 140
Priv AS STRING * 1 ' 141 - 141
Rsvd3 AS STRING * 19 ' 142 - 160
StructLen AS STRING * 2 ' 161 - 162
OnLineTime AS INTEGER ' 163 - 164
DelFlag AS INTEGER ' 165 - 166
Rsvd4 AS STRING * 8 ' 167 - 174
ScrWidth AS STRING * 1 ' 175 - 175
ScrLength AS STRING * 1 ' 176 - 176
Credit AS INTEGER ' 177 - 178
Debit AS INTEGER ' 179 - 180
XPriv AS STRING * 2 ' 181 - 182
XPDate AS INTEGER ' 183 - 184
XPTime AS INTEGER ' 185 - 186
XMins AS LONG ' 187 - 190
XFlags AS STRING * 1 ' 191 - 191
XReserved AS STRING * 1 ' 192 - 192
LUDate AS INTEGER ' 193 - 194
LuTime AS INTEGER ' 195 - 196
UserKeys AS STRING * 4 ' 197 - 200
Language AS STRING * 1 ' 201 - 201
Protocol AS STRING * 1 ' 202 - 202
KUpload AS LONG ' 203 - 206
KDnload AS LONG ' 207 - 210
KDnloadTdy AS LONG ' 211 - 214
LMsgArea AS STRING * 10 ' 215 - 224
LFilArea AS STRING * 10 ' 225 - 234
Compress AS STRING * 1 ' 235 - 235
Rsvd5 AS STRING * 1 ' 236 - 236
Extra AS STRING * 4 ' 237 - 240
END TYPE
DIM User AS UserRec
============================= Cut Here ================================
Stan
___ Blue Wave/QWK v2.12
--- Maximus 2.01wb
* Origin: CPU Etc. BBS--Colorado Springs, CO (719)597-3723 (1:128/128)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #2620
Date: 03-24-93 13:31 (Public)
From: EARL MONTGOMERY
To: ALL
Subject: Interrupts
────────────────────────────────────────────────────────────────────────────────
rem The following is an interactive program to help
rem programmers understand how interrupts work within
rem Quick Basic. It is intended for those new to
rem interrupts but may help even the more experienced.
rem Part 1 of 3 parts
'$INCLUDE: 'qb.bi'
DIM inregs AS regtypex, outregs AS regtypex
CLS
LOCATE 1, 1: PRINT "For those of you that have mastered the use ";
PRINT "of interrupts, read no further!";
LOCATE 2, 1: PRINT "However if you are like me and still";
PRINT " struggling you might find this interesting.";
LOCATE 3, 1: PRINT "First off whenever you use an interrupt with";
PRINT " QB you need to load QB/L.";
LOCATE 4, 1: PRINT "This loads the QB.QLB library which contains";
PRINT " the code needed to use interrupts.";
LOCATE 5, 1: PRINT "Now you are ready to program! Your first";
PRINT " entry should be '$INCLUDE: 'QB.BI'";
LOCATE 6, 1: PRINT "This file contains the TYPE and Data";
PRINT " structure to be used.";
LOCATE 7, 1: PRINT "List QB.BI from DOS and you will see there ";
PRINT "are two types defined.";
LOCATE 8, 1: PRINT "RegType and RegTypeX. Notice that both are ";
PRINT "identical except that";
LOCATE 9, 1: PRINT "RegTypeX allows the use of the ES and DS ";
PRINT "segment registers.";
LOCATE 10, 1: PRINT "Your next entry should be: DIM inregs as ";
PRINT "regtypex,outregs as regtypex";
LOCATE 11, 1: PRINT "Now we need to call an interrupt. If you ";
PRINT "have the DOS programmers manual";
LOCATE 12, 1: PRINT "look at interrupt &h21 function &h19. This ";
PRINT "interrupt gets the Default";
LOCATE 13, 1: PRINT "Drive and returns the info in AL of register";
PRINT " AX. If AL returns a 0 this";
LOCATE 14, 1: PRINT "represents Drive A. If AL returns a 1 then ";
PRINT "this represents drive B. If AL";
LOCATE 15, 1: PRINT "returns a 2 this represents Drive C and so on."
LOCATE 16, 1: PRINT "Now we need to put something in register AX";
PRINT " and that is the function &H19.";
LOCATE 17, 1: PRINT "INREGS.AX=&H1900"
LOCATE 18, 1: PRINT "Now we call the interrupt."
LOCATE 19, 1: PRINT "CALL INTERRUPTX(&h21,INREGS,OUTREGS)"
LOCATE 23, 28: PRINT "Press any key to continue."
WAIT1:
I$ = INKEY$: IF I$ = "" THEN GOTO WAIT1
CLS
LOCATE 1, 1: PRINT "OK the DOS programmers manual said that the ";
PRINT "info would be returned in AL.";
LOCATE 2, 1: PRINT "How do we read AL from register AX? Use this";
PRINT " formula:";
LOCATE 3, 1: PRINT "AL=AX AND &HFF (More on these formulas later.)"
LOCATE 4, 1: PRINT "PRINT AL"
LOCATE 5, 1: PRINT : PRINT "Let's put everything together and ";
PRINT "see what we have.";
LOCATE 7, 1: PRINT "'$include: 'Qb.BI'"
LOCATE 8, 1: PRINT "DIM inregs AS RegTypeX,outregs AS RegTypeX"
rem end of part one
--- Maximus 2.01wb
* Origin: Rabbit and Snake's BBS - Richardson, Texas (1:124/6108)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #2621
Date: 03-24-93 13:34 (Public)
From: EARL MONTGOMERY
To: ALL
Subject: Interrupts
────────────────────────────────────────────────────────────────────────────────
REM Part 2 of 3 parts
LOCATE 9, 1: PRINT "inregs.ax=&h1900"
LOCATE 10, 1: PRINT "CALL INTERRUPTX(&h21,INREGS,OUTREGS)"
LOCATE 11, 1: PRINT "AX = (outregs.ax)"
LOCATE 12, 1: PRINT "AL=AX AND &Hff"
LOCATE 13, 1: PRINT "PRINT AL"
LOCATE 14, 1: PRINT "Now let's actually run this program. Ready?";
PRINT " Here goes!";
inregs.AX = &H1900
CALL interruptx(&H21, inregs, outregs)
loop1:
LOCATE 15, 28: PRINT "Press any key to continue."
I$ = INKEY$: IF I$ = "" THEN GOTO loop1
REM Formula to find AL.
AX = (outregs.AX)
AL = AX AND &HFF
REM Looking for a 2 in AL (My default drive is C)
PRINT AL
LOCATE 19, 1: PRINT "Well I got a 2 because my default drive is ";
PRINT "C. How about you?";
LOCATE 23, 28: PRINT "Press any key to continue."
wait2:
I$ = INKEY$: IF I$ = "" THEN GOTO wait2
CLS
LOCATE 1, 28: PRINT "Formulas to read AH and AX."
LOCATE 2, 1: PRINT "Now let's see how we can read AH."
LOCATE 3, 1: PRINT "To find AH the formula is ";
PRINT "AH=(AX AND &HFF00)/256";
LOCATE 4, 1: PRINT "Let's run it and see what we get."
LOCATE 5, 28: PRINT "Press any key to continue."
loop3:
I$ = INKEY$: IF I$ = "" THEN GOTO loop3
AH = (AX AND &HFF00) / 256
PRINT AH
LOCATE 7, 1: PRINT "I got 25. How about you?"
PRINT
LOCATE 10, 1: PRINT "Well we know the value of AL and AH. With ";
PRINT "these two values";
LOCATE 11, 1: PRINT "we can find out what is in AX. The formula ";
PRINT "is AX=(256*ah)+AL";
LOCATE 12, 1: PRINT "In my case AL was 2 and AH was 25. So 256 *";
PRINT " 25 <val in AH> + 2 <val> in AL=6402";
LOCATE 13, 1: PRINT "Let's run it and see what we get."
AX = (256 * AH) + AL
LOCATE 14, 28: PRINT "Press any key to continue."
loop4:
I$ = INKEY$: IF I$ = "" THEN GOTO loop4
PRINT AX
LOCATE 17, 1: PRINT "My values matched how about yours?"
LOCATE 23, 28: PRINT "Press any key to continue."
loop5:
I$ = INKEY$: IF I$ = "" THEN GOTO loop5
CLS
LOCATE 1, 1: PRINT "But someone is saying <But we put &h19> in ";
PRINT "AX how can it contain 6402!";
LOCATE 2, 1: PRINT "Did I mention the AX,BX,CX and DX registers ";
PRINT "are 16 bit registers?";
rem End of part 2 of 3 parts
--- Maximus 2.01wb
* Origin: Rabbit and Snake's BBS - Richardson, Texas (1:124/6108)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #2622
Date: 03-24-93 13:35 (Public)
From: EARL MONTGOMERY
To: ALL
Subject: Interrupts
────────────────────────────────────────────────────────────────────────────────
Part 3 of 3 parts
LOCATE 3, 1: PRINT "This means AX is composed of two 8 bit ";
PRINT "registers AL & AH";
LOCATE 4, 1: PRINT "Remember we put &H19 in AH and AL returned a";
PRINT " &h2. Therefore AX contains";
LOCATE 5, 1: PRINT "&H1902. And if you do a PRINT &H1902 you get ";
PRINT "6402. I am printing all";
LOCATE 6, 1: PRINT "values in decimal. Anyway, let's print it now."
LOCATE 8, 28: PRINT "Press any key to continue"
loop6:
I$ = INKEY$: IF I$ = "" THEN GOTO loop6
PRINT &H1902
PRINT "Your value may differ depending on your default drive."
LOCATE 23, 28: PRINT "Press any key to continue."
loop7:
I$ = INKEY$: IF I$ = "" THEN GOTO loop7
CLS
LOCATE 1, 1: PRINT "I hear someone saying <My books show AL on ";
PRINT "the left and AH on the right.>";
LOCATE 2, 1: PRINT "Then why doesn't AX contain &h0219 instead ";
PRINT " of &h1902?";
LOCATE 3, 1: PRINT "My reference books show the same thing and ";
PRINT "that is confusing to me too.";
LOCATE 4, 1: PRINT "But trust me for now AH is on the left and AL";
PRINT " is on the right. Maybe someone";
LOCATE 5, 1: PRINT "can shed some light on why the progrmming ";
PRINT "books show examples with AL on the";
LOCATE 6, 1: PRINT "left and AH on the right."
LOCATE 8, 1: PRINT "How would you like to see how the bit wise ";
PRINT "AND operation with";
LOCATE 9, 1: PRINT "&Hff allows us to read the value in AL? Hey!";
PRINT " Where is everyone going!?";
LOCATE 10, 1: PRINT "Class hasn't been dismissed! Hey come back!";
PRINT " Well for those of you who";
LOCATE 11, 1: PRINT "stayed it is very very simple: The AND &Hff";
PRINT " (255) or binary 11111111 "
LOCATE 12, 1: PRINT "sets all the bits in AH to 0. Therefore all ";
PRINT "we have left is what is in AL."
PRINT "Neat huh?"
LOCATE 14, 1: PRINT "Class is now dismissed."
locate 15,1:print"Your instructor was Earl Montgomery"
LOCATE 23, 28: PRINT "Press any key to continue."
loop8:
I$ = INKEY$: IF I$ = "" THEN GOTO loop8
END
rem final part of 3 parts
--- Maximus 2.01wb
* Origin: Rabbit and Snake's BBS - Richardson, Texas (1:124/6108)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #1834
Date: 03-23-93 12:09 (Public)
From: RICK PEDLEY
To: GILBERT VELEZ
Subject: Flickering images
────────────────────────────────────────────────────────────────────────────────
On 03-19-93 Gilbert Velez wrote to All...
GV> I need some help. I cant seem to get and put Images
GV> without the Flickering affect. So HELP! I Need some body,
GV> HELP! I Need any Body. H E L P!!!!!!!!!
Try inserting this line just before you draw the new image:
'Wait for vertical retrace to reduce flicker
WAIT &H3DA, 8
..courtesy of Rich Geldreich.
... OFFLINE 1.50
--- Maximus 2.01wb
* Origin: BULLpen BBS * USR DS 16.8/FAX & ASL (613)549-5168 (1:249/140)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #1839
Date: 03-25-93 11:32 (Public)
From: DIK COATES
To: ROBERT CHURCH
Subject: Disk not ready, and gene
────────────────────────────────────────────────────────────────────────────────
>>>> QUOTING Robert Church to All <<<<
RC> isn't there the system locks up! I don't wan't to use error trapping
I don't know how you can do it in BASIC... but the routine I use with my
asm based basic library does the following...
.Code
oldint dw ? ;variable stashed in CS
buff80 db 80 dup(?) ;80 byte buffer for strings
DisableInt MACRO
mov ax, 3524h ;DOS get int 24h vector
int 21h
mov ax, es:[bx]
mov cs:oldint, ax
mov byte ptr es:[bx], 00CFh ;replace it with IRET call
endm
EnableInt MACRO
push ax
push bx
push es
mov ax, 3524h ;DOS get int 24h vector
int 21h
mov ax, cs:oldint
mov es:[bx], ax ;restore old value
pop es
pop bx
pop ax
endm
. . .
The macros work basically as follows... Int 24h is the critical error handler
address... and calling Int 35h gets the interrupt vector... The old value for
the interrupt vector is saved to 'oldint' and a new value is put in place...
00CFh... this is the machine code for and Interrupt Return. When a critical
hardware error is encountered the call goes out to int24 and is immediately
returned to the program that had the error... in addition, and software
critical error code is generally returned as part of the failed call... The
code I use between DisableInt and EnableInt is ASM stuff... and I'm not sure
if the above macros can be converted to calls in a library... (I don't see why
they can't) For as long as the interrupt is redirected, there is no critical
hardware error capability... and it should be enabled ASAP...
Hope this helps, and doesn't really confuse you... Maybe Casey can add a
couple of comments...
Regards Dik
... Replied Cleopatra unto Caesar: Vidi. Teenie Weenie Venit. -DM
___ Blue Wave/QWK v2.10
--- Maximus 2.01wb
* Origin: Durham Systems (ONLINE!) (1:229/110)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #1844
Date: 03-25-93 14:29 (Public)
From: DIK COATES
To: ALL
Subject: Sorting
────────────────────────────────────────────────────────────────────────────────
- Area: Quik_Bas -------------------------------------------------------------
Msg#: 290 Date: 03-23-93 18:43
From: Leonard Erwine Read: Yes Replied: No
To: Daniel Stasinski Mark:
Subj: Re: did i make it up?
___---------------------------------------------------------------------------
Yeah, those recursive sorting algorythms can eat up alot of
stack space and also dynamic memory space. I never did
like shell sorting algorythms anyway.
This shell sort is non-recursive...
'******************************************************* SUBPROGRAM ShellSort
'
' Procedure uses the Shell-Metzger algorithm for sorting an array of string
' variables. Adapted from an article by Donald Shell and disassembled IBM
' 360 machine language. This sorting algorithm is extremely efficient for
' sorting small and medium sized arrays.
'
' PARAMETERS: col0% = number of elements in the string array array$()
' array$() = string variable array to be sorted.
' RETURNS: array$() = sorted string variable array
'
' Released to Public Domain, 1993, by R.A. Coates
'
SUB ShellSort (col0%, array$())
col1% = col0%
WHILE col1%
col1% = col1% \ 2
col2% = col0% - col1%
FOR count% = 1 TO col2%
col3% = count%
sort1:
col4% = col3% + col1%
IF array$(col3%) <= array$(col4%) THEN
GOTO sort2
ELSE
SWAP array$(col3%), array$(col4%)
col3% = col3% - col1%
END IF
IF col3% > 0 THEN
GOTO sort1
END IF
sort2:
NEXT count%
WEND
END SUB
It was done many years back... and if you ignore the goto's (actually,
they're the fastest way to get somewhere!) you'll find it really quite
fast...
Regards Dik, Oshawa, Canada
... "Hey! Who took the cork off my lunch??!"
___ Blue Wave/QWK v2.10
--- Maximus 2.01wb
* Origin: Durham Systems (ONLINE!) (1:229/110)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #2183
Date: 03-25-93 11:39 (Public)
From: RICH GELDREICH
To: CALVIN FRENCH
Subject: Pallete shifting, gif
────────────────────────────────────────────────────────────────────────────────
> Hi everybody! TD2.0 is just about done with the exception of
> palette support and GIF cropping. Sooo... i need to know if
> anyone out there knows just how to read the palette values (red,
> green, blue) from memory (o yeah, I'm using screen 13).
To read the palette values, you can either call BIOS or do some
IN's. BIOS is easy, but I don't like it. The following code will read
the RGB values for palettes 16-256:
DIM R(255),G(255),B(255)
OUT &H3C7,16 ' Tell VGA we want to start reading from col. 16
FOR A=16 TO 256
R(A)=INP(&H3C9)
G(A)=INP(&H3C9)
B(A)=INP(&H3C9)
NEXT
That's off the top of my head, but it should work. Just OUT the
first index to &H3C7, and read the RGB values from &H3C9. You don't have
to constantly OUT to &H3C7 because the VGA can pass them to you in
order.
> Secondly, if anyone out there has some good code for reading
> GIFs, could you give it to me?? (smile) I had a look at Rich's
> (hail Rich, master Guru of Graphics (3d esp), hail Rich! Long
> live king Richard! (that is, Geldrich). Long live the master of
> QB!) code but, unfortunatly, I have been unable to convert it
> into a SUB, which is basically what I need. So, Rich, in regards
If you give me a call I'm sure I could fix you up with something
that you would find most useful...
I've written some GIF subs in the past, but I've sinced looked at
the GIF89a spec and noticed that my subs didn't follow the standard as
closely as they should. I'll fix that up sooner or later. I *do* have a
GIF89a GIF decoder in QB, which is pretty fast, but it's not in a
callable sub.
Rich
--- MsgToss 2.0b
* Origin: Computer Co-Op - Voorhees, NJ | Ted Hare (1:266/29)