BBS: Inland Empire Archive Date: 07-11-92 (15:50) Number: 217 From: MARK BUTLER Refer#: NONE To: BRYAN HOOVER Recvd: NO Subj: Re: Qb2bin? Conf: (2) Quik_Bas
On 07-10-92 BRYAN HOOVER wrote to MARK BUTLER...
BH> Hey Mark, I got your screen saving file - with C .obj - and it did
BH> not work. I tried it on my color monitor. Was the routine meant for
BH> mono? I just wanted to let you know in case there's some bug you're
BH> unaware of.
???huh??? Hmmm, it *should* work. I haven't had it choke on anything
yet. Let's try another test with it (see code below).
BH> Would you mind posting for those of us who are a bit new to this a
BH> brief outline of what these files (UUE11, BIN2QB, etc.) do? I have
BH> not had a lot of time to sit down and playwith them and have seen
BH> only bits and pieces of explaination.
Well, with all these different bin to data conversion algorithyms
floating around on the echo the shortest explanation of what they are
doing is rendering binary files (coms, exes, objs etc) into a form
that Fido will not object to. That is, to send binary material in a
post here on the echo the text _must_ be lo-ascii printable
characters. That is what these conversion programs are doing.
BH> PPS - did you ever run accros that color attribute formula?
Not yet.
Ok, here's a little test-code to run MovBytes with (again). The first
snippet is the QB test code. The second snippet is a recreator file
to make MovBytes.obj included just in case your copy was corrupted.
-----------------------8< CUT HERE 8<----------------------------
DEFINT A-Z
DECLARE SUB DrawBox (Uprow%, Ltcol%, Lorow%, Rtcol%)
DECLARE SUB SaveScrn (Scr())
DECLARE SUB RestScrn (Scr())
DECLARE SUB MovBytes (fromseg, fromoff, destseg, destoff, nbytes)
DIM ScrA(4000)
SCREEN 0
COLOR 7, 1
CLS
FOR i% = 1 TO 2000
PRINT CHR$(176);
NEXT
LOCATE 25, 18
PRINT "Press CTRL-C to quit or any other key to continue";
DoIt:
SLEEP
SaveScrn ScrA()
COLOR 0, 7
DrawBox 5, 15, 15, 65
LOCATE 10, 30
PRINT "Well... is it working?"
SLEEP
RestScrn ScrA()
GOTO DoIt
SUB DrawBox (Uprow%, Ltcol%, Lorow%, Rtcol%)
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); SPACE$(Wide%); CHR$(186);
NEXT i
LOCATE Lorow%, Ltcol%
PRINT CHR$(200); STRING$(Wide%, CHR$(205)); CHR$(188);
END SUB
SUB RestScrn (Scr()) STATIC
DEF SEG = &H40
equip = PEEK(&H10)
IF (equip AND 48) = 48 THEN
destseg = &HB000
ELSE
destseg = &HB800
END IF
destoff = 0
fromseg = VARSEG(Scr(0))
fromoff = VARPTR(Scr(0))
nbytes = 4000
MovBytes fromseg, fromoff, destseg, destoff, nbytes
END SUB
SUB SaveScrn (Scr()) STATIC
DEF SEG = &H40
equip = PEEK(&H10)
IF (equip AND 48) = 48 THEN
fromseg = &HB000
ELSE
fromseg = &HB800
END IF
fromoff = 0
destseg = VARSEG(Scr(0))
destoff = VARPTR(Scr(0))
nbytes = 4000
MovBytes fromseg, fromoff, destseg, destoff, nbytes
END SUB
-----------------------8< CUT HERE 8<----------------------------
Now for MovBytes.obj
-----------------------8< CUT HERE 8<----------------------------
DEFINT A-Z ' Created by BIN2QB 3.2 freeware 7/92
f$="MOVBYTES.OBJ":LSBs=3
CLS : PRINT "Creating ";f$
OPEN f$ FOR BINARY AS #1 :FSize&= 418
ON ERROR GOTO Done:LOCATE 2,1:PRINT STRING$(50,176)
DO
READ Lyne$:LynLen=LEN(Lyne$)
FOR i=1 TO LynLen
Power=((i-1)MOD 4)*6
B&=(ASC(MID$(Lyne$,i,1))-59)*2^Power:C&=C&+B&
IF i MOD 4=0 THEN
Stored&=Stored&+3:ChkSum&=ChkSum& AND C&
ChkSum&=ChkSum&+(C& XOR &H1D1E):LOCATE 2,1
PRINT STRING$(CINT(Stored&/FSize&*50),219):LOCATE 2,53
PRINT USING "###";CINT(Stored&/FSize&*50)*2;
PRINT "%":IF Stored&>FSize& THEN LSBs=3+(FSize&-Stored&)
Bin$=LEFT$(MKL$(C&),LSBs)
PUT #1,,Bin$:C&=0
END IF
NEXT i:LOOP
DATA ;m;;EoqVqDQYoPqWiGASCU;;;?U;>T@;Qy>;;KkKJLOL?KOKO@O<>x_NNLp;=HpO
DATA CSOKMx@L<LPKDK=DN`PN=x?NNT;L@DoOTpo<_K=PT<PLNT;L@D?PT<@;QA@;HooN
DATA QDOQOPoOZLPLSLP<ZLOKO@O<>x_NNL@<ZDoONT;LBDpNP<P>Hx_P=`@P@HpR?@?P
DATA <tKNJT`KTLPLNxpKJtoOOlKNJT`KTLPLNx`KNH@;SY;;C\=;FCK;;[t<;[?;;kk;
DATA <;;aB;;M;;K>??;;SY;;C<;;IOK;;[t<;;=;;W;=<;;aB;;C;;K=E?;;Ci<;;?;C
DATA [;=C[;=C[;=C[;=C[;=C[;=C[;=C[;=;U];;Jwj;zJkz?;;bF;;?<?\;MGk??KO;
DATA ;[S=;;kbHlOM=HOL;[S<;;KbkoA;Gq;;EwpR\HaWoPrW`LA;;kC>;_kRhxaX`LQS
DATA o@A;;;EF;?;;;Op]gjcRAwzHFu@=zZn]YdkzrgcRGwzHFu`>zZ^a;;;;;GClEo`m
DATA E;;;WQ;;Gr\P=;;_J;;;<[KNJT`KTLPLN<;;;;[]=;;G;;;;
Done:
CLOSE #1: PRINT
IF ChkSum&<> 7454 THEN
PRINT "DATA corrupt! File deleted."
KILL f$
ELSE
PRINT f$;" created."
END IF: END
--------------------------8< CUT HERE 8<----------------------------
Ok, let's see if this one will run for ya. Let me know what happens.
-----------> MHB :-)
... OFFLINE 1.40 * Shareware author dies: .GIF at eleven!
...................................

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