GW-BAS to QB 1 of 2

 BBS: Inland Empire Archive
Date: 03-15-92 (16:52)             Number: 139
From: TOM HAMMOND                  Refer#: NONE
  To: ALL                           Recvd: NO  
Subj: GW-BAS to QB   1 of 2          Conf: (2) Quik_Bas
Regarding the conversion of GW-BASIC source code to QuickBASIC (or to
QBASIC, either one)... a couple items which appear to have gone
un-mentioned thus far... (Note: for the sake of this message, I use 'QB'
to refer to QuickBASIC, PDS and QBASIC [in most cases])...

Problem #1

Some of the old (GW_BASIC) programs included PEEKS and POKES which are
no longer valid for QBASIC, QuickBASIC or PDS.  Some of these PEEKS and
POKES can, no doubt, be converted into new QB commands, but I suspect
some cannot.

Problem #2

Some of the older programs LOADed machine language code, from within the
program, into memory so things would run faster (e.g. graphics routines,
etc.).  Some of these loader routines seem to fail regularly when a user
attempts to merely convert the old software to ASCII and then RUN it in
the QB environment.

Problem #3

Some of the old (GW-BASIC) programs were SAVEd with "protection" (the
original "safe" programming...!).  This means that when they were SAVEd
(SAVE "basfilename",P), there was a bit set to prohibit the file's being
LISTed or SAVEd in ASCII format. The file could only (as I recall) be
SAVEd in the (default) binary format, which could not be (easily)
changed once written into that format.

This doesn't necessarily mean that only 'commercial' programs are
"protected", it just means that someone, somehow, either by intent or be
accident, SAVEd their program as a protected file.

This means that if you want to convert such a program, you first
have to jump thru a couple additional 'hoops' to convert the "protected"
file back to a "normal" file and THEN convert it to ASCII format.

To remove "protection" from a BASIC file (SAVEd with ,P):

(You MUST use IBM PC-BASIC or PC-BASICA, I have NOT been able to get
this scheme to work with any version of GW-BASIC.  PC-BASIC _ONLY_ runs
on IBM PCs because only IBM puts BASIC in ROM on the machine).

Start IBM PC-BASIC (or PC-BASICA) running on your machine.


        DEF SEG:NEW

        BSAVE "UNPROT",1124,1

        LOAD "protected BASIC program filename"

        BLOAD "UNPROT"          <== NOTE: File is now "unprotected"

        SAVE (new filename)

NOTE:  SAVE the unprotected file (at least for now) with a different
       name so that it can be checked to ensure that it is truly
       unprotected.  This way, you can re-run the unprotect routine on
       the protected file again if the first attempt did not work.

(the remainder of this message is too long for inclusion in a single
message, please look for part 2 of 2).

--- WM v2.00/91-0231
 * Origin: The Modem Zone BBS (314) 893-5106 (1:289/2)
Outer Court
Echo Basic Postings

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