Dec 152017
QuickBasic scrapbook. Source code + text from BBS threads. | |||
---|---|---|---|
File Name | File Size | Zip Size | Zip Type |
DESC.SDI | 293 | 121 | deflated |
EID.DIZ | 214 | 83 | deflated |
FILEID.DIZ | 293 | 121 | deflated |
INTRO.QBS | 1771 | 689 | deflated |
QBS103-1.DOC | 45573 | 12795 | deflated |
QBS103-2.DOC | 56285 | 19262 | deflated |
QBS103-3.DOC | 41025 | 13112 | deflated |
QBS103-4.DOC | 39668 | 10237 | deflated |
QBS103-5.DOC | 34948 | 9677 | deflated |
QBS103-6.DOC | 41714 | 12162 | deflated |
QBS103-7.DOC | 38524 | 10276 | deflated |
QBS103-8.DOC | 42326 | 13689 | deflated |
QBS103-9.DOC | 34379 | 20908 | deflated |
QBS103-A.DOC | 46928 | 14224 | deflated |
QBS103-B.DOC | 44223 | 14833 | deflated |
QBS103-C.DOC | 55286 | 20229 | deflated |
SQBC010.DOC | 8413 | 3092 | deflated |
TPCREAD.ME | 199 | 165 | deflated |
Download File QBS-0103.ZIP Here
Contents of the QBS103-1.DOC file
Area: QuickBasic
Msg: #7787
Date: 04-02-93 23:06 (Public)
From: VICTOR YIU
To: ALL
Subject: VERY Important Message!
Hi, All! ========= IMPORTANT ANNOUCEMENT =========>
Finally, PostIt! 6.0 will be posted. I won't repeat the new features,
but they can be found in PostIt!'s header.
It is =ESSENTIAL= that you capture the next 16 messages. From this
now on, PostIt!'s scripts will not be able to be decoded by QuickBASIC
alone. It will require PostIt! 6.0 to extract the file.
The new format is so much more compact -- primarily due to the removal
of the decoder. It was pretty wasteful to post the decoder again and again,
with every binary file. That's why it has been incorporated into PostIt! 6.0.
You may wonder why this release is 16 messages long. That may sound like
much, but it isn't! The line length has been shortened to =65= and page
length to =85=. All that contribute to more line wrapping, thus increasing
the number of posts. The 'real' file size of PostIt! 6.0 is only 1K bigger
than 5.1. Why '65'? To make sure all people will recieve PostIt! without
things being truncated.
I really hope the complete PostIt! package reaches everybody reading this
echo. I am excited to post my latest additions, so here it is.....
Victor
... Shir I ken spel, I grahdooated puhblik hi skul!
--- Blue Wave/RA v2.12 [NR]
* Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 | (1:106/30.0)
Area: QuickBasic
Msg: #7788
Date: 04-02-93 22:57 (Public)
From: VICTOR YIU
To: ALL
Subject: PostIt! 6.0 1/16
'________O_/________________________| SNIP |______________________\_O_______
' O \ | HERE | / O
'This file created by PostIt! v6.0.
'>>> Start of page 1.
'
' PostIt! THE Binary <-> BASIC Script Creator
'
' * * *
'
' Postit! v6.0 by Rich Geldreich 1992
'
' Decoder further optimizied by Jim Giordano
'
' User Interface and Graphical embellishments by
' Mark H Butler & Quinn Tyler Jackson
'
' Ability to post and wrap plain code - as text!
' Based on MsgSplit by Scott Wunsch and Victor Yiu.
'
' And now, with compression and a new script format
' to reduce the echo bandwidth required to post your
' file, from Victor Yiu!
'
'
'Purpose:
' To enable the posting of compressed listings on a text only net.
' This program takes a binary input file and converts it to a series
' of small, postable files which other people can capture and run to
' get the original binary file.
'
'Instructions:
' Just follow the prompts. You give the input & output filenames,
' the page length and the number of lines you want reserved for your
' stuff and it does the rest. If nothing is inputted for a prompt, a
' default value will be used for it instead.
'
'
'Additions by Victor Yiu:
'
' (26 March 1993)
' NEW! Addition of the new high efficiency script format, saving
' 800 bytes over the old format! Still supports the old self-
' extracting model for compatibility. New format allows you to
' run the cut script from the echo without editing! Just paste
' all the pages together and run it through PostIt!.
' Now, all line lengths will remain constant, even with compression.
' It results in less unnecessary carriage returns and `G"' lines!
' After this update, I don't see too many improvements ahead -- it's so
' jam packed with features! 😉
' Some unnecessary & ancient comments are removed for space efficiency
' The source is also modified so that most lines are less than
'
' (16 March 1993)
' Victor Yiu nominated & appointed the keeper of PostIt! by Zack Jones.
'
' (9 March 1993)
' Version 5.1 speeds the binary decoder up and cleans the PostIt!
' source code enormously. Decompression routine rewritten.
' Message splitter's tab stop expansion is now user modifiable.
'
' (28 February 1993)
' Now, save an average of 10% on posting object files! This version
' includes compression of duplicate characters. Also fixes several
' bugs and quirks (visual & operational), and adds a disk buffer for
' increased conversion speed. The text wrapping problem with
' quotes has also been totally elimintated; now, the comments
' starting later in the line extending past the wrap will not be
' messed up during splitting, as is was before. Twirler was
' optimized/fixed (MsgSplit). Decoder was optimized more, but more
' code had to be added on to handle compression.
'
'Additions by Scott Wunsch:
' (13 February 1993)
' PostIt! is no longer just for binary files! It can be used to post
' BASIC code, and will do so in text format. Code will be word-
' wrapped appropriately, and underscores inserted to allow QB/PDS to
' put it back together again for you. Unlike past code-wrapping
' programs, PostIt! can even handle quoted strings properly.
'
'Additions by Mark Butler:
' (8-30-1992)
' Postit! output filename now defaults to the input filename if none
' is given. If the input filename is 8 characters in length the
' default output filename will be truncated to the first 7 characters
' of the input filename. The default output extension is now "BAS"
'>>> Continued on page 2
--- Blue Wave/RA v2.12 [NR]
* Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 | (1:106/30.0)
Area: QuickBasic
Msg: #7789
Date: 04-02-93 22:58 (Public)
From: VICTOR YIU
To: ALL
Subject: PostIt! 6.0 2/16
'>>> Start of page 2.
' instead of nothing. I also added a little bit of text mode "screen
' magic" to further augment Quinn T. Jackson's copyright screen and
' warning screen additions. Fixed bug from version 2.8 that caused
' succeeding output files after the first one to overwrite the same
' filename due to the filename number suffix not incrementing. I also
' caused the program to skip the opening screens if an input filename
' is entered from the command line when the program is run. (I didn't
' think folks wanted to see those screens *every* time they wanted to
' use PostIt! Sometimes ya just want to get on with it right?)
' (9-1-1992)
' Hardcoded a CHR$(32) (a space character) to the end of each full
' length G-sub data line in the attempt to thwart line truncation in
' transit on the Net. Just a theory that I hope is correct! -> MHB
'
'Additions and Modifications by Quinn Tyler Jackson (August 22, 1992):
'
' Postit! now prints a warning screen, warning users of possible
' abuse of binary-to-text posts. Also, instead of the old '80% DONE'
' meter, this version uses a graphical bar that looks like this:
'
' (One block=2% completion.)
'
' I have also added a nice starting screen, giving Rich credit where
' it is due! Bells and whistles, boys!
'
'
'Note to QBasic users:
' The COMMAND$ function is utilized in this version so if you are
' using QBasic you should delete the lines marked "**** Delete this
' line for QBasic use ******". All such lines *MUST* be deleted or
' REMmed out for this version to work with QBasic.
'
'Note: The decoder outputted with the encoded data has been
' "compressed" in order to squeeze it into 8 lines. Each line of the
' decoder is less that 72 characters, so don't worry if it looks like
' some lines are too long when you load it into QB. When QB expands
' the decoder to make it look "nicer," some lines will look like
' they're too long to put on an echo, even though they aren't. What
' I'm trying to say is: Only post the files outputted by this
' program, don't load them into QB and resave them.
'
'Tech stuff:
' The output files created by this program should be "echo safe".
' The following 64 characters are used to encode the binary file:
'
' abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789()
'
' The script file is checked at runtime to see if all of the encoded
' data is present. Also, a simple checksum is used to inform the
' user if the script file was screwed or not. (The file created is
' not deleted if this occurs, however. If only a few characters are
' garbled, then some of the output file may be still extractable.
' But if the 6-bit output stream falls out of sync, then there's a
' very good chance that the rest of the archive is completly
' unusable.)
'
' If anybody has any suggestions, or finds any bugs in this program,
' then please drop me a message and tell me about it! -Rich Geldreich
'********************************************************************
DEFINT A-Z
CONST True = -1, False = NOT True
CONST frontpage = 0, backpage = 1 '<-- for popping the warning
' screen in and out -> MHB
DECLARE SUB CopyrightScreen ()
DECLARE SUB Delay (Secs!)
DECLARE SUB DrawBox (Uprow, Ltcol, Lorow, Rtcol, Solid)
DECLARE SUB ExtractFile ()
DECLARE SUB Initialize ()
DECLARE SUB GetInformation ()
DECLARE SUB JustDoIt ()
DECLARE SUB Linein (LineColor%)
DECLARE SUB Lineout (LineColor%)
DECLARE SUB MsgSplit (SourceFile$, RealSource$, DestFile$,_
DestExten$, PageLength, LinesOut, LineLength) 'SAW
DECLARE SUB PrepareFile ()
DECLARE SUB PrintDecoder ()
DECLARE SUB PrintLine (A$)
DECLARE SUB PutByte (A)
DECLARE SUB PutBytes (A)
'>>> Continued on page 3
--- Blue Wave/RA v2.12 [NR]
* Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 | (1:106/30.0)
Area: QuickBasic
Msg: #7790
Date: 04-02-93 22:59 (Public)
From: VICTOR YIU
To: ALL
Subject: PostIt! 6.0 3/16
'>>> Start of page 3.
DECLARE SUB Shadow (Uprow, Ltcol, Lorow, Rtcol)
DECLARE SUB ShortCopyright ()
DECLARE SUB Twirl ()
DECLARE SUB WarningScreen ()
DECLARE FUNCTION Analyze (Filename$)
DECLARE FUNCTION CheckForFile& ()
DECLARE FUNCTION Compress$ (A$)
DECLARE FUNCTION GetInput$ (Prompt$, MaxLen%)
DECLARE FUNCTION Num2Str$ (A)
DECLARE FUNCTION ParseFileName$ ()
DIM SHARED Lines$(1 TO 24), Shift(5), Proplr$ ' global vars.
DIM SHARED LinesOut, PageLength, CurrentPage, FileLength
DIM SHARED LineLength, BytesOut, TotalLinesOut, NewFileFlag
DIM SHARED SourceFile$, DestFile$, DestExten$, RealSource$, ToDo$
DIM SHARED Row, Col, CheckSum, CurrentByte, CurrentBit, Char
DIM SHARED Work$, ComprChar$, Qt$, Prefix$, TabStops
DIM SHARED WhatFmt$, SmallScript
Initialize
Good$ = "abcdefghijklmnopqrstuvwxyz"
Good$ = Good$ + UCASE$(Good$) + "0123456789#$"
LineLength = 65 ' please don't change this for the
' sake of safety
GetInformation
IF ToDo$ = "E" THEN ExtractFile
IF WhatFmt$ = "N" THEN 'Launch code wrapper if wanted
MsgSplit SourceFile$, RealSource$, DestFile$,_
DestExten$, PageLength, LinesOut, LineLength
END IF
T! = TIMER ' start timer
PrepareFile ' open file, print header, etc.
JustDoIt ' do the binary stuff
PrintDecoder ' print decoder, close file
T! = TIMER - T! ' stop timer
LOCATE Row, Col
PRINT " "
PRINT TotalLinesOut; "lines in"; CurrentPage;
PRINT "file(s) written."
PRINT USING "Elapsed time: ##.# secs."; T!
END
FUNCTION Analyze (Filename$)
OPEN Filename$ FOR BINARY AS #5
Tmp$ = INPUT$(20, #5)
FOR A = 1 TO 20
Ch$ = MID$(Tmp$, A, 1)
IF Ch$ < " " THEN Analyze = True: EXIT FOR
IF Ch$ > "~" THEN HiASCII = HiASCII + 1
NEXT
IF HiASCII > 12 THEN Analyze = True
CLOSE #5
END FUNCTION
FUNCTION CheckForFile&
OPEN SourceFile$ FOR BINARY AS #1
A& = LOF(1)
IF A& = 0 THEN
CLOSE
KILL SourceFile$
PRINT " File not found."
END IF
CheckForFile& = A&
END FUNCTION
SUB CopyrightScreen
'>>> Continued on page 4
--- Blue Wave/RA v2.12 [NR]
* Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 | (1:106/30.0)
Area: QuickBasic
Msg: #7791
Date: 04-02-93 22:59 (Public)
From: VICTOR YIU
To: ALL
Subject: PostIt! 6.0 4/16
'>>> Start of page 4.
Linein 1
COLOR 15, 1
LOCATE 4, 1
PRINT " "+_
" "
PRINT " "+_
" "
PRINT " "+_
" "
PRINT " "+_
" "
PRINT " "+_
" "
PRINT " "+_
" "
PRINT " "+_
" "
PRINT " "+_
" v6.0"
COLOR 14, 1
PRINT " "+_
" "
PRINT " "+_
" "
PRINT " "+_
" "
PRINT " "+_
" "
PRINT " "+_
" "
PRINT " "+_
" "
COLOR 13, 1
PRINT SPC(22); "Decoder revisions by Jim Giordano."
PRINT SPC(19); "Graphical & user interface revisions by"
PRINT SPC(20); "Mark H Butler and Quinn Tyler Jackson."
PRINT SPC(21); "Text code wrapping by Scott Wunsch."
PRINT SPC(16); "Compression & new script format by Victor Yiu."
COLOR 15
Solid = False
DrawBox 1, 1, 25, 80, Solid
COLOR 7
Delay 5
WarningScreen
Delay 1
Lineout 1
COLOR 15, 0
CLS
PRINT "PostIt! Version 6.0"
END SUB
SUB Delay (Secs!)
Begin! = TIMER
DO
LOOP UNTIL ((TIMER - Begin!) >= Secs!) OR (Begin! > TIMER)
END SUB
SUB DrawBox (Uprow, Ltcol, Lorow, Rtcol, Solid)
wide = Rtcol - Ltcol - 1
LOCATE Uprow, Ltcol
PRINT CHR$(201); STRING$(wide, CHR$(205)); CHR$(187);
FOR I = Uprow + 1 TO Lorow - 1
LOCATE I, Ltcol
PRINT CHR$(186);
IF Solid THEN PRINT SPACE$(wide);
LOCATE I, Rtcol
PRINT CHR$(186);
NEXT
LOCATE Lorow, Ltcol
PRINT CHR$(200); STRING$(wide, CHR$(205)); CHR$(188);
END SUB
'>>> Continued on page 5
--- Blue Wave/RA v2.12 [NR]
* Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 | (1:106/30.0)
Area: QuickBasic
Msg: #7792
Date: 04-02-93 23:00 (Public)
From: VICTOR YIU
To: ALL
Subject: PostIt! 6.0 5/16
'>>> Start of page 5.
SUB ExtractFile
SHARED Good$
PRINT "Examining "; SourceFile$; "..."
COLOR 7
CLOSE
OPEN SourceFile$ FOR INPUT AS #1 LEN = 4096 ' open file
DO
IF NOT EOF(1) THEN
LINE INPUT #1, A$
ELSE
GOTO ErrorReading
END IF
LOOP WHILE LEFT$(A$, 13) <> "~PostIt! 6.0~" 'search for header
NewFile$ = MID$(A$, 14)
NxtTilde = INSTR(NewFile$, "~")
IF NxtTilde = 0 THEN GOTO ErrorReading
NewFile$ = LEFT$(NewFile$, NxtTilde - 1) ' get filename
OPEN NewFile$ FOR BINARY AS #2 ' open...
PRINT "Loading "; SourceFile$; "..."
DO
IF EOF(1) THEN GOTO ErrorReading ' end of file already?
LINE INPUT #1, A$ ' get a line
SELECT CASE LEFT$(A$, 1)
CASE "~"
IF NOT QuoteOn THEN
EXIT DO ' end; quit loop
END IF
CASE "a" TO "z", "A" TO "Z", "#", "$", "(" TO "9"
IF NOT QuoteOn THEN
FOR Q = 2 TO 9 ' expand the string
Look$ = MID$(ComprChar$, Q - 1, 1)
S = 1
DO
S = INSTR(S, A$, Look$)
IF S THEN
A$ = LEFT$(A$, S - 1) + STRING$(Q,_
97) + MID$(A$, S + 1)
END IF
LOOP WHILE S
NEXT
Dat$ = Dat$ + RTRIM$(A$) ' nope, collect dust
END IF
CASE "'"
QuoteOn = NOT QuoteOn
CASE ELSE ' just comments or junk
END SELECT
LOOP
Siz = VAL(MID$(A$, 2)) ' extract size of file
NxtNum = INSTR(2, A$, "~") ' look 4 next ~ occurence
IF NxtNum = 0 THEN GOTO ErrorReading ' none? Error!
CheckVal = VAL(MID$(A$, NxtNum + 1)) ' get checkval
PRINT "Decoding "; SourceFile$; "..."
PRINT STRING$(50, 178); ' print initial bar
LOCATE , , 0
DIM P(6)
FOR P = 0 TO 6: P(P) = 2 ^ P: NEXT
n = Siz
k = 255
V! = 50 / n
FOR A = 1 TO n ' decode file
IF L = 0 THEN
GOSUB G
L = 6
LOCATE , 1
'>>> Continued on page 6
--- Blue Wave/RA v2.12 [NR]
* Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 | (1:106/30.0)
Area: QuickBasic
Msg: #7793
Date: 04-02-93 23:01 (Public)
From: VICTOR YIU
To: ALL
Subject: PostIt! 6.0 6/16
'>>> Start of page 6.
PRINT STRING$(V! * A, 177);
END IF
W = T \ P(6 - L)
GOSUB G
W = W OR T * P(L)
L = L - 2
B$ = CHR$(W AND k)
PUT 2, , B$
NEXT
IF (C = CheckVal) AND (LOF(2) = Siz) THEN
PRINT NewFile$; " successfully extracted."
ELSE
PRINT "Bad checksum or incomplete script!"
END IF
CLOSE
END
G:
I = I + 1: T = INSTR(Good$, MID$(Dat$, I, 1)) - 1
C = (C + T) * 2: C = C \ 256 + (C AND 255)
RETURN
ErrorReading:
CLOSE
PRINT "Error reading script."
END
END SUB
SUB GetInformation
SourceFile$ = LTRIM$(RTRIM$(COMMAND$))
'**** Remark the above line for QBasic ***
IF LEN(SourceFile$) <> 0 THEN
ShortCopyright
A& = CheckForFile
IF A& = 0 THEN END
ELSE
CopyrightScreen
DO
SourceFile$ = UCASE$(GetInput$("Input filename"+_
" (text/binary)? ", -1))
IF LEN(SourceFile$) THEN
A& = CheckForFile
ELSE
END
END IF
LOOP UNTIL A&
END IF
A = 8192 ' PostIt! 6.0 script?
IF LOF(1) < A THEN A = LOF(1)
A$ = INPUT$(A, 1)
IF INSTR(A$, "~PostIt! 6.0~") THEN
A$ = ""
ToDo$ = "E"
EXIT SUB
ELSE
A$ = ""
ToDo$ = "M"
END IF
DefaultFile$ = ParseFileName$
Recommend = Analyze(SourceFile$)
COLOR 15
PRINT "I recommend using the ";
COLOR 13
IF Recommend THEN
PRINT "binary script (Y)";
R$ = "Y"
ELSE
PRINT "message wrapper (N)";
R$ = "N"
'>>> Continued on page 7
--- Blue Wave/RA v2.12 [NR]
* Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 | (1:106/30.0)
Area: QuickBasic
Msg: #7794
Date: 04-02-93 23:01 (Public)
From: VICTOR YIU
To: ALL
Subject: PostIt! 6.0 7/16
'>>> Start of page 7.
END IF
COLOR 15
PRINT " on this file."
WhatFmt$ = UCASE$(GetInput$("Which format [" + R$ + "]? ", 1))
IF (WhatFmt$ <> "Y") AND (WhatFmt$ <> "N") THEN WhatFmt$ = R$
LOCATE CSRLIN - 1, 19
PRINT WhatFmt$
'max file size is actually about 24576 bytes
'(because 24576*1.33333 is >32767)
IF WhatFmt$ = "Y" THEN
IF A& > 24550 THEN
COLOR 7: PRINT
PRINT "Binary file exceeds maximum size of 24K!"
END
ELSE
FileLength = A&
END IF
A$ = UCASE$(GetInput$("Use condensed script format [Y]? ", 1))
IF A$ <> "N" THEN
SmallScript = True
A$ = "Y"
END IF
LOCATE CSRLIN - 1, 34
PRINT A$
ELSE
A$ = "Expand tabs to how many spaces [4]? "
TabStops = VAL(GetInput$(A$, 1))
IF TabStops <= 0 THEN
TabStops = 4
LOCATE CSRLIN - 1, 36
PRINT TabStops
END IF
END IF
A$ = "What is the destination prefix (max. 6 chars.) ["
DestFile$ = UCASE$(GetInput$(A$ + DefaultFile$ + "]? ", 6))
IF LEN(DestFile$) = 0 THEN
DestFile$ = DefaultFile$
LOCATE CSRLIN - 1, 52 + LEN(DefaultFile$)
PRINT DefaultFile$
END IF
IF SmallScript THEN
DExt$ = ".PI6"
ELSE
DExt$ = ".BAS"
END IF
DestExten$ = UCASE$(GetInput$("What is the destination extension"+_
" (max. 3 chars.) [" + DExt$ + "]? ", 3))
IF LEN(DestExten$) = 0 THEN
DestExten$ = DExt$
LOCATE CSRLIN - 1, 59
PRINT DExt$
ELSEIF INSTR(DestExten$, ".") = 0 THEN
DestExten$ = "." + DestExten$
END IF
PageLength = VAL(GetInput$("Page length [85]? ", 3))
IF PageLength < 5 THEN
PageLength = 85
LOCATE CSRLIN - 1, 19
PRINT "85 "
END IF
LinesOut$ = GetInput$("Lines to reserve on first message [5]? ",_
2)
LinesOut = VAL(LinesOut$)
IF (LEN(LinesOut$) = 0) OR (LinesOut < 0) THEN
LinesOut = 5
LOCATE CSRLIN - 1, 40
PRINT "5 "
END IF
LOCATE , , 0
'>>> Continued on page 8
--- Blue Wave/RA v2.12 [NR]
* Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 | (1:106/30.0)
Area: QuickBasic
Msg: #7795
Date: 04-02-93 23:01 (Public)
From: VICTOR YIU
To: ALL
Subject: PostIt! 6.0 8/16
'>>> Start of page 8.
END SUB
' Yep, the same one I released, except stripped of comments and
' some features. -VY
FUNCTION GetInput$ (Prompt$, MaxLen)
Null$ = CHR$(0): SpaceBar$ = " "
Insrt$ = Null$ + "R": Delete$ = Null$ + "S"
LeftK$ = Null$ + "K": RightK$ = Null$ + "M"
Home$ = Null$ + "G": End$ = Null$ + "O"
IF MaxLen < 1 THEN MaxLen = 80 - LEN(Prompt$) - POS(0)
COLOR 14
PRINT Prompt$;
StartX = POS(0): Cursor = 1
Insrt = True
COLOR 7
DO
IF Updt THEN
LOCATE , StartX, 0
PRINT OutS$; SpaceBar$;
Updt = False
END IF
LOCATE , Cursor + StartX - 1, 1, (NOT Insrt) * -7, 16
DO: I$ = INKEY$
LOOP UNTIL LEN(I$)
IF LEN(I$) = 1 THEN
Updt = True
SELECT CASE ASC(I$)
CASE IS >= 32
IF (NOT Insrt) OR (LEN(OutS$) < MaxLen) THEN
IF Cursor > 0 THEN
OutS$ = LEFT$(OutS$, Cursor - 1) + I$ +_
MID$(OutS$, Cursor - (NOT Insrt))
ELSE
OutS$ = I$
END IF
Cursor = Cursor + 1
ELSE
Updt = False
END IF
CASE 8
IF LEN(OutS$) AND (Cursor > 1) THEN
OutS$ = LEFT$(OutS$, Cursor - 2) + MID$(OutS$,_
Cursor)
Cursor = Cursor - 1
ELSE
Updt = False
END IF
CASE 13
EXIT DO
CASE 27
IF LEN(OutS$) > 0 THEN
LOCATE , StartX, 0
PRINT SPACE$(LEN(OutS$) + 1);
OutS$ = ""
Cursor = 1
Updt = False
ELSE
EXIT DO
END IF
END SELECT
ELSE ' extended ASCII code
SELECT CASE I$
CASE LeftK$
IF Cursor > 1 THEN Cursor = Cursor - 1
CASE RightK$
IF Cursor < LEN(OutS$) + 1 THEN Cursor = Cursor + 1
CASE Delete$
IF LEN(OutS$) > 0 AND (Cursor < LEN(OutS$)) THEN
OutS$ = LEFT$(OutS$, Cursor - 1) + MID$(OutS$,_
Cursor + 1)
Updt = True
END IF
CASE Home$
'>>> Continued on page 9
--- Blue Wave/RA v2.12 [NR]
* Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 | (1:106/30.0)
Area: QuickBasic
Msg: #7796
Date: 04-02-93 23:01 (Public)
From: VICTOR YIU
To: ALL
Subject: PostIt! 6.0 9/16
'>>> Start of page 9.
Cursor = 1
CASE End$
Cursor = LEN(OutS$) + 1
CASE Insrt$
Insrt = NOT Insrt
END SELECT
END IF
LOOP
LOCATE , , 1, 0, 16
GetInput$ = LTRIM$(RTRIM$(OutS$))
END FUNCTION
SUB Initialize
FOR DefShift = 0 TO 5
Shift(DefShift) = 2 ^ DefShift
NEXT
ComprChar$ = "()*+,-./"
Proplr$ = CHR$(179) + "/-\"
Qt$ = CHR$(34)
A$ = " "
CurrentPage = 1
Work$ = Prefix$
CurrentBit = 0
Char = 0
LOCATE , , 0
END SUB
SUB JustDoIt
SEEK #1, 1
LinesOut = LinesOut + 2 ' compensate for header
TotalLinesOut = 3
DO
CurrentByte = SEEK(1)
L& = FileLength - CurrentByte + 1 ' what's left?
SELECT CASE L&
CASE IS > 4096
Block$ = SPACE$(4096)
CASE IS <= 0
EXIT DO
CASE ELSE
Block$ = SPACE$(L&) ' rest of it
END SELECT
GET #1, , Block$
FOR Pointr = 1 TO LEN(Block$)
IF (Pointr AND 15) = 0 THEN
CurrentByte = CurrentByte + 16
Twirl
END IF
PutBytes ASC(MID$(Block$, Pointr, 1))
NEXT
LOOP
'flush the input buffer if it contains any bits
IF CurrentBit > 0 THEN CurrentBit = -1: PutByte Char
IF LEN(Work$) > 2 THEN
IF SmallScript THEN
PrintLine Work$
ELSE
'flush the line buffer if it contains any characters
'Add a CHR$(34) to it just in case a mail reader decides
'to add some extra spaces to the end...
PrintLine Work$ + CHR$(34)
END IF
END IF
END SUB
SUB Linein (LineColor) '*** By Mark H Butler
'>>> Continued on page 10
--- Blue Wave/RA v2.12 [NR]
* Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 | (1:106/30.0)
Area: QuickBasic
Msg: #7797
Date: 04-02-93 23:05 (Public)
From: VICTOR YIU
To: ALL
Subject: PostIt! 6.0 10/16
'>>> Start of page 10.
Lines$(2) = SPACE$(39) + "" + SPACE$(2)
Lines$(1) = SPACE$(39) + "." + SPACE$(2)
Lines$(23) = STRING$(80, "")
Sp = 39
Ln = 0
FOR I = 2 TO 21
Lines$(I) = SPACE$(Sp) + STRING$(Ln, "") + SPACE$(2)
Sp = Sp - 2
Ln = Ln + 4
NEXT
COLOR LineColor, 0
FOR I = 1 TO 23
LOCATE 13, 1
PRINT Lines$(I);
Delay .03
NEXT
COLOR 15, LineColor
X = 12
y = 13
FOR I = 1 TO 13
LOCATE y, 1
PRINT STRING$(80, " ");
LOCATE X, 1
PRINT STRING$(80, " ");
DrawBox X, 1, y, 80, -1
Delay .03
IF X > 1 THEN X = X - 1
y = y + 1
NEXT
END SUB
SUB Lineout (LineColor) '*** By Mark H Butler
Lines$(1) = STRING$(80, "")
Sp = 2
Ln = 76
FOR I = 2 TO 21
Lines$(I) = SPACE$(Sp) + STRING$(Ln, "") + SPACE$(2)
Sp = Sp + 2
Ln = Ln - 4
NEXT
Lines$(22) = SPACE$(39) + "" + SPACE$(2)
Lines$(23) = SPACE$(39) + "." + SPACE$(2)
COLOR 0, 0
X = 1
y = 25
FOR I = 1 TO 12
LOCATE y, 1
PRINT STRING$(80, CHR$(32));
LOCATE X, 1
PRINT STRING$(80, CHR$(32));
Delay .03
X = X + 1
y = y - 1
NEXT
COLOR LineColor, 0
FOR I = 1 TO 23
LOCATE 13, 1: PRINT Lines$(I);
Delay .03
NEXT
COLOR 7
CLS
END SUB
SUB MsgSplit (Filename$, TheName$, OutN$, Ext$, LPP, Reserve,_
LineLength)
CLOSE
OPEN Filename$ FOR INPUT AS #1
Tab$ = CHR$(9): TabSub$ = SPACE$(TabStops)
LinesOut = Reserve + 1
FileOutNum = 1: OnMsgNumber = 1
LPP = LPP - 4 ' lines per page
Base$ = LEFT$(OutN$, 6)
'>>> Continued on page 11
--- Blue Wave/RA v2.12 [NR]
* Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 | (1:106/30.0)
Area: QuickBasic
Msg: #7798
Date: 04-02-93 23:01 (Public)
From: VICTOR YIU
To: ALL
Subject: PostIt! 6.0 11/16
'>>> Start of page 11.
Ext$ = RIGHT$(Ext$, 3)
COLOR 7, 0
DO
OutN$ = Base$ + Num2Str$(FileOutNum)
IF Row THEN LOCATE Row, Col: PRINT " "
PRINT "Now writing: " + OutN$ + "." + Ext$ + " ";
Row = CSRLIN: Col = POS(0)
OPEN OutN$ + "." + Ext$ FOR OUTPUT AS #2
IF OnMsgNumber > 1 THEN
PRINT #2, "'>>> Start of page"; STR$(OnMsgNumber); "."
PRINT #2,
ELSE
GOSUB Snip
PRINT #2, "'This file created by PostIt! v6.0."
PRINT #2, "'>>> Start of page"; STR$(OnMsgNumber); "."
PRINT #2,
END IF
TooLong = False
FOR Trans = LinesOut TO LPP
Percent = (100& * SEEK(1)) \ LOF(1)
Twirler$ = MID$("|/\", (Percent AND 3) + 1, 1)
LOCATE Row, Col: PRINT USING "! ###%"; Twirler$; Percent;
IF NOT EOF(1) THEN
IF Trans = LinesOut THEN
DO: LINE INPUT #1, Buf$
LOOP WHILE LEN(Buf$) = 0
ELSE
LINE INPUT #1, Buf$
Buf$ = RTRIM$(Buf$)
END IF
Tb = INSTR(Buf$, Tab$) 'remove those dang chr$(8)s
' (tabs)
IF Tb THEN
DO
Buf$ = LEFT$(Buf$, Tb - 1) + TabSub$ +_
MID$(Buf$, Tb + 1)
Tb = INSTR(Tb, Buf$, Tab$)
LOOP WHILE Tb
END IF
Wrapping:
IF (LEN(Buf$) > LineLength) AND (LEFT$(Buf$, 1) <>_
"'") THEN
Trans = Trans + 1
CommentOn = False
FOR A = LineLength TO 40 STEP -1
IF MID$(Buf$, A, 1) = " " THEN
WrapPoint = A
EXIT FOR
END IF
NEXT
IF WrapPoint = 0 THEN WrapPoint = LineLength
QuotesOn = False
FOR A = 1 TO WrapPoint
Temp$ = MID$(Buf$, A, 1)
IF Temp$ = Qt$ THEN
QuotesOn = NOT QuotesOn
ELSEIF NOT QuotesOn THEN
IF (Temp$ = "'") OR (UCASE$(MID$(Buf$,_
A, 4)) = "REM ") THEN
CommentOn = True
EXIT FOR
END IF
END IF
NEXT
Long$ = Buf$
IF CommentOn THEN
Buf$ = LEFT$(Buf$, WrapPoint - 1)
ELSE
IF QuotesOn THEN
'>>> Continued on page 12
--- Blue Wave/RA v2.12 [NR]
* Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 | (1:106/30.0)
Area: QuickBasic
Msg: #7799
Date: 04-02-93 23:02 (Public)
From: VICTOR YIU
To: ALL
Subject: PostIt! 6.0 12/16
'>>> Start of page 12.
Buf$ = LEFT$(Buf$, WrapPoint - 1) + Qt$_
+ "+_"
ELSE
Buf$ = LEFT$(Buf$, WrapPoint - 1) + "_"
END IF
END IF
IF NOT ((Trans = LPP) AND LEN(Buf$) = 0) THEN
PRINT #2, Buf$
END IF
Buf$ = MID$(Long$, WrapPoint)
IF CommentOn THEN Buf$ = "'" + Buf$
IF QuotesOn THEN Buf$ = Qt$ + Buf$
GOTO Wrapping
END IF
IF NOT ((Trans = LPP) AND LEN(Buf$) = 0) THEN
PRINT #2, Buf$
END IF
END IF
NEXT
IF NOT EOF(1) THEN
PRINT #2,
PRINT #2, "'>>> Continued on page"; OnMsgNumber + 1
ELSE
PRINT #2,
GOSUB Snip
PRINT #2,
END IF
CLOSE #2
IF NOT EOF(1) THEN
OnMsgNumber = OnMsgNumber + 1
FileOutNum = FileOutNum + 1
LinesOut = 1
END IF
LOOP UNTIL EOF(1)
CLOSE
LOCATE Row, Col
PRINT " "
PRINT "Complete!"
END
Snip:
PRINT #2, "'________O_/________________________| SNIP"+_
" |______________________\_O_______"
PRINT #2, "' O \ | HERE | "+_
" / O"
RETURN
END SUB
'Converts a number to a string lacking a leading space.
FUNCTION Num2Str$ (A)
Num2Str$ = MID$(STR$(A), 2)
END FUNCTION
FUNCTION ParseFileName$
'Get the source filename without the drive & path
FOR S = LEN(SourceFile$) TO 1 STEP -1
IF INSTR("\:", MID$(SourceFile$, S, 1)) THEN EXIT FOR
NEXT
RealSource$ = MID$(SourceFile$, S + 1)
'Get destination prefix & extenstion.
Ext = INSTR(RealSource$, ".")
IF Ext <> 0 THEN
DestTemp$ = LEFT$(RealSource$, Ext - 1)
ELSE
DestTemp$ = RealSource$
END IF
ParseFileName = UCASE$(LEFT$(DestTemp$, 7))
'>>> Continued on page 13
--- Blue Wave/RA v2.12 [NR]
* Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 | (1:106/30.0)
Area: QuickBasic
Msg: #7800
Date: 04-02-93 23:02 (Public)
From: VICTOR YIU
To: ALL
Subject: PostIt! 6.0 13/16
'>>> Start of page 13.
END FUNCTION
SUB PrepareFile
F$ = UCASE$(DestFile$ + Num2Str$(CurrentPage) + DestExten$)
COLOR 7: PRINT
PRINT "Now writing: "; F$; " ";
Row = CSRLIN: Col = POS(0)
'use 8k output buffer for a little speed
OPEN F$ FOR OUTPUT AS #2 LEN = 8192
IF SmallScript THEN
PRINT #2, "~PostIt! 6.0~"; RealSource$; "~"; "Script starts"
Prefix$ = ""
ELSE
'Print the first 3 lines of the decoder.
' Shaved several bytes... -VY
PRINT #2, "CLS:?STRING$(50,178):DEFINT A-Z 'Created by PostIt!"+_
" 6.0"
PRINT #2, "FOR A=0 TO 6:P(A)=2^A:NEXT:OPEN "; Qt$; "B"; Qt$;_
",1,"; Qt$; RealSource$
PRINT #2, "T$="; Qt$; "abcdefghijklmnopqrstuvwxyz"; Qt$;_
":T$=T$+UCASE$(T$)+"; Qt$; "0123456789#$"
Prefix$ = "G" + Qt$
Work$ = Prefix$
END IF
END SUB
SUB PrintDecoder
IF SmallScript THEN
PrintLine "~" + Num2Str$(FileLength) + "~" +_
Num2Str$(CheckSum) + "~" + "End"
ELSE
'Main decoder originally reduced from 8 lines to 6 lines by Jim Giordano
'Thanks Jim!
'Slight modifications to the 6 line decoder by Rich Geldreich
'More modifications to the decoder to implement compressed code,
' increased to ~7.2 lines by Victor Yiu
'Modified again to increase speed, but at the slight expense of
' size (3/9/93) -VY
PrintLine "N=" + Num2Str$(FileLength) + ":K=255:IF LEN(C$)<>" +_
Num2Str$(BytesOut) + " THEN ?" + Qt$ + "Bad script!" + Qt$ +_
":END"
PrintLine "FOR A=1 TO N:LOCATE 1:?STRING$(50/N*A,177):IF L=0"+_
" THEN GOSUB G:L=6"
PrintLine "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"
PrintLine "?:IF C=" + Num2Str$(CheckSum) + " THEN ?" + Qt$ +_
"Ok" + Qt$ + ":END ELSE ?" + Qt$ + "Bad checksum!" + Qt$ +_
":END"
PrintLine "G:I=I+1:T=INSTR(T$,MID$(C$,I,1))-1:C=(C+T)*2:C=C"+_
"\256+(C AND 255):RETURN"
PrintLine "SUB G(A$):SHARED C$:FOR Q=2 TO"+_
" 9:DO:S=INSTR(A$,CHR$(Q+38))"
PrintLine "IF S THEN A$=LEFT$(A$,S-1)+STRING$(Q,97)+MID$(A$,S+1)"
PrintLine "LOOP WHILE S:NEXT:C$=C$+A$:END SUB"
END IF
CLOSE
END SUB
'Outputs one line to the output file, and opens another output file
'if the page length is exceeded.
SUB PrintLine (A$)
IF NewFileFlag THEN
LOCATE Row, Col
PRINT " "
NewFileFlag = False
CurrentPage = CurrentPage + 1 '<-- switched these 2 lines
'>>> Continued on page 14
--- Blue Wave/RA v2.12 [NR]
* Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 | (1:106/30.0)
Area: QuickBasic
Msg: #7801
Date: 04-02-93 23:02 (Public)
From: VICTOR YIU
To: ALL
Subject: PostIt! 6.0 14/16
'>>> Start of page 14.
B$ = Num2Str$(CurrentPage) '--> MHB
PRINT #2, "'>> Continued on pg. "; B$
CLOSE #2
F$ = UCASE$(DestFile$ + B$ + DestExten$)
PRINT "Now writing: "; F$; " ";
Row = CSRLIN: Col = POS(0)
OPEN F$ FOR OUTPUT AS #2 LEN = 8192
PRINT #2, "'>> Start: pg. "; B$
LinesOut = 1
END IF
TotalLinesOut = TotalLinesOut + 1
PRINT #2, A$
' Originally, Mark hardcoded a space after each line, but I
' had to remove it to make compression work properly... -VY
LinesOut = LinesOut + 1
IF LinesOut >= PageLength THEN NewFileFlag = True
END SUB
'Adds a character to the output string.
SUB PutByte (A)
SHARED Good$
STATIC ALength
IF CurrentBit < 0 THEN LastOne = True
BytesOut = BytesOut + 1
'calculate a checksum on the encoded data stream
CheckSum = (CheckSum + A) * 2
CheckSum = CheckSum \ 256 + (CheckSum AND 255)
IF (A = 0) AND (LastOne = False) THEN
IF ALength = 9 THEN
ALength = 1
Work$ = Work$ + "/"
ELSE
ALength = ALength + 1
END IF
ELSE
SELECT CASE ALength
CASE 0
'translate the output character into something safe
Work$ = Work$ + MID$(Good$, A + 1, 1)
CASE 1
Work$ = Work$ + "a" + MID$(Good$, A + 1, 1)
ALength = 0
CASE ELSE
Work$ = Work$ + MID$(ComprChar$, ALength - 1, 1) +_
MID$(Good$, A + 1, 1)
ALength = 0
END SELECT
END IF
IF LEN(Work$) >= LineLength THEN
IF LEN(Work$) = LineLength THEN
PrintLine Work$
Work$ = Prefix$
ELSE
PrintLine LEFT$(Work$, LineLength)
Work$ = Prefix$ + MID$(Work$, LineLength + 1)
END IF
END IF
END SUB
SUB PutBytes (A)
'shift the 8 bit character into the work buffer
Char = Char + A * Shift(CurrentBit)
'we've got 8 more bits now
CurrentBit = CurrentBit + 8
'>>> Continued on page 15
--- Blue Wave/RA v2.12 [NR]
* Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 | (1:106/30.0)
Area: QuickBasic
Msg: #7802
Date: 04-02-93 23:02 (Public)
From: VICTOR YIU
To: ALL
Subject: PostIt! 6.0 15/16
'>>> Start of page 15.
'write the 6 bit codes now
DO WHILE CurrentBit > 5 'have at least 6 bits left?
PutByte (Char AND 63) 'write out the first 6 bits
Char = Char \ 64 'shift it right 6 places
CurrentBit = CurrentBit - 6 '6 bits less now
LOOP
END SUB
SUB Shadow (Uprow, Ltcol, Lorow, Rtcol) STATIC
'*** Transparent Shadow routine for use with the
'*** "Drawbox" SUB program by Mark H Butler
DEF SEG = &H40
equip = PEEK(&H10)
IF (equip AND 48) = 48 THEN
EXIT SUB '*** no use in doing it if it's mono, right?
ELSE
DEF SEG = &HB800
END IF
'****** use the given box dimensions to POKE a ***********
'****** "shadow" on the right side and bottom edge *******
attr = 8
FOR Row = Uprow + 1 TO Lorow + 1 '***** right edge
' locations.***
FOR Col = Rtcol + 1 TO Rtcol + 2'***** make it 2 chars
' wide.***
offset = (Row - 1) * 160 + (Col - 1) * 2 + 1
POKE offset, attr
NEXT
NEXT
Row = Lorow + 1 '***** now POKE along the
' *****
FOR Col = Ltcol + 2 TO Rtcol + 2 '***** bottom edge
' ************
offset = (Row - 1) * 160 + (Col - 1) * 2 + 1
POKE offset, attr
NEXT
DEF SEG
END SUB
SUB ShortCopyright
COLOR 14, 0
CLS
PRINT " PostIt! Version 6.0"
COLOR 11
PRINT " Freeware by Rich Geldreich, 1992-1993."
PRINT " Decoder modifications by Jim Giordano."
PRINT " User interface and graphics by "
PRINT " Mark H Butler and Quinn Tyler Jackson."
PRINT " Text code wrapping by Scott Wunsch."
PRINT " Compression & new script format by Victor Yiu."
COLOR 7
END SUB
SUB Twirl STATIC
LOCATE Row, Col
PRINT MID$(Proplr$, Turn + 1, 1);
Turn = (Turn + 1) AND 3
IF Turn = 0 THEN
PRINT USING " ###%"; 100& * CurrentByte \ FileLength;
END IF
END SUB
SUB WarningScreen
' I felt this screen was appropriate, since some users have
'>>> Continued on page 16
--- Blue Wave/RA v2.12 [NR]
* Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 | (1:106/30.0)
Area: QuickBasic
Msg: #7803
Date: 04-02-93 23:04 (Public)
From: VICTOR YIU
To: ALL
Subject: PostIt! 6.0 16/16
'>>> Start of page 16.
' abused this wonderful utility! Shame....
'----
' Unfortunately Quinn old friend I think that has proved to be
' too true in some cases ...but... we *can* make it look as
' friendly as possible with a little text mode window magic `eh?
' --> MHB ;^]
PCOPY frontpage, backpage
COLOR 14, 6
DrawBox 3, 8, 22, 72, True
Shadow 3, 8, 22, 72
LOCATE 4, 11: PRINT "NOTE:"
LOCATE , 10: PRINT "Some echo participants feel that posting"+_
" binary files in text"
LOCATE , 10: PRINT "format leads to anarchy. Postit!, in all"+_
" of its versions is"
LOCATE , 10: PRINT "a powerful tool for exchanging information"+_
" over networks such"
LOCATE , 10: PRINT "as Fidonet. Before you use this software to"+_
" post anything in"
LOCATE , 10: PRINT "any network's echo areas, consider these"+_
" points:"
LOCATE , 10: PRINT "1) Only users with Microsoft's QBASIC or "+_
" QuickBASIC will be"
LOCATE , 10: PRINT " able to convert the files back into their"+_
" binary format."
LOCATE , 10: PRINT "2) Binary files that are converted to text"+_
" should be ON TOPIC"
LOCATE , 10: PRINT " in order that users of the particular"+_
" echo will benefit"
LOCATE , 10: PRINT " from the post. For example: it would not"+_
" be appropriate at"
LOCATE , 10: PRINT " all to post an executable file without"+_
" it's corresponding"
LOCATE , 10: PRINT " source code in the Fidonet QUIK_BAS echo."
LOCATE , 10: PRINT " This of course only applies to the binary"+_
" posting portion"
LOCATE , 10: PRINT " of PostIt!. The code wrapper is much less"+_
" controversial :)."
Delay 5
COLOR 11, 1
LOCATE 24, 20: PRINT "(Hit any key to continue with Postit!)";
DO UNTIL LEN(INKEY$): LOOP
PCOPY backpage, frontpage
END SUB
'________O_/________________________| SNIP |______________________\_O_______
' O \ | HERE | / O
'That should be all of PostIt! Now, just collect all 16 files, merge,
'edit to remove junk, and run!
'Any comments or suggestions are welcome! 😉
'Victor
... DESQview: Windex.
--- Blue Wave/RA v2.12 [NR]
* Origin: Hard Disc Cafe | Houston Texas | (713) 589-2690 | (1:106/30.0)
December 15, 2017
Add comments