Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

GWBASIC - Retrieve protected files

1,662 views
Skip to first unread message

Nick Fitzpatrick

unread,
Jun 21, 1992, 1:24:31 AM6/21/92
to
In article <Bq3xw...@watserv1.waterloo.edu> I (Nick Fitzpatrick) wrote:
>Does anyone out there know if it is possible to convert a file that has been
>saved as a protected file, back to ASCII.
>
>A file is saved as protected using the ,P switch, eg
>SAVE "FILE.BAS",P
>
>This is also known as encoded binary format.
>
>Any help would be appreciated.
>

Wow I got some great responses from that one, the best was
From: Peter McGavin <pet...@kea.am.dsir.govt.nz>

and he wrote:
---------------------------------------
There is a program in the MSDOS.BASIC directory on Simtel-20 with the following
description:

UNPBAS11.ZIP B 1628 901231 Unprotects GWBASIC/BASICA protected programs
---------------------------------------

I checked for unpbas at an archie, and FTPed from a local site.
It works great.

Thanks to all who responded!

Excuse me for a minute, I feel a FLAME coming: :-)
(It takes the United Nations to
a) Still be using GWBASIC in the 1990's
b) Actually using this awful method to protect source code
c) Actually believe that a public agency has the right to
protect source code in case "people meddle with it")

Thanks again

Nicholas Fitzpatrick
Dept. of Civil Engineering
University of Waterloo

D'Arcy J.M. Cain

unread,
Jun 23, 1992, 1:02:11 PM6/23/92
to
ni...@sunburn.uwaterloo.ca (Nick Fitzpatrick) writes:
>Does anyone out there know if it is possible to convert a file that has been
>saved as a protected file, back to ASCII.

Unless they have changed things here is a way that used to work with
GWBASIC (although it would also work on files protected under IBM BASIC.)

Create a file with debug, symdeb or your favorite binary editor consisting
of the single char 0x1a (^Z) and name it unprot.bas.

Run GWBASIC and LOAD the protected file.

LOAD unprot.bas

VIOLA! Save the file any way you want to.

--
D'Arcy J.M. Cain (darcy@druid) |
D'Arcy Cain Consulting | There's no government
Toronto, Ontario, Canada | like no government!
+1 416 424 2871 DoD#0082 |

rd...@cstp.umkc.edu

unread,
Jun 24, 1992, 11:35:49 AM6/24/92
to
> I checked for unpbas at an archie, and FTPed from a local site.
> It works great.

Another cute way of doing it is to create UNPROT.SCR with
an ASCII text editor:

n unprot.bas
e 0100 ff 1a
rcx
0002
w
q

Then type DEBUG < UNPROT.SCR. This will give you a 2-byte
file called UNPROT.BAS. To unprotect a protected BASIC file, load
the protected BASIC file, then load UNPROT.BAS. You will then be
able to list the file.

Although this "2-byte" file takes up a block of disk space
(2048 bytes, 1024, or whatever), it is still the smallest answer to
the problem I've seen.

D'Arcy J.M. Cain

unread,
Jun 25, 1992, 12:37:01 PM6/25/92
to
rd...@cstp.umkc.edu writes:
> Although this "2-byte" file takes up a block of disk space
>(2048 bytes, 1024, or whatever), it is still the smallest answer to
>the problem I've seen.

Actually my one byte version was the smallest answer however yours
was the smallest correct answer. :-) I forgot the 0xff byte in my
post. Sorry about that.

Not On Our Customer File

unread,
Jun 25, 1992, 2:03:21 PM6/25/92
to


This may seem like a stupid question but I do little programming in basic
Is there any way to convert a basic program to an executable file?
thanks.
meps...@ic.sunysb.edu

D Keith Higgs

unread,
Jun 25, 1992, 4:41:54 PM6/25/92
to
In article <1992Jun25....@sbcs.sunysb.edu> meps...@csws15.ic.sunysb.edu
(Not On Our Customer File) writes:
+This may seem like a stupid question but I do little programming in basic
+Is there any way to convert a basic program to an executable file?
+thanks.
+meps...@ic.sunysb.edu
+

Sure, Save it as ascii format and spend $69.00 on a copy of QuickBASIC 4.5.
QB45 includes a compiler to make fully standalone .EXE files and your
QBASIC program probably won't need any recoding/modification to run in QB45
or be compiled by it. You might also consider VisualBASIC if you have any
intrest in porting your code to Windows.

Keith
--
D. Keith Higgs DA...@osu.edu o //////~~
dhi...@magnus.acs.ohio-state.edu o__////_ ///////~
The Ohio State University, University Libraries <o>> _\\/////
Continuation Acquisition Division ~~\\\ \\\\\_//////

RPT...@maine.maine.edu

unread,
Jun 25, 1992, 4:42:07 PM6/25/92
to
If you save basic files as ASCII and import them into Qbasic, you can
make them an .exe file by simply choosing the "RUN" command from the menu.
Programs created in Qbasic can be transformed directly (without going through
the saving as ASCII routine. A very cinchy process. Larry Z.

D Keith Higgs

unread,
Jun 25, 1992, 8:34:13 PM6/25/92
to
In article <92177.164...@MAINE.MAINE.EDU> RPT...@MAINE.MAINE.EDU writes:
+If you save basic files as ASCII and import them into Qbasic, you can
+make them an .exe file by simply choosing the "RUN" command from the menu.
+Programs created in Qbasic can be transformed directly (without going through
+the saving as ASCII routine. A very cinchy process. Larry Z.

What?! My understanding is that the "RUN" command causes your ---.BAS to
be executed within QBASIC (or QuickBASIC if that's what you're using). To
actually compile you need something like in QuickBASIC where, from the
"Run" pulldown menu you select "Make .EXE file" and subsequently choose
between a standalone .EXE or one requiring the presence of the runtime library.
It is true however that QuickBASIC will read QBASIC files directly. Files from
other BASICs, including GWBASIC, which use line numbers may require some
conversion.

RPT...@maine.maine.edu

unread,
Jun 26, 1992, 8:12:00 AM6/26/92
to
What Keith says is true enough.... perhaps my error here, I have always referre
d to Quickbasic as Qbasic. I have created several programs in Basic or GWBasic
, saved them as ASCII, imported them into my new Quickbasic 4.5, and followed t
he procedure mentioned by Keith. I really thougt I was describing the same thi
ng as Keith. Can someone edify me here? Thanks, Larry Z.

D Keith Higgs

unread,
Jun 26, 1992, 3:44:11 PM6/26/92
to
In article <92178.081...@MAINE.MAINE.EDU> <RPT...@MAINE.MAINE.EDU> writes
:
+What Keith says is true enough... perhaps my error here, I have always referre
+d to Quickbasic as Qbasic. I have created several programs in Basic or GWBasi
c
+,saved them as ASCII, imported them into my new Quickbasic 4.5, and followed t
+he procedure mentioned by Keith. I really thougt I was describing the same th
i
+ng as Keith. Can someone edify me here? Thanks, Larry Z.

Actually, it's not so far from the truth to confuse QBASIC and QuickBASIC. All
Microsoft did to create QuickBASIC was to add a little insignificant bit of
code and a compiler. The guts of the system (QB45) is distributed with MS-DOS
5.0 as QBASIC (=QuickBASIC without a compiler/linker/run-time-debugger).

Leonard Erickson

unread,
Jun 26, 1992, 5:07:18 PM6/26/92
to
meps...@csws15.ic.sunysb.edu (Not On Our Customer File) writes:

>This may seem like a stupid question but I do little programming in basic
>Is there any way to convert a basic program to an executable file?

Yes. Buy QuickBasic and compile it.
Or if it is a *BASIC* program, and not a QBASIC program, you can get
by with Turbo BASIC or Power Basic. (The QBASIC that comes with DOS 5
isn't compatible with TB or PB, the BASIC that came with older versions
of DOS is)
--
Leonard Erickson leo...@qiclab.scn.rain.com
CIS: [70465,203] 7046...@compuserve.com
FIDO: 1:105/56 Leonard....@f56.n105.z1.fidonet.org
(The CIS address is checked daily. The others infrequently)

D Keith Higgs

unread,
Jun 26, 1992, 10:40:36 PM6/26/92
to
In article <1992Jun26....@qiclab.scn.rain.com> 7046...@compuserve.com
writes:
+meps...@csws15.ic.sunysb.edu (Not On Our Customer File) writes:
+
+>This may seem like a stupid question but I do little programming in basic
+>Is there any way to convert a basic program to an executable file?
+
+Yes. Buy QuickBasic and compile it.
+ Or if it is a *BASIC* program, and not a QBASIC program, you can get
+by with Turbo BASIC or Power Basic. (The QBASIC that comes with DOS 5
+isn't compatible with TB or PB, the BASIC that came with older versions
+of DOS is)
However, The QBASIC that comes with DOS 5 is essentially the core of
QuickBASIC and programs written in QBASIC can pretty much move directly
into QuickBASIC for compiling to .EXE

Keith

Aaron Priven

unread,
Jun 27, 1992, 4:18:48 AM6/27/92
to

In article <1992Jun26.1...@magnus.acs.ohio-state.edu> dhi...@magnus.acs.ohio-state.edu (D Keith Higgs) writes:
>
>Actually, it's not so far from the truth to confuse QBASIC and QuickBASIC. All
>Microsoft did to create QuickBASIC was to add a little insignificant bit of
>code and a compiler. The guts of the system (QB45) is distributed with MS-DOS
>5.0 as QBASIC (=QuickBASIC without a compiler/linker/run-time-debugger).

Since QuickBASIC preceded QBASIC by several years, it would be much,
much more accurate to say that QBASIC is a cut-down QuickBASIC.

=Aaron=
--
Aaron Priven, aar...@ucscb.ucsc.edu or fuzz...@cats.ucsc.edu
"Men make history, but they do not do so under
conditions of their own choosing." -- Karl Marx

Leonard Erickson

unread,
Jun 27, 1992, 2:17:21 PM6/27/92
to
RPT...@MAINE.MAINE.EDU writes:

*Which* "qbasic" are you talking about? QuickBasic 4.5? Or the QBASIC
included with DOS 5.0 (which cannot create EXE files!)

Mike Phillips

unread,
Jun 29, 1992, 10:39:04 AM6/29/92
to
<RPT...@MAINE.MAINE.EDU> writes:

QuickBASIC is the commercial product from Microsoft which sells for $70
on the market. QBasic is distributed with DOS 5.0 and does not include a
compiler. QuickBASIC is compatible in all respects with QBASIC, but QBASIC
is not necessarily compatible with QuickBASIC. This means programs written
in Qbasic can be used in QuickBASIC (backward compatibility) but programs
written in QuickBASIC may not necessarily run in the Qbasic environment
(what do you want for free <g>). Clear as mud?

ri...@ttd.teradyne.com

unread,
Jun 29, 1992, 9:50:06 AM6/29/92
to
In article <1992Jun26.1...@magnus.acs.ohio-state.edu>, dhi...@magnus.acs.ohio-state.edu (D Keith Higgs) writes:
> In article <92178.081...@MAINE.MAINE.EDU> <RPT...@MAINE.MAINE.EDU> writes
> :
> +What Keith says is true enough... perhaps my error here, I have always referre
> +d to Quickbasic as Qbasic. I have created several programs in Basic or GWBasi
> c
> +,saved them as ASCII, imported them into my new Quickbasic 4.5, and followed t
> +he procedure mentioned by Keith. I really thougt I was describing the same th
> i
> +ng as Keith. Can someone edify me here? Thanks, Larry Z.
>
> Actually, it's not so far from the truth to confuse QBASIC and QuickBASIC. All
> Microsoft did to create QuickBASIC was to add a little insignificant bit of
> code and a compiler. The guts of the system (QB45) is distributed with MS-DOS
> 5.0 as QBASIC (=QuickBASIC without a compiler/linker/run-time-debugger).
>
> Keith
> --

Actually, it was the other way around. QuickBASIC pre-dated QBASIC by some
years. For DOS-5, the compiler/linker/debugger was disabled/removed.

> D. Keith Higgs DA...@osu.edu o //////~~
> dhi...@magnus.acs.ohio-state.edu o__////_ ///////~
> The Ohio State University, University Libraries <o>> _\\/////
> Continuation Acquisition Division ~~\\\ \\\\\_//////

--
John Rice K9IJ | "Did I say that ?" I must have, but It was
ri...@ttd.teradyne.com | MY opinion only, no one else's...Especially
(708)-940-9000 - (work) | Not my Employer's....
(708)-438-7011 - (home) | Purveyor of Miracles,Magic and Sleight-of-hand

0 new messages