Category : Recently Uploaded Files
Archive   : QBS_0102.ZIP
Filename : QBS102-8.DOC

 
Output of file : QBS102-8.DOC contained in archive : QBS_0102.ZIP
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Area: QuickBasic
Msg: #8800
Date: 02-15-93 16:44 (Public)
From: QUINN TYLER JACKSON
To: ALL
Subject: nodelist.bas
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
'QBS: Yes
'NAME: NODELIST.BAS
'DESC: Nodelist reader and compiler
'DIALECT: PDS 7.1 or VBDOS 1.0
'AUTHOR: Quinn Tyler Jackson 13 Feb 1993
' (With great thanks to Coridon Henshaw's original NODELIST.BAS)
' (My version is 10 times faster than his was.)
'$DYNAMIC

DEFINT A-Z
TYPE NodelistType
Zone AS INTEGER
Region AS INTEGER
Net AS INTEGER
Node AS INTEGER
System AS STRING * 36
Location AS STRING * 36
Sysop AS STRING * 36
Phone AS STRING * 20
BPS AS STRING * 5
Flags AS STRING * 50
END TYPE

CONST ENTRY_BUFFER = 256
CONST DATA_FIELDS = 8

DIM SHARED BufferPtr AS INTEGER

CLS
ParseNodelist "NODELIST.022", "NODELIST.DBF"

REM $STATIC
FUNCTION BreakString% (OutArray() AS STRING * 50, InString AS STRING)

ON LOCAL ERROR GOTO HandleError

Ptr = 1
DO
Comma = INSTR(Ptr, InString, ",")
OutArray(OutArrayPtr) = MID$(InString, Ptr, (Comma - Ptr))
Ptr = Comma + 1
OutArrayPtr = OutArrayPtr + 1
IF OutArrayPtr = 7 THEN
OutArray(7) = MID$(InString, Ptr)
EXIT DO
END IF
LOOP UNTIL Comma = 0

BreakString = OutArrayPtr
EXIT FUNCTION

HandleError:
'BreakString = 0

RESUME ExitFunction

ExitFunction:

END FUNCTION

STATIC SUB FlushBuffers (FlushFileHandle, NodeList() AS NodelistType)

FOR Ptr = 0 TO BufferPtr

RecNum = RecNum + 1
PUT #FlushFileHandle, RecNum, NodeList(Ptr)

NEXT Ptr

REDIM NodeList(0 TO ENTRY_BUFFER) AS NodelistType
BufferPtr = 0

END SUB

SUB ParseNodelist (NodelistFile AS STRING, ParsedListFile AS STRING)

StartTime! = TIMER
IF DIR$(ParsedListFile) <> "" THEN
KILL ParsedListFile
END IF

'$STATIC
DIM NodelistBuffer(0 TO 7) AS STRING * 50
DIM NodeList(0 TO ENTRY_BUFFER) AS NodelistType
'$DYNAMIC

BufferPtr = 0

NodelistHandle = FREEFILE
OPEN NodelistFile FOR INPUT AS NodelistHandle LEN = 1024
ParsedListHandle = FREEFILE
OPEN ParsedListFile FOR RANDOM AS ParsedListHandle LEN = LEN(NodeList(0))

DO
LINE INPUT #NodelistHandle, Buffer$

Options = BreakString(NodelistBuffer(), Buffer$)

SELECT CASE LEFT$(Buffer$, 1)
CASE "Z"
TempZone = VAL(NodelistBuffer(1))
CASE "R"
TempRegion = VAL(NodelistBuffer(1))
CASE "H"
SELECT CASE LEFT$(Buffer$, 3)
CASE "Hos"
TempNet = VAL(NodelistBuffer(1))

CASE "Hub"
TempNode = VAL(NodelistBuffer(1))
END SELECT
CASE ","
TempNode = VAL(NodelistBuffer(1))
CASE ELSE
GOTO JumpPast
END SELECT

NodeList(BufferPtr).Zone = TempZone
NodeList(BufferPtr).Region = TempRegion
NodeList(BufferPtr).Net = TempNet
NodeList(BufferPtr).Node = TempNode
NodeList(BufferPtr).System = NodelistBuffer(2)
NodeList(BufferPtr).Location = NodelistBuffer(3)
NodeList(BufferPtr).Sysop = NodelistBuffer(4)
NodeList(BufferPtr).Phone = NodelistBuffer(5)
NodeList(BufferPtr).BPS = NodelistBuffer(6)
NodeList(BufferPtr).Flags = NodelistBuffer(7)

REDIM NodelistBuffer(0 TO 7) AS STRING * 50

BufferPtr = BufferPtr + 1

IF BufferPtr = ENTRY_BUFFER THEN
FlushBuffers ParsedListHandle, NodeList()
END IF

JumpPast:
LOOP UNTIL EOF(NodelistHandle)

FlushBuffers ParsedListHandle, NodeList()
PRINT INT(TIMER - StartTime! + .5); "seconds."

END SUB

* SLMR 2.1a *

--- Maximus 2.01wb
* Origin: VKUG/VPCC QuickBasic Echo - Richmond, BC (1:153/151)



ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Area: QuickBasic
Msg: #9125
Date: 02-15-93 17:52 (Public)
From: ROB MCKEE
To: ERIC MAYS
Subject: RE-BOOT
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
Hello Eric!
You wrote in a message to All:

EM> HELLO, ALL
EM> IS THERE ANY WAY TO RE BOOT THE COMPUTER USING A QBASIC OR
EM> MACHINE LANGUAGE IN A QBASIC PROGRAM CODE..

Sure is...

' From Another Quik_bas Programmmer
' If you can make a Buck with this, make a buck!
' QBS Dist=Only If Lee can fit it in into the next issue! ' Now
this header must remain unchanged in your source code ' for a maximum
of 2 seconds!
' Warm Reboot

def seg = 0
If WarmBoot%= True then
poke &h0473,&h12 ' Setup for Warm Boot
poke &h0472,&h34
else
poke &h0472,&h12 ' Setup for Cold Boot
poke &h0473,&h34 ' tho not really nessary
end if
Def sef= &hffff
Off%=0
Call Absolute(Off%)

This doesn't work on Commodore PC computers use Interrupt &h19 instead.
But which Qbasic doesn't have..


Catcha Later , I'll see you on the flip side - Rob


--- timEd/B6
* Origin: Another Quik_Bas Point in Richmond, CA (1:125/411)


ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Area: QuickBasic
Msg: #10895
Date: 02-16-93 02:16 (Public)
From: DIK COATES
To: AL SCHOEPP
Subject: Spline program 1/2
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
>>>> QUOTING Al Schoepp to Dik Coates <<<<

AS> I would appreciate it if you could post it so I can see if it will
Start of Part 1 of 2

'*************************************************************** SPLCURVE.BAS
'***************************************************** TEMPORARY WORKING FILE
'***************************************************** COPYRIGHT: R.A. COATES
'*****************************************************
'*************************************** LISTING DATE:______________________
'*************************************** LAST REVISION: NOV/88, Feb/93

'Permission granted for inclusion in QBS

OPTION BASE 1
SCREEN 10

DEF FNDist (x1, y1, x2, y2) 'define functions
FNDist = SQR((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1))
x1 = 0: y1 = 0: x2 = 0: y2 = 0
END DEF

n% = 11 'test run
REDIM x%(n%), y%(n%)
x%(1) = 2: y%(1) = 2 'input variables
x%(2) = 20: y%(2) = 12
x%(3) = 45: y%(3) = 48
x%(4) = 100: y%(4) = 40
x%(5) = 70: y%(5) = 30
x%(6) = 165: y%(6) = 150
x%(7) = 300: y%(7) = 200
x%(8) = 450: y%(8) = 40
x%(9) = 300: y%(9) = 40
x%(10) = 450: y%(10) = 265
x%(11) = 550: y%(11) = 325
CALL Splinecurve((n%), x%(), y%())

n% = 9 'test run
REDIM x%(n%), y%(n%)
x%(1) = 2: y%(1) = 2 'input variables
x%(2) = 20: y%(2) = 12
x%(3) = 45: y%(3) = 48
x%(4) = 100: y%(4) = 40
x%(5) = 70: y%(5) = 30
x%(6) = 165: y%(6) = 150
x%(7) = 300: y%(7) = 40
x%(8) = 450: y%(8) = 265
x%(9) = 550: y%(9) = 325
CALL Splinecurve((n%), x%(), y%())

n% = 6 'test run
REDIM x%(n%), y%(n%)
x%(1) = 10: y%(1) = 10 'input variables

x%(2) = 20: y%(2) = 12
x%(3) = 45: y%(3) = 48
x%(4) = 100: y%(4) = 40
x%(5) = 70: y%(5) = 30
x%(6) = 10: y%(6) = 10
CALL Splinecurve((n%), x%(), y%())

n% = 7 'test run
REDIM x%(n%), y%(n%)
x%(1) = 2: y%(1) = 2 'input variables
x%(2) = 45: y%(2) = 48
x%(3) = 100: y%(3) = 40
x%(4) = 165: y%(4) = 150
x%(5) = 300: y%(5) = 200
x%(6) = 300: y%(6) = 140
x%(7) = 450: y%(7) = 265
CALL Splinecurve((n%), x%(), y%())

LOCATE 20, 10
PRINT "Reclining Lady";
LOCATE 21, 15
PRINT "-by R.A. Coates";
dummy$ = INPUT$(1)

'************************** SUBPROGRAM Drawcurve ****************************
'
' Draws a series of lines through points (x(i%),y(i%)), and the screen call
' must be Mode 10 with a monochrome monitor and EGA board or Mode 9 with a
' colour monitor and EGA board. The coordinate is based on the screen
' location with the maximum value of "x" less than or equal to 639 and the
' maximum value of "y" less than or equal to 349.
'
' ARGUMENTS: s%=number of points from the beginning of curve to end
' x()=array for x-coordinates
' y()=array for y-coordinates
'
' RETURNS: nul (plots points on screen)
'
' SUBPROGRAMS CALLED: nul
'
SUB Drawcurve (s%, x(), y()) STATIC
FOR i% = 1 TO s% - 1
LINE (x(i%), y(i%))-(x(i% + 1), y(i% + 1))
NEXT i%
END SUB

'************************ SUBPROGRAM Graphpoints ****************************
'
' Draws "x%" through points (x%(i%),y%(i%)). The screen call must be Mode
10
' for an EGA Adapter and a monochrome monitor and must be Mode 9 for an
' EGA Adapter and a colour monitor. The coordinate is based on the screen
' location with the maximum value of "x%" less than or equal to 639 and the

' maximum value of "y%" less than or equal to 349.
'
' ARGUMENTS: x%()=array for x%-coordinates
' y%()=array for y%-coordinates
' n%=number of points
'
' RETURNS: nul (plots points on screen)
'
' SUBPROGRAMS CALLED: nul
'
SUB Graphpoints (x%(), y%(), n%) STATIC
FOR i% = 1 TO n%
FOR j% = 1 TO 5
LINE (x%(i%) - 3 + j%, y%(i%) - 3 + j%)-(x%(i%) - 3 + j%, y%(i%) - 3 + j%)
LINE (x%(i%) - 3 + j%, y%(i%) + 3 - j%)-(x%(i%) - 3 + j%, y%(i%) + 3 - j%)
NEXT j%
NEXT i%
END SUB

End of Part 1
... Insert favourite tagline here. Remember to always plan ahea
___ Blue Wave/QWK v2.10

--- Maximus 2.00
* Origin: Durham Systems (ONLINE!) (1:229/110)



ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Area: QuickBasic
Msg: #10896
Date: 02-16-93 02:16 (Public)
From: DIK COATES
To: AL SCHOEPP
Subject: Spline program 2/2
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
>>>> QUOTING Al Schoepp to Dik Coates <<<<
Start of Part 2 of 2

'*************************** SUBPROGRAM Spline ******************************
'
' Draws a smooth curve through points (x(i%),y(i%)). The screen call must
' be Mode 10 with a monochrome monitor and EGA board or Mode 9 with a
' colour monitor and EGA board. Option Base 1 Command must be used.
' The coordinate is based on the screen location with the maximum value of
' "x" less than or equal to 639 and the maximum value of "y" less than or
' equal to 349.
'
' ARGUMENTS: f%()=array for x-coordinates or y-coordinates
' t()=array for t-coordinates
' s%=number of points
' sz%=number of divisions from first point to last
' ft()=x or y-coordinate values for spline
'
' RETURNS: ft()=x or y-coordinate values for spline
'
' SUBPROGRAMS CALLED: nul
'
SUB Spline (f%(), t(), s%, sz%, ft()) STATIC
DIM a(50), b(50), c(50)

FOR i% = 2 TO s%
b(i%) = t(i%) - t(i% - 1)
c(i%) = (f%(i%) - f%(i% - 1)) / b(i%)
NEXT i%

b(1) = b(2) + b(3)
c(1) = b(3)
a(1) = ((b(2) + 2 * b(1)) * c(2) * b(3) + b(2) * b(2) * c(3)) / b(1)

FOR i% = 2 TO s% - 1
g = -b(i% + 1) / c(i% - 1)
a(i%) = g * a(i% - 1) + 3 * (b(i%) * c(i% + 1) + b(i% + 1) * c(i%))
c(i%) = g * b(i% - 1) + 2 * (b(i%) + b(i% + 1))
NEXT i%

g = b(s% - 1) + b(s%)
a(s%) = ((b(s%) + g + g) * c(s%) * b(s% - 1) + b(s%) * b(s%) * (f%(s% - 1) -
f%(s% - 2)) / b(s% - 1)) / g
g = -g / c(s% - 1)
c(s%) = b(s% - 1)
c(s%) = g * b(s% - 1) + c(s%)
a(s%) = (g * a(s% - 1) + a(s%)) / c(s%)

FOR i% = s% - 1 TO 1 STEP -1
a(i%) = (a(i%) - b(i%) * a(i% + 1)) / c(i%)
NEXT i%

FOR i% = 2 TO s%

d = (f%(i%) - f%(i% - 1)) / b(i%)
e = a(i% - 1) + a(i%) - 2 * d
b(i% - 1) = 2 * (d - a(i% - 1) - e) / b(i%)
c(i% - 1) = (e / b(i%)) * (6 / b(i%))
NEXT i%

wt = 0
i% = 0
j% = 1
dt = t(s%) / (sz% - 1)

WHILE i% < sz%
IF wt > t(j% + 1) THEN
j% = j% + 1
END IF

i% = i% + 1
h = wt - t(j%)
ft(i%) = f%(j%) + h * (a(j%) + h * (b(j%) + h * c(j%) / 3) / 2)
wt = wt + dt
WEND
END SUB

'************************* SUBPROGRAM Splinecurve ***************************
'
' Draws a smooth curve through points (x(i%),y(i%)). The screen call must
' be Mode 10 with a monochrome monitor and EGA board or Mode 9 with a
' colour monitor and EGA board. Option Base 1 Command must be used. The
' Subprogram divides the total chord length of the curve into 600 equal
' spaces. This value can be modified by revising "nd%" to a greater or
' lesser value. The coordinate is based on the screen location with the
' maximum value of "x" less than or equal to 639 and the maximum value of
' "y" less than or equal to 349.
'
' ARGUMENTS: n%=number of points
' xx%()=x-coordinate values for spline
' yy%()=y-coordinate values for spline
'
' RETURNS: nul (draws curve on screen)
'
' SUBPROGRAMS CALLED: Graphpoints(xx%(),yy%(),(n%))
' Spline(xx%(),tt(),(n%),(nd%),spx())
' Drawcurve((nd%),spx(),spy())
'
SUB Splinecurve (n%, xx%(), yy%()) STATIC
DIM spx(600), spy(600)
REDIM tt(n%)
nd% = 600

IF UBOUND(xx%) <> n% OR UBOUND(yy%) <> n% THEN
PRINT "ERROR: Array size must equal number of points"
EXIT SUB
END IF


tt(1) = 0

FOR i% = 2 TO n%
tt(i%) = tt(i% - 1) + FNDist(xx%(i% - 1), yy%(i% - 1), xx%(i%), yy%(i%))
NEXT i%

CALL Graphpoints(xx%(), yy%(), (n%))
CALL Spline(xx%(), tt(), (n%), (nd%), spx())
CALL Spline(yy%(), tt(), (n%), (nd%), spy())
CALL Drawcurve((nd%), spx(), spy())
END SUB

End of Part 2
... "I drank WHAT!?" - Socrates

--- Maximus 2.00
* Origin: Durham Systems (ONLINE!) (1:229/110)



ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Area: QuickBasic
Msg: #11425
Date: 02-16-93 13:39 (Public)
From: MICHAEL LOWE
To: JOHN GALLAS
Subject: SOUNDBLASTER STUFF
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
In answer to your question about reading from th microphone; no. These are
for output routines, but the same timing problem applies.

Briefly, here's some SB info...

Initializing:
1 write a byte value of 01h to the DSP reset port (2x6h)
(All number are in hex, unless otherwise indicated)
2 wait at least 3 microseconds
3 Write a 00 to the same port
4 wait until the DSP data avilable stus port (2xE) bit 7 is set
5 read the DSP data port (2xA)
6 if the value it AAh then a soundblaster was initialized on that port
otherwise go back to step 4. An initialization takes at least 100ms,
so make sure you try enough times to be certain.
It's a good idea to start with a baseport of 220 and work your way up to 260
This will find and initialize the soundblaster.

Whenever reading or writing to the soundblaster, there's a procedure that
must be followed. So whenever you must do one or the other, you must do it
in the following manner:

writing:
1 read 2xC
2 if bit 7 is set, go back to step 1
3 write your data to 2xC

reading:
1 read 2xE
2 if bit 7 is NOT set, go back to step 1
3 read data from 2xA

there are several ways to write sound to the SB ports. This email only
covers one of them... Direct mode.

Tell the SB that you're going to be writing in direct mode:
1 write 10h to 2xC (Remember the write procedure)
2 write your sound byte to 2xC


One last thing. the speaker can be turned on and off by writing
D1h and D3h, respectively, to 2xC

I know this code is something that MANY QB enthusiasts have been waiting for.
I give it freely. I only ask that if anyone solves the timing problem, that
they post it here.

Mike Lowe



--- TMail v1.31.3
* Origin: * 20/20 TBBS * 312-769-2020 @2400 * 275-1785 @9600 (1:115/769)




ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Area: QuickBasic
Msg: #11426
Date: 02-16-93 13:59 (Public)
From: MICHAEL LOWE
To: ALL
Subject: VOC FILE FORMAT
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
It's great to see that people are actuially posting code snippets for
accessing the Soundblaster digital and FM sound interface.
That's what theis echo is supposed to be all about. Learning and teaching
what we know.

Voc file format:
ALL number in hex, unless otherwise indicated

VOC header block

0-13 File type descr. (text)

14-15 offset of DATA BLOCK from start of file.

16-17 version number (usually 0A,01 for 1.10)

17-18 ID code. Compliment of version number +1234h (1129h for 1.10)

DATA BLOCK

0 Block type (more later)

1-3 data length

4-??? DATA

BLOCK type 1: Voice data

0 = 1

1-3 Block length

4 time constant (256-1000000/sampling rate)

5 pack type

0 = 8 bit unpacked
1 = 4 bit pack
2 = 2.6 bit..
3 = 2 bit ...

6-end = digital voice data


There are several other BLOCK types, with a long description of each, so I
wont get into them. But this should be enough to get you started reading and
playing UNPACKED VOC files.


Mike Lowe




--- TMail v1.31.3
* Origin: * 20/20 TBBS * 312-769-2020 @2400 * 275-1785 @9600 (1:115/769)



ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Area: QuickBasic
Msg: #12029
Date: 02-17-93 22:42 (Public)
From: CORIDON HENSHAW
To: ALL
Subject: .MSG Messagebase API code
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
Hello All!

Here's part of the full messagebase API that I promised. Untested, use at
own risk!

===Chop===
'NAME: MSGAPI.BAS
'FROM: Coridon Henshaw@1:250/802
'DESC: .MSG base API code

'Copyright 1993 by Coridon Henshaw
'
'This code may be used in any program costing under $30. This code may also
be 'used in freeware programs.

'This code MAY NOT be used in any crippleware program

'$INCLUDE: 'FIDO.BI'

DECLARE FUNCTION MSGDeleteMessage% (BaseNumber%, Number%)
DECLARE FUNCTION MSGPutMessage% (BaseNumber%, MsgHdr AS ANY, Text$)
DECLARE FUNCTION MSGGetHdr% (BaseNumber%, Number%, MsgHdr AS ANY)
DECLARE FUNCTION MSGPutHdr% (BaseNumber%, Number%, MsgHdr AS ANY)
DECLARE FUNCTION MSGCreateIndex% (BaseNumber%)
DECLARE FUNCTION MSGInit% (Path$, BaseNumber%)
DECLARE FUNCTION MSGDeInit% (BaseNumber%)
DECLARE FUNCTION MSGGetMessage% (BaseNumber%, Number%, MsgHdr AS ANY, Text$)

CONST True = -1, False = NOT True, MaxBases = 1
DEFINT A-Z

TYPE MsgType
BasePaths(0 TO MaxBases) AS STRING * 65
MaxMsgs(0 TO MaxBases) AS INTEGER
Init(0 TO MaxBases) AS INTEGER
END TYPE

DIM MsgHdr AS MSGHeaderType
DIM SHARED Msg AS MsgType

'$DYNAMIC
DIM SHARED Msgs(16384, 0 TO MaxBases) AS INTEGER

REM $STATIC
FUNCTION MSGDeInit (BaseNumber%)
FOR X& = 1 TO Msg.MaxMsgs(BaseNumber%)
Msgs(X&, BaseNumber%) = 0
NEXT
Msg.Init(BaseNumber%) = False
Msg.MaxMsgs(BaseNumber%) = 0
Msg.BasePaths(BaseNumber%) = ""
DeInitBase% = True
END FUNCTION


FUNCTION MSGDeleteMessage (BaseNumber, Number%)
IF Msg.Init(BaseNumber) = True THEN
Filename$ = RTRIM$(Msg.BasePaths(BaseNumber)) + RT
RIM$(LTRIM$(STR$(Msgs(Number%, BaseNumber)))) + ".MSG"
KILL Filename$
FOR X& = 1 TO 99999999
IF DIR$(RTRIM$(LTRIM$(STR$(X&))) + ".MSG") = _
RTRIM$(LTRIM$(STR$(X&))) + ".MSG" THEN
Msgs(Pointer&, BaseNumber) = X&
Pointer& = Pointer& + 1
END IF
NEXT

END IF
END FUNCTION

FUNCTION MSGGetHdr (BaseNumber%, Number%, MsgHdr AS MSGHeaderType)
'IMPORT: BaseNumber%
' Number%
'EXPORT: MsgHdr

IF BaseNumber% >= 0 AND BaseNumber% <= MaxBases THEN
IF Msg.Init(BaseNumber%) = True THEN
IF Number% <= Msg.MaxMsgs(BaseNumber%) THEN

Handle = FREEFILE
OPEN RTRIM$(Msg.BasePaths(BaseNumber)) + _
RTRIM$(LTRIM$(STR$(Msgs(Number%, BaseNumber%)))) + ".MSG" FOR BINARY AS Handle

GET #Handle, , MsgHdr

CLOSE Handle

MSGGetHdr = True
END IF
END IF
END IF

END FUNCTION

FUNCTION MSGGetMessage (BaseNumber%, Number%, MsgHdr AS MSGHeaderType, Text$)
'IMPORT: BaseNumber%
' Number%
'EXPORT: MsgHdr
' Text$
IF BaseNumber% >= 0 AND BaseNumber% <= MaxBases THEN
IF Msg.Init(BaseNumber%) = True THEN
IF Number% <= Msg.MaxMsgs(BaseNumber%) THEN

Handle = FREEFILE
OPEN RTRIM$(Msg.BasePaths(BaseNumber)) + _
RTRIM$(LTRIM$(STR$(Msgs(Number%, BaseNumber%)))) + ".MSG" FOR BINARY AS Handle


GET #Handle, , MsgHdr

Buffer$ = STRING$(LOF(Handle) - LOC(Handle), 1)
GET #Handle, , Buffer$
Text$ = Buffer$

CLOSE Handle

MSGGetMessage = True
END IF
END IF
END IF

END FUNCTION

FUNCTION MSGInit (Path$, BaseNumber)
IF RIGHT$(Path$, 1) <> "\" THEN Path$ = Path$ + "\"

FOR X& = 1 TO 99999999
IF DIR$(RTRIM$(LTRIM$(STR$(X&))) + ".MSG") = RTRIM
$(LTRIM$(STR$(X&)))_ + ".MSG" THEN
Msgs(Pointer&, BaseNumber) = X&
Pointer& = Pointer& + 1
END IF
NEXT

Msg.Init(BaseNumber) = True
Msg.MaxMsgs(BaseNumber) = Pointer&
Msg.BasePaths(BaseNumber) = Path$

END FUNCTION

FUNCTION MSGPutHdr (BaseNumber%, Number%, MsgHdr AS MSGHeaderType)
'IMPORT: BaseNumber%
' Number%
' MsgHdr

IF BaseNumber% >= 0 AND BaseNumber% <= MaxBases THEN
IF Msg.Init(BaseNumber%) = True THEN
IF Number% <= Msg.MaxMsgs(BaseNumber%) THEN

Handle = FREEFILE
OPEN RTRIM$(Msg.BasePaths(BaseNumber)) + _
RTRIM$(LTRIM$(STR$(Msgs(Number%, BaseNumber%)))) + ".MSG" FOR BINARY AS Handle

PUT #Handle, 1, MsgHdr

CLOSE Handle

MSGPutHdr = True
END IF
END IF

END IF

END FUNCTION

FUNCTION MSGPutMessage (BaseNumber%, MsgHdr AS MSGHeaderType, Text$)
'IMPORT: BaseNumber%
' MsgHdr
' Text$
IF BaseNumber% >= 0 AND BaseNumber% <= MaxBases THEN
IF Msg.Init(BaseNumber%) = True THEN

Number& = 1

FOR X& = 0 TO Msg.MaxMsgs(BaseNumber%)
IF Msgs(X&, BaseNumber%) > Number& THEN Number& = _
Msgs(X&, BaseNumber%)
NEXT

Handle = FREEFILE
Filename$ = RTRIM$(Msg.BasePaths(BaseNumber)) + _
RTRIM$(LTRIM$(STR$(Msgs(Number&, BaseNumber)))) + ".MSG"
OPEN Filename$ FOR BINARY AS Handle

PUT #Handle, , MsgHdr
GET #Handle, , Text$

CLOSE Handle

Msg.MaxMsgs(BaseNumber%) = Msg.MaxMsgs(BaseNumber%) + 1
Msgs(Msg.MaxMsgs(BaseNumber%), BaseNumber%) = Number&

MSGPutMessage = True

END IF
END IF

END FUNCTION

===Chop===

And here's the FIDO.BI support file:

===Chop===
CONST Private = 1 'message is private
CONST Crash = 2 'crash send
CONST BeenRead = 4 'message has been read
CONST Sent = 8 'message is sent
CONST Attach = 16 'file is attached
CONST Forward = 32 'being forwarded
CONST UnknownDest = 64 'destination node is unknown
CONST KillSen = 128 'kill after mailing
CONST IsLocal = 256 'FidoNet vs. local
CONST NothingYet = 512 'expansion bit

CONST NothingYet2 = 1024 'ditto
CONST Freq = 2048 'file request
CONST RecieptRqst = 4096 'receipt requested
CONST IsReciept = 8192 'is a return reciept
CONST AuditRqst = 16384 'audit trail requested
CONST UpdateRqst = 32768 'update request

TYPE MSGHeaderType
FromUser AS STRING * 36 'from, null terminated
ToUser AS STRING * 36 'to, null terminated
Subject AS STRING * 72 'subject, null terminated
datetime AS STRING * 20 'datetime, full (all 20 chars)
timesread AS INTEGER 'number of times read
DestNode AS INTEGER 'destination node
OrigNode AS INTEGER 'origin node
cost AS INTEGER 'cost of message
OrigNet AS INTEGER 'origin network
DestNet AS INTEGER 'destination network
DestZone AS INTEGER 'destination zone (not required)
OrigZone AS INTEGER 'origin zone (Not req)
DestPoint AS INTEGER 'destination zone (not req)
OrigPoint AS INTEGER 'origin zone (some implemenations use
these)
ReplyTo AS INTEGER 'previous reaply (in same area)
attribute AS INTEGER 'attributes, see below
nextreply AS INTEGER 'next reply
END TYPE
===Chop===

Coridon Henshaw \ Sirrus Software

--- GEcho 1.00
* Origin: TCS Concordia - Mail Only - Toronto, Ontario (1:250/820)



ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Area: QuickBasic
Msg: #3971
Date: 02-18-93 20:48 (Public)
From: CORIDON HENSHAW
To: ALL
Subject: Matrix Checksum code! Fa
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
Hello All!

Here's some matrix checksuming code:

===Chop===
'NAME: MATRCHK.BAS
'DESC: Matrix checksuming code
'FROM: Coridon Henshaw@1:250/820
'QBS Publishing: YES!

DECLARE FUNCTION ChkSum% (BYVAL SSegment%, BYVAL SOffset%, BYVAL SLength%)
'^^^ EXTENAL ASM CODE
DECLARE FUNCTION MatrixChecksum@ (TextBlock AS STRING, MatrixWidth AS INTEGER)

DEFINT A-Z
FUNCTION MatrixChecksum@ (TextBlock AS STRING, MatrixWidth AS INTEGER)
IF MatrixWidth > 0 AND MatrixWidth <> LEN(TextBlock) THEN
MatrixDepth = LEN(TextBlock) \ MatrixWidth
REDIM Matrix(MatrixDepth, MatrixWidth) AS STRING * 1

FOR X = 0 TO MatrixDepth
FOR Y = 0 TO MatrixWidth
Pointer = Pointer + 1
Matrix(X, Y) = MID$(TextBlock, Pointer, 1)
NEXT
NEXT
FOR X = 0 TO MatrixDepth
FOR Y = 0 TO MatrixWidth
TempString$ = TempString$ + Matrix(X, Y)
'Extract horizontal text
NEXT
HSum@ = HSum@ + ChkSum%(SSEG(TempString$),
SADD(TempString$),_ LEN(TempString$))
TempString$ = ""
NEXT
FOR Y = 0 TO MatrixWidth
FOR X = 0 TO MatrixDepth
TempString$ = TempString$ + Matrix(X, Y)
'Extract vertical text
NEXT
VSum@ = VSum@ + ChkSum%(SSEG(TempString$),
SADD(TempString$),_ LEN(TempString$))
TempString$ = ""
NEXT

MatrixChecksum = (VSum@ + HSum@) * MatrixWidth
END IF

END FUNCTION
===Chop===

Here's CHKSUM.OBJ, needed for the above:


===Chop===
OPEN"B",#1,"CHKSUM.OBJ":OPEN"B",#2,"H"
DO:READ I$:IF I$="-1" THEN EXIT DO
PUT #2,,I$: LOOP: I$=" ": SEEK #2,1:DO UNTIL LOC(2)=LOF(2): GET #2,,I$
O$=CHR$(VAL("&H"+I$)):PUT #1,,O$:LOOP:CLOSE:KILL "H"
DATA 800C000A63686B73756D2E61736D7096250000064447524F5550044441544104434F44
DATA 45055F444154410B43484B53554D5F5445585439980700482700060401E79807004800
DATA 00050301109A040002FF025F900D0000010643484B53554D0000009188040000A201D1
DATA A02B00010000558BEC1E568E5E0A8B76088B4E0633C00304464983F9007402EBF55E1F
DATA 5DCA06005E1F5DCA0600678A02000074
DATA -1

'Yeah, I know hex streams are crappy, but it'll have to do for now...
'Wait until you see BIN2ASCII 😉
===Chop===

If anyone can make the matrix checksum code faster, or convert it to ASM,
PLEASE DO!

Coridon Henshaw \ Sirrus Software

--- GEcho 1.00
* Origin: TCS Concordia - Mail Only - Toronto, Ontario (1:250/820)



ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Area: QuickBasic
Msg: #4631
Date: 02-19-93 17:45 (Public)
From: JOHN GALLAS
To: ALL
Subject: SB CODE
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
Brandon Callison posted a program on the C echo that played a middle C
sharp on a sound blaster. Compared to the previous QB program I had to
play the SB, which was given a number from 0 to 255, and spit out a
motorcycle engine noise, this was alot nicer. So I thought I'd transfer
it to QB, and believe it or not, it sounds *just* as good in QB as it did
in C! Will wonders never cease...


'-------------------------------clip here-------------------------------

' Sound Blaster Source Code
' Made by Brandon Callison
' Register 388h is the address/status port, and 389h is the data port.
'This is, of course, only for the FM music. (The cannels 1-11) which are
'compatible with Ad-Lib, Sound Blaster, SB Pro, Thunder Board, and many
'others. All boards advertised as compatible with Ad-Lib or Sound Blaster
'are compatible with this. Explainations of the mysterious code will be
'throughout the program.

DEFINT A-Z

DECLARE SUB SBStop ()
DECLARE SUB SBReset ()
DECLARE SUB SBOutPort (reg, x)
DECLARE SUB SBPlayNote (freq#, oct)

' vvvvvvvvvvvvvvvvvvvvvvv
' The following are his variable declarations; I'm leaving them in so you
' can see what all the variables are for:
'
'float freq; /* Frequency */
'int oct; /* Octave */
'int reg; /* Register no. */
'int x; /* Poke number to register */
'int i; /* GLOBAL Dummy loop signal */
'
' ^^^^^^^^^^^^^^^^^^^^^^^

SBReset
SBPlayNote 277.2, 5 'Middle C sharp on octave 5
SLEEP 2
SBStop 'Must be called to cut sound

END

SUB SBOutPort (reg, x)

OUT &H388, reg 'Outputs the register to be written to

FOR I = 1 TO 6

reg = INP(&H388)


NEXT I

' ^- This loop requires some explaining. The sound card must allow time
'to process it's code. 6 reads from the status port will cause it to wait
'for 2.3 microseconds. You MUST NOT make any outputs to the sound card port
'without waiting at least this amount of time in-between calls. The same
'applies below, except the wait is 23 microseconds, by 35 reads from the data
'port.

OUT &H389, x
FOR I = 1 TO 35 'Outputs the data into the register
reg = INP(&H389)
NEXT I

END SUB

SUB SBPlayNote (freq#, oct)

freq2 = INT(1.31 * freq#) 'Convert from hz to raw frequency?!?!
SBOutPort &H60, &HF0
SBOutPort &HC0, 1
SBOutPort &HA0, freq2 AND &HFF
SBOutPort &HB0, ((freq2 AND &HFF00) / &H100) OR (oct * 4) OR 32
' ^- for different channels, do anywhere from the register
' 0xB0 to 0xBA. (channels 1-11)

END SUB

SUB SBReset

FOR I = 1 TO 244 ' The sound card has 244 data ports. Just clears
OUT &H388, 0 ' all of them.
NEXT I

END SUB

SUB SBStop

SBOutPort &HB0, 0 ' As I said earlier for different channels

END SUB


--- TMail v1.30.4
* Origin: TC-AMS MLTBBS 2.2 - Minnetonka, MN (612)-938-4799 (1:282/7)



ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Area: QuickBasic
Msg: #5725
Date: 02-19-93 23:29 (Public)
From: DEREK LYONS
To: ALL
Subject: Logger
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
' LOG.BAS
' Version 1.12
' Copyright 1991-1992, James Derek Lyons, Mountain Bay Software
' QBS = YES
' Permission is granted for non-commercial use.
' Commercial use requires acknowledgement of source.
' This program maintains a computer diary in a sequential file
' with a user supplied name

' Version 1.00 QB 4.5
' Version 1.10 Converted to PDS 7.1
' Version 1.11 Minor modifications
' Version 1.12 Released on FIDO QB echo

DECLARE SUB Logit (Filename$, Data$, Progname$, Vers$, Copy1$, Copy2$)
DECLARE SUB NewLog (Progname$, Vers$, Copy1$, Copy2$)

Progname$ = "System Activity Logger" : Vers$ = "v1.11"
Auth$ = "J. Derek Lyons" : Copy1$ = "Copyright 1991-92"
Copy2$ = "Mountain Bay Software, J. Derek Lyons"
Filename$ = "SYSTEM.LOG" : NameFlag = 0

PRINT Progname$, Vers$, DATE$; " "; TIME$
PRINT Copy1$; "; "; Copy2$

Cline$ = LTRIM$(RTRIM$(COMMAND$))
' Get the command line and trim all the spaces
' Exits program if no log data was provided

IF LEN(Cline$) = 0 THEN
PRINT : PRINT "No Log Entry" : PRINT
END
END IF


Data$ = LTRIM$(RTRIM$(COMMAND$))
IF LEFT$(Cline$, 1) <> "-" THEN GOTO Default
' If no filename is provided, then the file
' SYSTEM.LOG will be opened and COMMAND$ written
' to it with no modifications

Filename$="" : Data$ = ""
' Nulls the strings prior to rebuilding in the next section

FOR x = 1 TO LEN(Cline$)
IF MID$(Cline$, x, 1) = "-" THEN GOTO NoLead
' Skips the leading "-" in a filename
IF MID$(Cline$, x, 1) = " " THEN NameFlag = 1
' A " " is the end of the file name to be written
' to, all further characters are data to be logged
IF NameFlag = 0 THEN Filename$ = Filename$ + MID$(Cline$, x, 1)
' If a space has not been detected, write the
' character to the filename

IF NameFlag = 1 THEN Data$ = Data$ + MID$(Cline$, x, 1)
' If a space has been detected, then write the
' character to the data to be logged NoLead:
NEXT x
Data$ = LTRIM$(Data$)
' Deletes the leading space that will creep in during the
' parsing process
Default:
PRINT
PRINT "Logging to: "; Filename$; " : "; Data$
Logit Filename$, Data$, Progname$, Vers$, Copy1$, Copy2$
PRINT
PRINT "Log entry complete"
PRINT
END
SUB Logit (Filename$, Data$, Progname$, Vers$, Copy1$, Copy2$)
OPEN Filename$ FOR APPEND AS #1
' if file does not exist then file will be created.
IF LOC(1) = 0 THEN CALL NewLog(Progname$, Vers$, Copy1$, Copy2$)
' Writes file creation date at the beggining of
' the file
PRINT #1, DATE$; " "; TIME$; " "; Data$
' write time, date and parameters to file.
CLOSE #1
' close file.
END SUB

SUB NewLog (Progname$, Vers$, Copy1$, Copy2$)

NewLog:
PRINT : PRINT "Opening new Log file"
PRINT #1, "-------------------------------------------------"
PRINT #1, " "; Progname$
PRINT #1, " "; Vers$
PRINT #1, " "; Copy1$
PRINT #1, " "; Copy2$
PRINT #1, "-------------------------------------------------"
PRINT #1, "New log file opened at "; TIME$; " "

END SUB
===
* MegaMail 2.10 #0:Sample Tagline

--- DB 1.51/002487
* Origin: Gulf Coast BBS |QuickSHARE #2| (904)563-2547 HST/v.32bis (1:365/12)



ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Area: QuickBasic
Msg: #10102
Date: 02-03-93 13:00 (Public)
From: MARK GRAHAM
To: IAN MACLENNAN
Subject: Help on interrupts.
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
On 02-01-93 Ian Maclennan wrote to All...
IM> I am looking for help on using certain interrupts with
IM> Quickbasic 4.5.
IM> I can use some, but I seem to be unable to acess ones that use such
IM> registers as AH, BH, AL etc.
IM> This is really troubleing me as I am unable to use many interrupts.
[...]

No prob. ALL the standard registers (AX, BX, CX, DX) of the 80x86
series are 16 bits (an integer to QB) broken into high byte (AH,
BH, CH, DH) and low byte (AL, BL, CL, DL). The segment registers
(CS, SS, DS, ES), index registers (SI, DI), and alternate stack
pointer (BP) are also 16 bits, but because they are used for
indexing, there is no reason to break them into smaller chunks.

When calling interrupts from QB, a data structure is created from
which the registers are loaded immediately before the interrupt is
called, and to which the registers are saved immediately after
execution of the interrupt.

QB has TWO different interrupt calls, and each has its own data
structure (these are in the include file QB.BI, by the way). The
routine INTERRUPT loads and saves the registers AX, BX, CX, DX,
BP, SI, DI, and flags. This data structure is called RegType. The
INTERRUPTX routine loads and saves all the registers that
INTERRUPT does, plus DS and ES, and should be used only when DS or
ES need to point at some data structure. This data structure is
call RegTypeX.

Now, to your question, the registers AH and AL map to the high and
low bytes of the AX variable. The confusing part is that QB
insists that all two-byte integers are signed (positive and
negative), so if bit 7 of AH is set, the number is negative. As
for loading the registers, the hex prefix, &H, works nicely, and
avoids the effort of sign conversion. So, if you wanted a function
named Foo that loaded AH with 23 hex and AL with 45 hex, executed
interrupt 10 hex, and returned the integer -1 if and only if CL is
22 hex on return from the interrupt and zero otherwise, you could
do the following:

FUNCTION Foo%()
DIM regs AS RegType 'declare the data structure the 80x86
'registers will be loaded from and saved to

regs.ax = &H2345 'Load hex 23 into AH and hex 45 into AL

INTERRUPT &H10, regs, regs
'the first is the structure from which the registers are loaded
'the second is the structure to which the registers are are saved
'they can often be the same structure

Foo% = ((regs.cx AND 255) = &H22)
'Isolate CL by setting all bits in CH to 0,

'then testing if CX = 22 hex

END FUNCTION 'all done, so return


... OFFLINE 1.38

--- GEcho 1.00/beta+
* Origin: The Extinguisher BBS, (916)334-4470 North Highlands, CA (1:203/540)


ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Area: QuickBasic
Msg: #10762
Date: 02-03-93 17:18 (Public)
From: FRED DISANO
To: JOHN WALLACE
Subject: Animation
ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
Hi buddy, you asked..

JW> Hi. Does anyone out there know how to animate
JW> in VGA screens? I'm trying to make a couple of little
JW> games using VGA grafics, and I can't quite get them
JW> right.

Well, I can kinda help you out, meaning you can acheive some animation
through pageflipping, below is an example in QuickBasic 4.5..

cls
apage=1 'Active page.. the page being drawn to
vpage=0 'Visual page.. the page that is being viewed

line (0,0)-(40,40),2,bf 'I shouldn't have to tell what this does..:)
dim box(500)
get(0,0)-(40,40),box
x=1:y=1

do
screen 7,,ap,vp
cls 1
put(x,y),box
x=x+1
if x>=300 then
x=1
y=y+1
end if
swap ap,vp
loop until inkey$=chr$(32)

There, that is a brief explaination of it.. hope it helps, let me know if
your still having trouble ok..

FRed..


--- Maximus 2.01wb
* Origin: Care of Heaven Sent (1:243/28)





  3 Responses to “Category : Recently Uploaded Files
Archive   : QBS_0102.ZIP
Filename : QBS102-8.DOC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/