home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 2
/
ctrom_ii_b.zip
/
ctrom_ii_b
/
PROGRAM
/
BASIC
/
QBS_0103
/
QBS103-B.DOC
< prev
next >
Wrap
Text File
|
1993-04-30
|
44KB
|
1,423 lines
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #3852
Date: 04-09-93 22:54 (Public)
From: EARL MONTGOMERY
To: ALL
Subject: Companion Program to VGAC
────────────────────────────────────────────────────────────────────────────────
'Part 1 of 5 parts CLIPEDv6.BAS
'A companion program to VGACLIP.EXE
'Make sure you save the Document File that follows this post!
' $INCLUDE: 'qb.bi'
DEFINT K, P
ON ERROR GOTO errorroutine
DIM B(500)
DIM d(100)
DIM PIX(1000)
DIM inreg AS RegType
DIM outreg AS RegType
restart:
SCREEN 0: CLS
PRINT "CLIPEDv6.BAS": PRINT "Copyright (C) Earl Montgomery 1990"
PRINT
GOSUB keyboard
begin:
SCREEN 13: DEF SEG = &HA000
DRAW "c142;bm100,100;r4;br2;bu2;u3;bd5;br2;r4;bl6;bd2;d3;"
DRAW "bm2,2;r6;d6;l6;u6;"
GET (2, 2)-(8, 8), d
GET (98, 92)-(114, 108), B
CLS
OUT &H3C8, 0
FOR k = 0 TO 767: OUT &H3C9, 0: NEXT
DEF SEG = &HA000
BLOAD n$ + ".cap", 0: DEF SEG = &HA000 + 4000
OUT &H3C8, 0
FOR k = 0 TO 767: P = PEEK(k): OUT &H3C9, P: NEXT
REM Main Program
x% = 160: y% = 100
cursor:
PUT (x%, y%), B
inkey1:
i$ = INKEY$: IF i$ = "" THEN GOTO inkey1
IF i$ = " " THEN GOTO inkey1
PUT (x%, y%), B
AA% = ASC(i$) AND 223
IF AA% = 0 THEN GOTO mainkeyboardscan
IF AA% = 71 THEN COLOR 15: CLS : SCREEN 0: DEF SEG : END
IF AA% = 83 THEN GOTO preparetoexit
IF AA% = 72 THEN GOTO helpscrn
IF AA% = 90 THEN GOTO zoom
GOTO cursor
mainkeyboardscan:
IF ASC(MID$(i$, 2)) = 75 THEN x% = x% - 2
IF ASC(MID$(i$, 2)) = 77 THEN x% = x% + 2
IF ASC(MID$(i$, 2)) = 72 THEN y% = y% - 2
IF ASC(MID$(i$, 2)) = 80 THEN y% = y% + 2
IF ASC(MID$(i$, 2)) = 71 THEN x% = x% - 2: y% = y% - 2
IF ASC(MID$(i$, 2)) = 79 THEN x% = x% - 2: y% = y% + 2
IF ASC(MID$(i$, 2)) = 73 THEN x% = x% + 2: y% = y% - 2
IF ASC(MID$(i$, 2)) = 81 THEN x% = x% + 2: y% = y% + 2
IF x% > 300 THEN x% = 300
IF x% < 6 THEN x% = 6
IF y% > 180 THEN y% = 180
IF y% < 5 THEN y% = 5
GOTO cursor
helpscrn:
DEF SEG = &HA000: BSAVE "temp.bin", 0, 64780!: CLS
'End of part 1 of 5
--- Maximus 2.01wb
* Origin: Verbose Ink * Dallas * 214-437-0914 * V32b/HST (1:124/5125)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #3853
Date: 04-09-93 22:56 (Public)
From: EARL MONTGOMERY
To: ALL
Subject: Part 2 of Clipedv6
────────────────────────────────────────────────────────────────────────────────
'Part 2 of 5. Clipedv6.Bas
DEF SEG = &HA000 + 4000
OUT &H3C7, 0
FOR k = 0 TO 767
A = INP(&H3C9)
POKE k, A
NEXT
SCREEN 9
COLOR 12, 0
PRINT "Command from main screen:"
PRINT "<G>=Good Bye <H>=This menu."
PRINT "<S>=Press this key before saving the picture using VGACLIP!"
PRINT "<Z>=Go to ZOOM Edit Mode."
PRINT
PRINT "Commands from ZOOM Edit Mode:"
PRINT "<D>=Pen-Down Mode."
PRINT "<C>=Increases color value."
PRINT "<->=Decreases color value."
PRINT "<F>=Changes color to the same color as one block to the right."
PRINT "<L>=Return to the main screen without saving the editing."
PRINT "<S>=Saves your editing and returns to the main screen."
PRINT "<U>=Pen Up Mode."
PRINT "Use the arrow keys on the keypad to move the cursor. Home moves"
PRINT "the cursor up and to the left. PgUp moves it up and to the right."
PRINT "End moves it down and to the left and PgDn moves it down and to"
PRINT "the right. All keys are repeat keys. Just hold them down!"
PRINT "Press any key to continue."
inkey2:
Z$ = INKEY$: IF Z$ = "" THEN GOTO inkey2
SCREEN 13
OUT &H3C8, 0: FOR k = 0 TO 767: OUT &H3C9, 0: NEXT
DEF SEG = &HA000: BLOAD "temp.bin", 0
DEF SEG = &HA000 + 4000
OUT &H3C8, 0
FOR k = 0 TO 767: P = PEEK(k): OUT &H3C9, P: NEXT
GOTO cursor
zoom:
GET (x%, y%)-(x% + 19, y% + 19), PIX
DEF SEG = &HA000 + 4000
OUT &H3C7, 0
FOR k = 0 TO 767: A = INP(&H3C9): POKE k, A: NEXT
DEF SEG = &HA000: BSAVE "temp.bin", 0, 64780!
CLS : PUT (50, 50), PIX, PSET
FOR y = 4 TO 164 STEP 8
LINE (100, y)-(260, y), 142
NEXT
FOR x = 100 TO 260 STEP 8
LINE (x, 4)-(x, 164), 142
NEXT
x = 160: y = 100
X1 = 59: Y1 = 60
i% = 1
OPEN "r", #1, "zoom", 1: FIELD 1, 1 AS O$
FOR y = 50 TO 69
FOR x = 50 TO 69
LSET O$ = CHR$(POINT(x, y)): PUT 1, i%
i% = i% + 1
NEXT x, y
CLOSE #1
i% = 1
'End of part 2 of 5
--- Maximus 2.01wb
* Origin: Verbose Ink * Dallas * 214-437-0914 * V32b/HST (1:124/5125)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #3854
Date: 04-09-93 22:58 (Public)
From: EARL MONTGOMERY
To: ALL
Subject: Part 3 of clipedv6.bas
────────────────────────────────────────────────────────────────────────────────
'Part 3 of 5 clipedv6.bas
OPEN "r", #1, "zoom", 1: FIELD 1, 1 AS O$
FOR y = 6 TO 164 STEP 8
FOR x = 102 TO 260 STEP 8
GET #1, i%: i% = i% + 1
IF ASC(O$) = 142 THEN PAINT (x, y), 143, 142: GOTO skipover
PAINT (x, y), ASC(O$), 142
skipover:
NEXT x, y
CLOSE #1
x = 176: y = 88
flag$ = "jump"
LINE (170, 180)-(190, 198), 142, B
c = POINT(x, y)
IF c = 142 THEN c = 143
PAINT (180, 185), c, 142: LOCATE 25, 30: PRINT c;
inkey3:
i$ = INKEY$: IF i$ = "" THEN GOSUB putcursor: GOTO inkey3
AA = ASC(i$)
IF AA = 0 THEN GOTO keyboardscanfromzoom
IF i$ = "d" OR i$ = "D" THEN flag$ = ""
IF i$ = "c" OR i$ = "C" THEN c = c + 1: IF c > 255 THEN c = 0
IF i$ = "-" OR i$ = "_" THEN c = c - 1: IF c < 0 THEN c = 0
IF c = 142 AND i$ = "-" OR i$ = "_" THEN c = 141
IF c = 142 AND i$ = "c" OR i$ = "C" THEN c = 143
IF i$ = "c" OR i$ = "C" THEN GOSUB printnewcolor
IF i$ = "-" OR i$ = "_" THEN GOSUB printnewcolor
IF i$ = "f" OR i$ = "F" THEN c = POINT(x + 8, y): IF c = 142 THEN c = 143
IF i$ = "s" OR i$ = "S" THEN GOTO savefromkeyboard
IF i$ = "l" OR i$ = "L" THEN GOSUB bloadscrn: GOTO cursor
IF i$ = "u" OR i$ = "U" THEN flag$ = "jump"
IF flag$ = "" THEN PAINT (x, y), c, 142: PSET (X1, Y1), c
PUT (x - 3, y - 3), d: FOR d = 0 TO 50: NEXT: PUT (x - 3, y - 3), d
i$ = "": GOTO inkey3
keyboardscanfromzoom:
IF ASC(MID$(i$, 2)) = 75 THEN x = x - 8: X1 = X1 - 1
IF ASC(MID$(i$, 2)) = 77 THEN x = x + 8: X1 = X1 + 1
IF ASC(MID$(i$, 2)) = 72 THEN y = y - 8: Y1 = Y1 - 1
IF ASC(MID$(i$, 2)) = 80 THEN y = y + 8: Y1 = Y1 + 1
IF ASC(MID$(i$, 2)) = 71 THEN x = x - 8: y = y - 8: X1 = X1 - 1: Y1 = Y1 - 1
IF ASC(MID$(i$, 2)) = 79 THEN x = x - 8: y = y + 8: X1 = X1 - 1: Y1 = Y1 + 1
IF ASC(MID$(i$, 2)) = 73 THEN x = x + 8: y = y - 8: X1 = X1 + 1: Y1 = Y1 - 1
IF ASC(MID$(i$, 2)) = 81 THEN x = x + 8: y = y + 8: X1 = X1 + 1: Y1 = Y1 + 1
IF x > 256 THEN x = 256
IF x < 104 THEN x = 104
IF y > 160 THEN y = 160
IF y < 8 THEN y = 8
IF X1 < 50 THEN X1 = 50
IF X1 > 69 THEN X1 = 69
IF Y1 > 69 THEN Y1 = 69
IF Y1 < 50 THEN Y1 = 50
IF flag$ = "jump" THEN GOSUB putcursor: GOTO inkey3
PAINT (x, y), c, 142
PSET (X1, Y1), c
GOTO inkey3
savefromkeyboard:
GET (50, 50)-(69, 69), PIX
DEF SEG = &HA000: BLOAD "temp.bin", 0
PUT (x%, y%), PIX, PSET
GOTO cursor
--- Maximus 2.01wb
* Origin: Verbose Ink * Dallas * 214-437-0914 * V32b/HST (1:124/5125)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #3855
Date: 04-09-93 23:02 (Public)
From: EARL MONTGOMERY
To: ALL
Subject: Part 4 of Clipedv4
────────────────────────────────────────────────────────────────────────────────
'Part 4 of 5. Clipedv6.bas
preparetoexit:
REM blanks cursor and saves-ends
PUT (x%, y%), B: PUT (x%, y%), B
inkey4:
i$ = INKEY$: IF i$ = "" THEN GOTO inkey4
IF i$ = "g" OR i$ = "G" THEN CLS : SCREEN 0: END
GOTO inkey4
errorroutine:
SCREEN 0: WIDTH 80: CLS : RESUME restart
keyboard:
DIM inregs AS RegTypeX, outregs AS RegTypeX
filespec$ = "*.cap" + CHR$(0)
PRINT STRING$(75, 196)
inregs.ax = &H2F00
CALL INTERRUPTX(&H21, inregs, outregs)
data.seg = outregs.es
data.off = outregs.bx
inregs.ax = &H4E00
inregs.dx = SADD(filespec$)
inregs.ds = -1
CALL INTERRUPTX(&H21, inregs, outregs)
cy = outregs.flags AND 1
IF cy = 0 THEN
WHILE cy = 0
DEF SEG = data.seg
f.name$ = ""
i = data.off + 30
WHILE PEEK(i) <> 0
f.name$ = f.name$ + CHR$(PEEK(i))
i = i + 1
WEND
DEF SEG
PRINT f.name$ + " ";
inregs.ax = &H4F00
CALL INTERRUPTX(&H21, inregs, outregs)
cy = outregs.flags AND 1
WEND
ELSE GOSUB PRINTNOCAPFILES
END IF
PRINT STRING$(75, 196)
INPUT "Filename to load"; n$
RETURN
PRINTNOCAPFILES:
PRINT "There are no .CAP files in this directory."
PRINT STRING$(75, 196)
INKEY5:
i$ = INKEY$: IF i$ = "" THEN GOTO INKEY5
DEF SEG : CLS : SCREEN 0: WIDTH 80: END
putcursor:
PUT (x - 3, y - 3), d
FOR d = 0 TO 50: NEXT
PUT (x - 3, y - 3), d
RETURN
printnewcolor:
PAINT (180, 185), c, 142
LOCATE 25, 30
PRINT " ";
LOCATE 25, 30
PRINT c;
RETURN
'end of part 4 of 5
--- Maximus 2.01wb
* Origin: Verbose Ink * Dallas * 214-437-0914 * V32b/HST (1:124/5125)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #3856
Date: 04-09-93 23:04 (Public)
From: EARL MONTGOMERY
To: ALL
Subject: Part 5 of 5 Clipedv6
────────────────────────────────────────────────────────────────────────────────
'Part 5 of 5. Clipedv6.bas
bloadscrn:
CLS
DEF SEG = &HA000
BLOAD "temp.bin", 0
RETURN
'end of part 5 of 5
--- Maximus 2.01wb
* Origin: Verbose Ink * Dallas * 214-437-0914 * V32b/HST (1:124/5125)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #5290
Date: 04-09-93 13:17 (Public)
From: JOHN GALLAS
To: JASON PETERSON
Subject: 2400+baud, and moving cu
────────────────────────────────────────────────────────────────────────────────
JP>Is it true that QuickBASIC 4.5 will only support up to 2400 baud?
Nope, it'll go up to 19,200.
JP>And ifso, is there someway to get around that?
JP>Also, to teach mymelf a little bit more, I've been writing my
JP>own communications routines (which is why the first and now
JP>this question) and I think I've got everything figured out,
JP>except I'm not sure how to move the cursor remotely (such
JP>as with LOCATE).
JP>I assume you have to use ANSI escape sequences.. Does anyone
JP>have some code they'd be willing to share?
Try this sub:
SUB ModemLocate (y, x)
a$ = CHR$(27) + "["
a$ = a$ + LTRIM$(STR$(y)) + ";" + LTRIM$(STR$(x))
a$ = a$ + "H"
'And now send a$ out to the modem with whatever mode routines
'you use.
END SUB
* OLX 2.1 TD * Two blondes in a Volkswagon: Farfromthinkin
--- Maximus 2.01wb
* Origin: Command Line BBS =Mpls. MN= V.32bis [612-788-6685] (1:282/2007)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #5802
Date: 04-10-93 08:22 (Public)
From: RICH GELDREICH
To: VICTOR YIU
Subject: Prototype 1/3
────────────────────────────────────────────────────────────────────────────────
'________O_/________________________| SNIP
|______________________\_O_______
' O \ | HERE | / O
'This file created by PostIt! v6.0.
'>>> Start of page 1.
'Prototype PostIt! script creator. Created April, 1993
'This simple program creates a newer type of PostIt! self
'extracting script that decodes very quickly and can handle files
'up to 34,000 bytes.
'
'This script eliminates the "middle man" by outputting to the
'destination file directly in the G sub. This speeds up decoding
'and lowers memory usage because we don't have to first append
'each G line onto a string before the file is decoded. Since
'we're not using strings anymore, the only limit that remains now
'is QB's internal limit on how large a program may be(it might
'actually be a dgroup limitation, not positive yet).
'
'I haven't extensively tested the scripts this program creates, so
'use with caution.
'
'To decode a script created by this program directly from the
'command line just type:
'
' QB/run<script> or QBASIC /run<script>
'
'Where <script> is the name of the script to decode, of course.
'You still have to edit out any garbage in the file, I haven't
'worked out any way for the self extractor to do that, yet...
'
'If the file gets decoded correctly, the script will exit right
'back to DOS without making you lift a single finger.
'(Unfortunatly PDS prompts you if to save the file after the
'script is decoded. I don't know if there is a way to disable
'this, so use QB4.5 or QBASIC instead.)
'
'If a CRC error does occur the script stays in the QB/QBX
'environment so you can check it out for garbage.
'
'If you don't want to exit back to DOS after the script is
'decoded, then just don't use the /run option on the command line.
DEFINT A-Z
DECLARE SUB EncodeStart ()
DECLARE SUB EncodeBlock ()
DECLARE SUB EncodeEnd ()
DIM BytesLeft AS LONG
DIM SHARED I$
DIM SHARED InputBuffer$, BytesRead
DIM SHARED GoodChars$
DIM SHARED BitBuffer, BitsInBuffer
DIM SHARED OutputLine$, OutputPos, LinesWritten
DIM SHARED RunningCRC
DIM SHARED Power2(0 TO 7)
IF POS(0) <> 1 THEN PRINT
PRINT "PostIt! Prototype Script Encoder By RG"
INPUT "Input file"; I$
INPUT "Output file"; O$
OPEN I$ FOR BINARY AS #1
BytesLeft = LOF(1)
IF BytesLeft = 0 THEN
CLOSE
KILL I$
PRINT I$; " wasn't found."
END
ELSEIF BytesLeft > 34000 THEN
PRINT I$; " is too big for one script."
END
END IF
OPEN O$ FOR OUTPUT AS #2 LEN = 4096
EncodeStart
InputBuffer$ = SPACE$(4096)
BytesRead = 4096
'>>> Continued on page 2
--- MsgToss 2.0b
* Origin: Computer Co-Op - Voorhees, NJ | Ted Hare (1:266/29)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #5803
Date: 04-10-93 08:23 (Public)
From: RICH GELDREICH
To: VICTOR YIU
Subject: Prototype 2/3
────────────────────────────────────────────────────────────────────────────────
'>>> Start of page 2.
DO
IF BytesLeft < 4096 THEN
InputBuffer$ = SPACE$(BytesLeft)
BytesRead = BytesLeft
END IF
GET #1, , InputBuffer$
EncodeBlock
BytesLeft = BytesLeft - BytesRead
LOOP WHILE BytesLeft
EncodeEnd
CLOSE 1, 2
LOCATE , 1
PRINT "Finished!"
END
SUB EncodeBlock
FOR a = 1 TO BytesRead
k = ASC(MID$(InputBuffer$, a, 1))
RunningCRC = (RunningCRC + k) AND 255
BitBuffer = BitBuffer OR k * Power2(BitsInBuffer)
BitsInBuffer = BitsInBuffer + 8
DO WHILE BitsInBuffer >= 6
MID$(OutputLine$, OutputPos) = MID$(GoodChars$, 1 +_
(BitBuffer AND 63), 1)
OutputPos = OutputPos + 1
IF OutputPos = 66 THEN
PRINT #2, OutputLine$
OutputPos = 3
LinesWritten = LinesWritten + 1
IF (LinesWritten AND 15) = 0 THEN
LOCATE , 1: PRINT LinesWritten;
END IF
END IF
BitBuffer = BitBuffer \ 64
BitsInBuffer = BitsInBuffer - 6
LOOP
NEXT
END SUB
SUB EncodeEnd
IF BitsInBuffer <> 0 THEN
MID$(OutputLine$, OutputPos) = MID$(GoodChars$, 1 +_
(BitBuffer AND 63), 1)
OutputPos = OutputPos + 1
END IF
IF OutputPos <> 3 THEN
PRINT #2, LEFT$(OutputLine$, OutputPos - 1)
LinesWritten = LinesWritten + 1
END IF
Q$ = CHR$(34)
L1$ = "IF K<>" + MID$(STR$(RunningCRC), 2) + " THEN ?" + Q$ +_
"Bad CRC!" + Q$ + ":CLOSE:KILL F$ ELSE ?"
L1$ = L1$ + Q$ + "Success!" + Q$ + ":SYSTEM"
L2$ = "SUB G(A$):FOR A=1 TO LEN(RTRIM$(A$)):R=R+T(I,ASC(MID$("+_
"A$,A,1)))"
L3$ = "I=I+6:IF I>7 THEN ?#1,CHR$(R AND Q);:K=(K+R)AND"+_
" Q:R=R\256:I=I-8"
'>>> Continued on page 3
--- MsgToss 2.0b
* Origin: Computer Co-Op - Voorhees, NJ | Ted Hare (1:266/29)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #5804
Date: 04-10-93 08:26 (Public)
From: RICH GELDREICH
To: VICTOR YIU
Subject: Prototype 3/3
────────────────────────────────────────────────────────────────────────────────
'>>> Start of page 3.
L4$ = "NEXT:L&=L&+100:?L&\" + MID$(STR$(LinesWritten), 2) +_
";CHR$(29)"
L4$ = L4$ + Q$ + "%" + Q$ + ";:LOCATE,1:END SUB"
PRINT #2, L1$
PRINT #2, L2$
PRINT #2, L3$
PRINT #2, L4$
END SUB
SUB EncodeStart
k = 1
FOR a = 0 TO 7
Power2(a) = k
k = k * 2
NEXT
GoodChars$ = "abcdefghijklmnopqrstuvwxyz"
GoodChars$ = GoodChars$ + UCASE$(GoodChars$) + "0123456789()"
OutputLine$ = "G" + CHR$(34) + SPACE$(63)
OutputPos = 3
FOR a = LEN(I$) TO 1 STEP -1
IF INSTR("\:", MID$(I$, a, 1)) THEN EXIT FOR
NEXT
P$ = UCASE$(MID$(I$, a + 1))
Q$ = CHR$(34)
L0$ = "'This prototype PostIt! script was created on " + DATE$ +_
"."
L1$ = "DEFINT A-Z:T$=" + Q$ + "abcdefghijklmnopqrstuvwxyz" + Q$_
+ ":F$=" + Q$ + P$ + Q$
L2$ = "OPEN" + Q$ + "O" + Q$ + ",1,F$,8192:DIM SHARED"+_
" Q,T(7,122),R,I,L&,K"
L2$ = L2$ + ":T$=T$+UCASE$(T$)"
L3$ = "T$=T$+" + Q$ + "0123456789()" + Q$ + ":FOR B=0 TO"+_
" 7:M=2^B:Z=0"
L3$ = L3$ + ":FOR A=1 TO 64"
L4$ = "T(B,ASC(MID$(T$,A,1)))=Z:Z=Z+M:NEXT A,B:Q=255:?"
L4$ = L4$ + Q$ + "Extracting " + Q$ + "F$"
PRINT #2, L0$
PRINT #2, L1$
PRINT #2, L2$
PRINT #2, L3$
PRINT #2, L4$
END SUB
'________O_/________________________| SNIP
|______________________\_O_______
' O \ | HERE | / O
Could you decrease the size of this ^^^^^^^ in the next version? Looking
back at my posted message, I noticed that it gets badly cut off because
it's larger than 65 characters or so.
I'm working on a way to meet Coridon's challenge and increase the
maximum script size to 64k or so... It might involve assembly.
Rich
--- MsgToss 2.0b
* Origin: Computer Co-Op - Voorhees, NJ | Ted Hare (1:266/29)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #10043
Date: 04-12-93 20:57 (Public)
From: JOHN GALLAS
To: JASON PETERSON
Subject: 2400+baud, and moving cu
────────────────────────────────────────────────────────────────────────────────
JP> JG> JP>Is it true that QuickBASIC 4.5 will only support up to 2400 baud?
JP> JG> Nope, it'll go up to 19,200.
JP>
JP> Great! How do you get it to open the modem at that high of a speed
JP> then? It seems to error on anything higher than 9600 baud!
I'm pretty sure that you can use OPEN COM on 19200, but I'm not sure about
numbers in between. This sub will let you change it to whatever you want
after you've opened it.
DEFINT A-Z
DECLARE SUB BaudRate (Func, Port, baud&, err.code)
'example use:
OPEN "COM1:2400,N,8,1" FOR RANDOM AS #1
'now bump it up to 115,200 bps
BaudRate 1, 1, 115200, err.code
IF err.code = 0 THEN PRINT "Success!"
END
SUB BaudRate (Func, Port, baud&, err.code) STATIC
'INPUT: FUNC=0 - return the current baud rate in baud&
' FUNC=1 - set the baud rate from baud&
'See the Serial/Parallel Adapter Tech.Ref. for details
err.code = 0
IF (Port <> 1 AND Port <> 2) THEN err.code = -1: GOTO finito
IF Func = 1 AND baud& < 100 THEN err.code = -2: GOTO finito
ADDR = &H4F8 - (&H100 * Port) ' base address of port reg's
ADDR.LCR = ADDR + 3 ' Line Control Register
ADDR.DL.LSB = ADDR + 0: ADDR.DL.MSB = ADDR + 1' Divisor Latch LSB & MSB
VAL.LCR = INP(ADDR.LCR) ' get old LCR value
OUT ADDR.LCR, VAL.LCR AND &H7F ' Disable DLAB to get to inters
VAL.INT = INP(ADDR.DL.MSB) ' Get the int enable statuses
OUT ADDR.DL.MSB, 0 ' Disable all modem intertupts
OUT ADDR.LCR, VAL.LCR OR &H80 ' Enable DLAB to gain access
IF Func = 0 THEN GOTO getbaud ' if get then go
DIVISOR = (1843200! / baud&) / 16'see page 17 of the SERIAL/PARALLEL ADAPTER (
'in the back of the PC-AT TECH.REF.)
MSB = DIVISOR \ 2 ^ 8: LSB = DIVISOR MOD 2 ^ 8
OUT ADDR.DL.MSB, MSB
OUT ADDR.DL.LSB, LSB' put out the new baud rate
GOTO finito
getbaud:
'get the current baud rate
MSB = INP(ADDR.DL.MSB)
LSB = INP(ADDR.DL.LSB)'get old baud rate
DIVISOR = MSB * 2 ^ 8 + LSB
baud& = (1843200! / DIVISOR) / 16
finito:
IF err.code = 0 THEN
OUT ADDR.LCR, VAL.LCR AND &H7F ' Disable DLAB to get to inters
OUT ADDR.DL.MSB, VAL.INT ' Replace orig. inter. values
OUT ADDR.LCR, VAL.LCR ' Replace orig. LCR values
END IF
END SUB
--- ProBoard v1.31b1 [Reg]
* Origin: Rivendell BBS - ProBoard Support USA - 612.323.9473 (1:282/90)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #11010
Date: 04-13-93 06:36 (Public)
From: JOE NEGRON
To: DOUG MILLER
Subject: Stuff Keyboard.
────────────────────────────────────────────────────────────────────────────────
DM> Can anyone tell me how to stuff keys into the keyboard buffer?
Here ya go:
============================== Begin code ==============================
DEFINT A-Z
DECLARE SUB StuffBuf (Keys$)
'***********************************************************************
'* SUB StuffBuf
'*
'* PURPOSE
'* Inserts Keys$ into the keyboard buffer just as if it had been
'* entered from the keyboard. Note that only fifteen characters may
'* be inserted or the machine may lock up.
'***********************************************************************
SUB StuffBuf (Keys$) STATIC
Work$ = LEFT$(Keys$, 15) '15 characters maximum
Length% = LEN(Work$)
DEF SEG = 0
POKE &H41A, &H1E 'buffer head
POKE &H41C, &H1E + Length% * &H2 'buffer tail
FOR X% = 1 TO Length% 'POKE each char one by one
POKE &H41C + X% * &H2, ASC(MID$(Work$, X%))
NEXT X%
DEF SEG
Work$ = ""
END SUB
=============================== End code ===============================
--Joe in Bay Ridge, Brooklyn, NY, Tue, 04-13-1993--
... Put on your seatbelt. I wanna try something...
___
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: #7264
Date: 04-11-93 20:41 (Public)
From: HARVEY PARISIEN
To: MIKE DORAN
Subject: READREP.BAS 1/4
────────────────────────────────────────────────────────────────────────────────
On (10 Apr 93) Mike Doran wrote to HARVEY PARISIEN...
MD> Many mail readers give it up at 100 lines let alone 237!
MD> Any help muchly appreciated.
''====== This message has been split into several parts...
''
''====== PART 1
''
'--------------------------------------------------------------------------
' Author: Harvey Parisien
' Copyright (c) 1993 Harvey Parisien, all rights reserved.
' Overerx Inc., Box 323 Station A, Kingston, Ontario, Canada K7M 6R2
' FidoNet: 1:249/114
'--------------------------------------------------------------------------
' Program: READREP.EXE
' Purpose: Quick and dirty REP packet unarchiver reader
'--------------------------------------------------------------------------
' This code can be used by anyone. It has been stripped of it's normal
' video routines so it can be run in any environment QB or PDS etc. It
' is intended for use as a simple REP packet check, or for informational
' purposes. There are a few routines that could possibly help in further
' developing QWK readers. Enjoy... HP
DEFINT A-Z
DECLARE FUNCTION autounarc$ (arcname$)
DECLARE SUB dism (message$, array$(), numlines%, Ret%, maxwid%)
DECLARE SUB tlist (array$(), numlines%, maxwid%, Rows%, trow%, lcol%, Ret%)
DECLARE FUNCTION scan% ()
DECLARE FUNCTION Exist (filename$)
DECLARE SUB display (filename$)
TYPE RegTypeX
AX AS INTEGER
bx AS INTEGER
CX AS INTEGER
DX AS INTEGER
bp AS INTEGER
si AS INTEGER
di AS INTEGER
flags AS INTEGER
DS AS INTEGER
es AS INTEGER
END TYPE
TYPE dat
flag AS STRING * 1
num AS STRING * 7
date AS STRING * 8
time AS STRING * 5
to AS STRING * 25
From AS STRING * 25
subject AS STRING * 25
Pass AS STRING * 12
ref AS STRING * 8
blocks AS STRING * 6
status AS STRING * 1
area AS STRING * 1
dummy AS STRING * 4
END TYPE
TYPE block
a AS STRING * 128
END TYPE
DIM SHARED dat AS dat
DIM SHARED block AS block
CLS
filename$ = COMMAND$ 'get filename
IF LEN(filename$) = 0 THEN
PRINT "USE: READREP reparchivename.ext"
END
END IF
arccmd$ = autounarc$(filename$) 'get unarchive command
PRINT arccmd$ 'print unarchive command
SHELL arccmd$ 'shell out and unarchive
F$ = filename$ 'create local packet name
MID$(F$, LEN(F$) - 2) = "MSG"
i = INSTR(F$, "\")
DO WHILE i > 0
F$ = MID$(F$, i + 1)
i = INSTR(F$, "\")
LOOP
CALL display(F$)
END
FUNCTION autounarc$ (arcname$)
autounarc$ = ""
IF NOT Exist(arcname$) THEN EXIT FUNCTION
'get archive id markers
ff = FREEFILE
OPEN arcname$ FOR BINARY AS ff
tem1$ = SPACE$(5)
tem2$ = SPACE$(1)
GET #ff, 1, tem1$
GET #ff, LOF(ff) - 1, tem2$
CLOSE ff
'test for archive type and unarchive
''====== CONTINUED
--- PPoint 1.56
* Origin: Harvey Parisien (1:249/114)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #7265
Date: 04-11-93 20:42 (Public)
From: HARVEY PARISIEN
To: MIKE DORAN
Subject: READREP.BAS 2/4
────────────────────────────────────────────────────────────────────────────────
''====== PART 2
''
IF LEFT$(tem1$, 4) = "PK" + CHR$(3) + CHR$(4) THEN
autounarc$ = "PKUNZIP -o " + arcname$
ELSEIF RIGHT$(tem1$, 3) = "-lh" THEN
autounarc$ = "LHA e " + arcname$
ELSEIF LEFT$(tem1$, 2) = "`" + CHR$(234) THEN
autounarc$ = "ARJ e " + arcname$
ELSEIF LEFT$(tem1$, 3) = "ZOO" THEN
autounarc$ = "ZOO e " + arcname$
ELSEIF tem2$ = CHR$(254) THEN
autounarc$ = "PAK e /wa " + arcname$
ELSEIF LEFT$(tem1$, 1) = CHR$(26) THEN
autounarc$ = "PKUNPAK /r " + arcname$
ELSE
PRINT "UNKNOWN ARCHIVE TYPE: " + arcname$
END IF
END FUNCTION
SUB dism (message$, array$(), numlines%, Ret%, maxwid%)
start = 1
numlines% = 0
GOSUB geti
DO WHILE i > 0
numlines% = numlines% + 1
IF i > start THEN
IF i - start > maxwid THEN
st = start + maxwid
EN = start
FOR iq = st TO EN STEP -1
IF MID$(message$, iq, 1) = " " THEN
EXIT FOR
END IF
NEXT
IF iq < EN + 10 THEN
i = EN + maxwid
ELSE
i = iq
END IF
END IF
ttem$ = MID$(message$, start, (i - 1) - (start - 1))
array$(numlines%) = ttem$
start = i + 1
IF MID$(message$, start, 1) = CHR$(10) THEN start = start + 1
GOSUB geti
ELSEIF i = start THEN
array$(numlines%) = ""
start = i + 1
IF MID$(message$, start, 1) = CHR$(10) THEN start = start + 1
GOSUB geti
ELSE
ttem$ = MID$(message$, start)
array$(numlines%) = ttem$
EXIT DO
END IF
IF numlines% = maxdim% THEN
array$(numlines%) = "-end-"
EXIT DO
END IF
LOOP
EXIT SUB
geti:
ifx = INSTR(start, message$, CHR$(227))
IF ifx > 0 THEN MID$(message$, ifx) = CHR$(13)
if1 = INSTR(start, message$, CHR$(13))
if2 = INSTR(start, message$, CHR$(141))
if3 = INSTR(start, message$, CHR$(10))
IF if2 = 0 THEN
i = if1
ELSEIF if1 < if2 THEN
i = if1
ELSE
i = if2
END IF
IF if3 > 0 AND if3 < i THEN
i = if3
END IF
RETURN
END SUB
SUB display (filename$)
IF Exist(filename$) THEN
CLS
line$ = STRING$(80, "─")
maxwid = 80
maxdim = 200
botlin = 25
ff = FREEFILE
OPEN filename$ FOR RANDOM AS ff LEN = LEN(dat)
numblocks = LOF(ff) / LEN(dat)
''====== CONTINUED
--- PPoint 1.56
* Origin: Harvey Parisien (1:249/114)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #7266
Date: 04-11-93 20:42 (Public)
From: HARVEY PARISIEN
To: MIKE DORAN
Subject: READREP.BAS 3/4
────────────────────────────────────────────────────────────────────────────────
''====== PART 3
''
GET #ff, 1, dat
cnt = 1
DO WHILE cnt < numblocks
rec = rec + 1
GET #ff, , dat
cnt = cnt + 1
LOCATE 1, 2
dis$ = " "
LSET dis$ = LTRIM$(STR$(rec))
PRINT "Reply: "; dis$
IF dat.flag = "~" OR dat.flag = "*" THEN
dis$ = "Private, Unread"
ELSEIF dat.flag = "`" OR dat.flag = "+" THEN
dis$ = "Private, Read "
ELSEIF dat.flag = " " OR dat.flag = "-" THEN
dis$ = "Public "
END IF
dis$ = " Date: " + dat.date + " " + dat.time + " " + dis$
PRINT dis$;
IF ASC(dat.status) = 226 THEN
PRINT "KILLED/INACTIVE"
ELSE
PRINT " "
END IF
LOCATE 3, 1
PRINT " From: " + dat.From
PRINT " To: " + dat.to
PRINT " Subject: " + dat.subject
PRINT line$;
tem$ = ""
start = rec + 1
FOR a = start TO start + VAL(dat.blocks) - 2
GET #ff, , block
cnt = cnt + 1
tem$ = tem$ + block.a
NEXT
REDIM body$(maxdim%)
CALL dism(tem$, body$(), numlines%, Ret, maxwid)
choice = 1
trow = 7: lcol = 1
Rows = (botlin - 1) - 6
CALL tlist(body$(), numlines%, maxwid, Rows, trow, lcol, Ret)
ERASE body$
IF Ret = 27 THEN
EXIT DO
END IF
LOOP
CLOSE ff
END IF
END SUB
FUNCTION Exist (File$)
DIM InRegs AS RegTypeX
DIM OutRegs AS RegTypeX
DIM DTA AS STRING * 42
DIM F AS STRING * 64
InRegs.AX = &H1A00
InRegs.DS = VARSEG(DTA)
InRegs.DX = VARPTR(DTA)
CALL InterruptX(&H21, InRegs, OutRegs)
F = File$ + CHR$(0)
InRegs.AX = &H4E00
InRegs.CX = 0
InRegs.DS = VARSEG(F)
InRegs.DX = VARPTR(F)
CALL InterruptX(&H21, InRegs, OutRegs)
IF OutRegs.AX = 2 OR OutRegs.AX = 18 THEN
Exist = 0
ELSE
Exist = -1
END IF
END FUNCTION
FUNCTION scan
scan = 0
DO
CHK$ = INKEY$
IF LEN(CHK$) THEN
EXIT DO
END IF
LOOP
IF LEN(CHK$) = 1 THEN
scan = ASC(CHK$)
''====== CONTINUED
--- PPoint 1.56
* Origin: Harvey Parisien (1:249/114)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #7267
Date: 04-11-93 20:43 (Public)
From: HARVEY PARISIEN
To: MIKE DORAN
Subject: READREP.BAS 4/4
────────────────────────────────────────────────────────────────────────────────
''====== PART 4
''
ELSE
scan = -ASC(RIGHT$(CHK$, 1))
END IF
END FUNCTION
SUB tlist (array$(), numlines%, maxwid%, Rows%, trow%, lcol%, Ret%)
top = 1
DO
FOR a = 0 TO Rows - 1
IF top < 1 THEN top = 1
work$ = SPACE$(maxwid)
IF top + a > numlines% THEN
fl = 1
ELSE
fl = 0
LSET work$ = array$(top + a)
END IF
LOCATE trow + (a), lcol
PRINT work$;
NEXT
'=====================
s = scan
IF s = -72 THEN
top = top - 1
IF top < 1 THEN top = 1
ELSEIF s = -80 THEN
IF fl = 0 THEN top = top + 1
IF top > numlines% - (Rows - 1) THEN top = numlines% - (Rows - 1)
ELSEIF s = -73 THEN
top = top - Rows
IF top < 1 THEN top = 1
ELSEIF s = -81 OR s = 13 THEN
IF fl = 0 THEN top = top + Rows
IF fl = 1 AND s = 13 THEN s = -77: EXIT DO
IF top > numlines% THEN top = numlines%
ELSE
EXIT DO
END IF
LOOP
IF s >= 97 AND s <= 122 THEN s = s - 32
Ret = s
END SUB
''===== END OF SPLIT MESSAGE
--- PPoint 1.56
* Origin: Harvey Parisien (1:249/114)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #8636
Date: 04-20-93 14:10 (Public)
From: EARL MONTGOMERY
To: ALL
Subject: TSR to Capture 640*480*25
────────────────────────────────────────────────────────────────────────────────
CLS:?STRING$(50,178):DEFINT A-Z 'Created by PostIt! 6.0
FOR A=0 TO 6:P(A)=2^A:NEXT:OPEN "B",1,"VGA400.EXE
T$="abcdefghijklmnopqrstuvwxyz":T$=T$+UCASE$(T$)+"0123456789#$
G"nPfwbG(bbaiaCec$$p3i(b78e(8baE*e(caG0aSd*r*Cb)ug*D*6b)qi*M*Xc)y
G"l)GW*hd)mn*2*Hd)Oo)W9*$d)yr)Grb)Jf)ey)WNb)$g)qC)qYb)oh)mD*3b)Hh
G")e(FaGga8baJaWh(daK(oaqcacbajaigaK(iaScaYbWka4haRaqjamdaubGn(ha
G"2(faujaMbqLa4gavcq4aydahhGnaGEa2aq9bydamlGnae5a2(faWjaD(NamdaCc
G"GxaWjaXbaNaubaJcqnamkaLaWPaibaPcWgaKkauaqSaWba8c///////////////
G"/////////////////.GySz1rbrdmWaci(Gmb)w//)c/+8$$acbUG(u4A(qPjdaq
G"ca4A(qPPXeydaJQ(HQ(JY(hBGda8cc4YeaqPPcaWja4A(qPPcaWjaHY(JaCDdKE
G"AaOP(mdaqPjcamkaqHlu(LMeaqLamcW1nq6$(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bl#WIxjWIEGwa0cuZHm3bA6(McW6jStWZvGXgawa98VDgOPcaCkaD
G"PS)qvlYUvxTODgSidA6(PcW4uSODgSiDcWkpHjNb8O3DcqYxQkU8lo8$2zGMkaW
G"Pa8LxDPS*G#aw(u3aJcwaldqvlYoutTREbMJxgihedomt54Lb3HW$2zGMk(RaSf
G"wDPS*uAs(8cW4IeuqAk(XcWG5lWCeSsYyT8IdVAkoWwab4GAbKusj#qI$jawlx1
G"ISBLXgaxa$VOxgS4blamDnKF0qV4DcKir#F8b(GxDPS(m1IeCybjsWICjWHDjqI
G"CjWcat3ajEN$d2da0zWIDjqI$5$wlZVhhCSbGf)SJdSfGDIOjbayla74aBby3fR
'>> Continued on pg. 2
--- Maximus 2.01wb
* Origin: Verbose Ink * Dallas * 214-437-0914 * V32b/HST (1:124/5125)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #8637
Date: 04-20-93 14:12 (Public)
From: EARL MONTGOMERY
To: ALL
Subject: TSR to Capture 640*480*25
────────────────────────────────────────────────────────────────────────────────
>> Start: pg. 2
G"4aBbSJdUfGDeKOdUfWIoWwagBayb4WV6fWa#OwaldquwDf$ECWI6Vi8lYWI0jW8
G"KIydF5vwldautfLuwDvv87Xba6dCb(Dg5REbSO1dyHAbSJ8ZLtROgqDgSi2dCZ6
G"X7Ktl6$mTVJ8ZrYICy$WbqNerV#qdnW8dSEaEWwaP4HAbS#4l#qqbnpPP8MaRJD
G"xF5LwzTfwldqu5sba7QxGd#da05WGdtG42VREboLMk(RaK1Y////,WjaqcawDuq
G"0admGyhmUKtoGapiOmukGeto5idiffMCSbstV5gDN9wBLjxEhd(qbG(qfaVu1ea
G"Ofatv3yJv2CMvhBSLhiYvwBVzxzKbGdaihadfMBU9gDGixzT9MDLfsiaqiabXMC
G"Lfgz5bsAUnhDHXgBLrwiG0ciVufi09gi15gBVfgzaGcaQcGvhfeiZnMCLvMBGmw
G"yWrxDYvgiVzgiZidm4rdmWGNm1ydiJ9gBVj3CPaG1ay1rbrdmWaYlvbcDVbICL1
G"2B2vglG8MCGeetu1IvGq3BGe2y0LMDHrxzfx(eeamUiuso5Dba4qaX4Iqj50$f(
G"gbiJlcLKtmu(IeWmUiusovk/a8$$b////+q$/i(Efqdk)2udtdTenb,G/*a"
N=3928:K=255:IF LEN(C$)<>5238 THEN ?"Bad script!"Ksum!":END
FOR A=1 TO N:LOCATE 1:?STRING$(50/N*A,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=110 THEN ?"Ok":END ELSE ?"Bad checksum!":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$:FOR Q=2 TO 9:DO:S=INSTR(A$,CHR$(Q+38))
IF S THEN A$=LEFT$(A$,S-1)+STRING$(Q,97)+MID$(A$,S+1)
LOOP WHILE S:NEXT:C$=C$+A$:END SUB
--- Maximus 2.01wb
* Origin: Verbose Ink * Dallas * 214-437-0914 * V32b/HST (1:124/5125)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #8638
Date: 04-20-93 14:14 (Public)
From: EARL MONTGOMERY
To: ALL
Subject: Source code to load files
────────────────────────────────────────────────────────────────────────────────
DEFINT A-Z
SCREEN 13: CLS
OUT &H3D4, 9
OUT &H3D5, &H40
OUT &H3D4, 20
OUT &H3D5, 0
OUT &H3D4, 23
OUT &H3D5, &HE3
OUT &H3C4, 4
OUT &H3C5, &H6
clrscrn:
OUT &H3C4, 2
OUT &H3C5, 15: CLS
REM Setting all palettes to zero
OUT &H3C8, 0
FOR x = 0 TO 767
OUT &H3C9, 0
NEXT
loadem:
DEF SEG = &HA000
OUT &H3C4, 2: OUT &H3C5, 1: BLOAD "0.bin", 0
OUT &H3C4, 2: OUT &H3C5, 2: BLOAD "1.bin", 0
OUT &H3C4, 2: OUT &H3C5, 4: BLOAD "2.bin", 0
OUT &H3C4, 2: OUT &H3C5, 8: BLOAD "3.bin", 0
OUT &H3CE, 4: OUT &H3CF, 3: REM Necessary to read saved palettes
REM Reading palette info from tail end of 3.bin
DEF SEG = &HA000 + 2000
OUT &H3C8, 0
FOR x = 0 TO 767
p = PEEK(x)
OUT &H3C9, p
NEXT
waitkey:
i$ = INKEY$: IF i$ = "" THEN GOTO waitkey
REM Resetting CRTC and Sequencer index registers
REM This may prove not to be necessary
OUT &H3C4, 2: OUT &H3C5, 15: CLS
OUT &H3D4, 9: OUT &H3D5, 41
OUT &H3D4, 20: OUT &H3D5, 40
OUT &H3D4, 23: OUT &H3D5, &HA3
OUT &H3D4, 4: OUT &H3D5, &HE
SCREEN 0: CLS : DEF SEG : END
--- Maximus 2.01wb
* Origin: Verbose Ink * Dallas * 214-437-0914 * V32b/HST (1:124/5125)
════════════════════════════════════════════════════════════════════════════════
Area: QuickBasic
Msg: #8639
Date: 04-20-93 14:16 (Public)
From: EARL MONTGOMERY
To: ALL
Subject: Doc File for VGA400
────────────────────────────────────────────────────────────────────────────────
VGA400
Place VGA400.EXE in your root directory. Type VGA400 from the DOS prompt.
The TSR is now installed in memory. When you are ready to capture a
graphic screen press CTRL and A to activate the TSR. The resulting 4
BSAVED/BLOADable files along with the palettes will be written to the
current directory. The file names will always be 0.bin 1.bin 2.bin and
3.bin. You should rename the files to whatever you wish and copy them
to the appropriate directory. Failure to do so will result in an over-
write.
This TSR will capture any 320X400X256 graphic screen along with the
original palettes. It will also capture any GIF file up to and in-
cluding 640*480*256 provided they are displayed using CSHOW.
Of course I am referring to using a Generic VGA Monitor 320X200X256.
Example: You download a GIF file that is marked 640X480X256. Your
Generic 320x200x256 monitor can't handle that resolution. But let
CSHOW (A GIF graphic viewer) display the file for you. It won't
fill the entire screen but the resolution is remarkable! Capture
the screen using VGA400.exe then use the BASIC loader to load
the captured image into your own QB programs. I've tried using VPIC
(another Graphic Viewer) but had less than satisfactory results.
I'm not knocking VPIC (after all it was written by my cousin!) JUST
KIDDING!! VPIC is an excellent Viewer but doesn't work well with
my TSR or BASIC loader.
Notes on the loader file: If you are running Desqview or a Disk Cache you
may find that if the same file is loaded twice during the same session
the second presentation will probably be distorted. The solution is not
to run DV or a cache if you find this to be a problem.
Enjoy
Earl Montgomery
--- Maximus 2.01wb
* Origin: Verbose Ink * Dallas * 214-437-0914 * V32b/HST (1:124/5125)