Discussion:
Reading ancient QB/QBX source files
(too old to reply)
Karl E. Peterson
2007-02-23 16:58:31 UTC
Permalink
Hi --

Anyone have any good ideas for recoving "compressed" QB/QBX source (*.BAS) files? I
have managed to get a copy of QuickBasic v4.5 running, and when I attempt to load
them in there, I'm told:

QuickBASIC is attempting to load a binary file and does
not recognize the binary-file format. QuickBASIC
recognizes two binary-file formats:
1. QuickBASIC program files
2. Help files
This error commonly occurs when QuickBASIC is asked to
use an include file that has been saved in compressed
format. Include files must be saved in text format, so
1. Reload the include file as a module
2. Save it in text format
3. Run the program again.

It's (obviously) way past time I converted to ASCII those that are still locked in
the past. Anyone know of any utilities, or algorithms, to uncompress these
critters? I believe they were originally created in either QB 4.0 or 4.5, though
some of them may have be PDS vintage.

Other ideas I've tried, that also failed:

- Loading in PDS 7.1 caused it to freeze up. Not sure if that's a symptom of it
running under XP, and I really need to fire up a DOS VM or something?

- Visual Basic 1.0 failed to recognize the format as well.

Thanks... Karl
--
.NET: It's About Trust!
http://vfred.mvps.org
Dan Barclay
2007-02-24 03:38:49 UTC
Permalink
Karl,

If you don't get the info here, try again in

microsoft.public.basic.dos

Dan
Post by Karl E. Peterson
Hi --
Anyone have any good ideas for recoving "compressed" QB/QBX source (*.BAS)
files? I have managed to get a copy of QuickBasic v4.5 running, and when
QuickBASIC is attempting to load a binary file and does
not recognize the binary-file format. QuickBASIC
1. QuickBASIC program files
2. Help files
This error commonly occurs when QuickBASIC is asked to
use an include file that has been saved in compressed
format. Include files must be saved in text format, so
1. Reload the include file as a module
2. Save it in text format
3. Run the program again.
It's (obviously) way past time I converted to ASCII those that are still
locked in the past. Anyone know of any utilities, or algorithms, to
uncompress these critters? I believe they were originally created in
either QB 4.0 or 4.5, though some of them may have be PDS vintage.
- Loading in PDS 7.1 caused it to freeze up. Not sure if that's a
symptom of it running under XP, and I really need to fire up a DOS VM or
something?
- Visual Basic 1.0 failed to recognize the format as well.
Thanks... Karl
--
.NET: It's About Trust!
http://vfred.mvps.org
Karl E. Peterson
2007-02-26 17:52:57 UTC
Permalink
Thanks, Dan. Probably should've cross-posted there originally, but it wasn't on my
radar.

Still searching for ideas on the problem below!
Post by Dan Barclay
Karl,
If you don't get the info here, try again in
microsoft.public.basic.dos
Dan
Post by Karl E. Peterson
Hi --
Anyone have any good ideas for recoving "compressed" QB/QBX source (*.BAS)
files? I have managed to get a copy of QuickBasic v4.5 running, and when
QuickBASIC is attempting to load a binary file and does
not recognize the binary-file format. QuickBASIC
1. QuickBASIC program files
2. Help files
This error commonly occurs when QuickBASIC is asked to
use an include file that has been saved in compressed
format. Include files must be saved in text format, so
1. Reload the include file as a module
2. Save it in text format
3. Run the program again.
It's (obviously) way past time I converted to ASCII those that are still
locked in the past. Anyone know of any utilities, or algorithms, to
uncompress these critters? I believe they were originally created in
either QB 4.0 or 4.5, though some of them may have be PDS vintage.
- Loading in PDS 7.1 caused it to freeze up. Not sure if that's a
symptom of it running under XP, and I really need to fire up a DOS VM or
something?
- Visual Basic 1.0 failed to recognize the format as well.
Thanks... Karl
--
.NET: It's About Trust!
http://vfred.mvps.org
--
.NET: It's About Trust!
http://vfred.mvps.org
Karl E. Peterson
2007-02-26 17:53:42 UTC
Permalink
Thanks, Dan. Probably should've cross-posted there originally, but it wasn't on my
radar.

Still searching for ideas on the problem below!
Post by Dan Barclay
Karl,
If you don't get the info here, try again in
microsoft.public.basic.dos
Dan
Post by Karl E. Peterson
Hi --
Anyone have any good ideas for recoving "compressed" QB/QBX source (*.BAS)
files? I have managed to get a copy of QuickBasic v4.5 running, and when
QuickBASIC is attempting to load a binary file and does
not recognize the binary-file format. QuickBASIC
1. QuickBASIC program files
2. Help files
This error commonly occurs when QuickBASIC is asked to
use an include file that has been saved in compressed
format. Include files must be saved in text format, so
1. Reload the include file as a module
2. Save it in text format
3. Run the program again.
It's (obviously) way past time I converted to ASCII those that are still
locked in the past. Anyone know of any utilities, or algorithms, to
uncompress these critters? I believe they were originally created in
either QB 4.0 or 4.5, though some of them may have be PDS vintage.
- Loading in PDS 7.1 caused it to freeze up. Not sure if that's a
symptom of it running under XP, and I really need to fire up a DOS VM or
something?
- Visual Basic 1.0 failed to recognize the format as well.
Thanks... Karl
--
.NET: It's About Trust!
http://vfred.mvps.org
--
.NET: It's About Trust!
http://vfred.mvps.org
Jim Horvath
2007-02-27 16:15:57 UTC
Permalink
Old .BAS files could also be in GWBASIC/BASICA binary format which I
don't believe QB can interpret. To decode those, you need to find a copy
of GWBASIC, start the interpreter and load the file. I'm pretty sure
it's just "LOAD filename.BAS" from the GWBASIC command prompt.

Presuming you get no errors from loading, you can then LIST the file to
view its contents. I can't remember whether it's SAVE or STORE to write
back to disk, but you have to provide an ",A" switch to save in ASCII
format. That is:

SAVE filename.bas,A

(I can't remember if you need quotes around the file name.)

I think you type SYSTEM to exit GWBASIC and return to DOS.

Jim H.
Post by Karl E. Peterson
Thanks, Dan. Probably should've cross-posted there originally, but it wasn't on my
radar.
Still searching for ideas on the problem below!
Post by Dan Barclay
Karl,
If you don't get the info here, try again in
microsoft.public.basic.dos
Dan
Post by Karl E. Peterson
Hi --
Anyone have any good ideas for recoving "compressed" QB/QBX source (*.BAS)
files? I have managed to get a copy of QuickBasic v4.5 running, and when
QuickBASIC is attempting to load a binary file and does
not recognize the binary-file format. QuickBASIC
1. QuickBASIC program files
2. Help files
This error commonly occurs when QuickBASIC is asked to
use an include file that has been saved in compressed
format. Include files must be saved in text format, so
1. Reload the include file as a module
2. Save it in text format
3. Run the program again.
It's (obviously) way past time I converted to ASCII those that are still
locked in the past. Anyone know of any utilities, or algorithms, to
uncompress these critters? I believe they were originally created in
either QB 4.0 or 4.5, though some of them may have be PDS vintage.
- Loading in PDS 7.1 caused it to freeze up. Not sure if that's a
symptom of it running under XP, and I really need to fire up a DOS VM or
something?
- Visual Basic 1.0 failed to recognize the format as well.
Thanks... Karl
--
.NET: It's About Trust!
http://vfred.mvps.org
Karl E. Peterson
2007-02-27 17:14:59 UTC
Permalink
Hi Jim --

Yep, I fired up GWBASIC yesterday, and gave it a try. This is how it went:

GW-BASIC 3.23
(C) Copyright Microsoft 1983,1984,1985,1986,1987,1988
60300 Bytes free
Ok
LOAD"dio.bas"
Direct statement in file
Ok
LIST
Ok

:-(

Thanks... Karl
Post by Jim Horvath
Old .BAS files could also be in GWBASIC/BASICA binary format which I
don't believe QB can interpret. To decode those, you need to find a copy
of GWBASIC, start the interpreter and load the file. I'm pretty sure
it's just "LOAD filename.BAS" from the GWBASIC command prompt.
Presuming you get no errors from loading, you can then LIST the file to
view its contents. I can't remember whether it's SAVE or STORE to write
back to disk, but you have to provide an ",A" switch to save in ASCII
SAVE filename.bas,A
(I can't remember if you need quotes around the file name.)
I think you type SYSTEM to exit GWBASIC and return to DOS.
Jim H.
Post by Karl E. Peterson
Thanks, Dan. Probably should've cross-posted there originally, but it wasn't on
my radar.
Still searching for ideas on the problem below!
Post by Dan Barclay
Karl,
If you don't get the info here, try again in
microsoft.public.basic.dos
Dan
Post by Karl E. Peterson
Hi --
Anyone have any good ideas for recoving "compressed" QB/QBX source (*.BAS)
files? I have managed to get a copy of QuickBasic v4.5 running, and when
QuickBASIC is attempting to load a binary file and does
not recognize the binary-file format. QuickBASIC
1. QuickBASIC program files
2. Help files
This error commonly occurs when QuickBASIC is asked to
use an include file that has been saved in compressed
format. Include files must be saved in text format, so
1. Reload the include file as a module
2. Save it in text format
3. Run the program again.
It's (obviously) way past time I converted to ASCII those that are still
locked in the past. Anyone know of any utilities, or algorithms, to
uncompress these critters? I believe they were originally created in
either QB 4.0 or 4.5, though some of them may have be PDS vintage.
- Loading in PDS 7.1 caused it to freeze up. Not sure if that's a
symptom of it running under XP, and I really need to fire up a DOS VM or
something?
- Visual Basic 1.0 failed to recognize the format as well.
Thanks... Karl
--
.NET: It's About Trust!
http://vfred.mvps.org
--
.NET: It's About Trust!
http://vfred.mvps.org
Jim Horvath
2007-02-27 17:39:46 UTC
Permalink
Are you sure the files are not old Visual Basic?

Although text format has been the default for a long time now, the first
VB IDEs defaulted to binary, and .BAS was still the extension for VB
non-form modules prior to .NET.

JH
Post by Karl E. Peterson
Hi Jim --
GW-BASIC 3.23
(C) Copyright Microsoft 1983,1984,1985,1986,1987,1988
60300 Bytes free
Ok
LOAD"dio.bas"
Direct statement in file
Ok
LIST
Ok
:-(
Thanks... Karl
Post by Jim Horvath
Old .BAS files could also be in GWBASIC/BASICA binary format which I
don't believe QB can interpret. To decode those, you need to find a copy
of GWBASIC, start the interpreter and load the file. I'm pretty sure
it's just "LOAD filename.BAS" from the GWBASIC command prompt.
Presuming you get no errors from loading, you can then LIST the file to
view its contents. I can't remember whether it's SAVE or STORE to write
back to disk, but you have to provide an ",A" switch to save in ASCII
SAVE filename.bas,A
(I can't remember if you need quotes around the file name.)
I think you type SYSTEM to exit GWBASIC and return to DOS.
Jim H.
Post by Karl E. Peterson
Thanks, Dan. Probably should've cross-posted there originally, but it wasn't on
my radar.
Still searching for ideas on the problem below!
Post by Dan Barclay
Karl,
If you don't get the info here, try again in
microsoft.public.basic.dos
Dan
Post by Karl E. Peterson
Hi --
Anyone have any good ideas for recoving "compressed" QB/QBX source (*.BAS)
files? I have managed to get a copy of QuickBasic v4.5 running, and when
QuickBASIC is attempting to load a binary file and does
not recognize the binary-file format. QuickBASIC
1. QuickBASIC program files
2. Help files
This error commonly occurs when QuickBASIC is asked to
use an include file that has been saved in compressed
format. Include files must be saved in text format, so
1. Reload the include file as a module
2. Save it in text format
3. Run the program again.
It's (obviously) way past time I converted to ASCII those that are still
locked in the past. Anyone know of any utilities, or algorithms, to
uncompress these critters? I believe they were originally created in
either QB 4.0 or 4.5, though some of them may have be PDS vintage.
- Loading in PDS 7.1 caused it to freeze up. Not sure if that's a
symptom of it running under XP, and I really need to fire up a DOS VM or
something?
- Visual Basic 1.0 failed to recognize the format as well.
Thanks... Karl
--
.NET: It's About Trust!
http://vfred.mvps.org
Karl E. Peterson
2007-02-27 18:00:13 UTC
Permalink
Yep, VB1 fails to load them, as well.

---------------------------
Microsoft Visual Basic
---------------------------
Can't load module; invalid format
---------------------------
OK
---------------------------

The file dates are 1990-91, for context.
Post by Jim Horvath
Are you sure the files are not old Visual Basic?
Although text format has been the default for a long time now, the first
VB IDEs defaulted to binary, and .BAS was still the extension for VB
non-form modules prior to .NET.
JH
Post by Karl E. Peterson
Hi Jim --
GW-BASIC 3.23
(C) Copyright Microsoft 1983,1984,1985,1986,1987,1988
60300 Bytes free
Ok
LOAD"dio.bas"
Direct statement in file
Ok
LIST
Ok
:-(
Thanks... Karl
Post by Jim Horvath
Old .BAS files could also be in GWBASIC/BASICA binary format which I
don't believe QB can interpret. To decode those, you need to find a copy
of GWBASIC, start the interpreter and load the file. I'm pretty sure
it's just "LOAD filename.BAS" from the GWBASIC command prompt.
Presuming you get no errors from loading, you can then LIST the file to
view its contents. I can't remember whether it's SAVE or STORE to write
back to disk, but you have to provide an ",A" switch to save in ASCII
SAVE filename.bas,A
(I can't remember if you need quotes around the file name.)
I think you type SYSTEM to exit GWBASIC and return to DOS.
Jim H.
Post by Karl E. Peterson
Thanks, Dan. Probably should've cross-posted there originally, but it wasn't
on my radar.
Still searching for ideas on the problem below!
Post by Dan Barclay
Karl,
If you don't get the info here, try again in
microsoft.public.basic.dos
Dan
Post by Karl E. Peterson
Hi --
Anyone have any good ideas for recoving "compressed" QB/QBX source (*.BAS)
files? I have managed to get a copy of QuickBasic v4.5 running, and when
QuickBASIC is attempting to load a binary file and does
not recognize the binary-file format. QuickBASIC
1. QuickBASIC program files
2. Help files
This error commonly occurs when QuickBASIC is asked to
use an include file that has been saved in compressed
format. Include files must be saved in text format, so
1. Reload the include file as a module
2. Save it in text format
3. Run the program again.
It's (obviously) way past time I converted to ASCII those that are still
locked in the past. Anyone know of any utilities, or algorithms, to
uncompress these critters? I believe they were originally created in
either QB 4.0 or 4.5, though some of them may have be PDS vintage.
- Loading in PDS 7.1 caused it to freeze up. Not sure if that's a
symptom of it running under XP, and I really need to fire up a DOS VM or
something?
- Visual Basic 1.0 failed to recognize the format as well.
Thanks... Karl
--
.NET: It's About Trust!
http://vfred.mvps.org
--
.NET: It's About Trust!
http://vfred.mvps.org
Jim Horvath
2007-02-27 18:41:56 UTC
Permalink
Post by Karl E. Peterson
Yep, VB1 fails to load them, as well.
I guess I should have read the original message to the end :-)
Post by Karl E. Peterson
The file dates are 1990-91, for context.
Definitely the PDS 7, QB 4.5 era.

DIO.BAS? Sounds like an interface to an ISA bus Digital I/O card (at
least in my world that's what it would be - I actually found several
GWBasic files from 1989 named DIO1.BAS in my archive folders).

Isn't it time you threw away that obsolete junk? :-)

Jim
Karl E. Peterson
2007-02-27 19:00:58 UTC
Permalink
Hi Jim --
Post by Jim Horvath
Post by Karl E. Peterson
Yep, VB1 fails to load them, as well.
I guess I should have read the original message to the end :-)
You see I calmly refrained from pointing that out. <g>
Post by Jim Horvath
Post by Karl E. Peterson
The file dates are 1990-91, for context.
Definitely the PDS 7, QB 4.5 era.
Yep. I think these were general purpose modules I used in both.
Post by Jim Horvath
DIO.BAS? Sounds like an interface to an ISA bus Digital I/O card (at
least in my world that's what it would be - I actually found several
GWBasic files from 1989 named DIO1.BAS in my archive folders).
I *think* it was short for DiskIO... in my scheme of things.
Post by Jim Horvath
Isn't it time you threw away that obsolete junk? :-)
Prolly. A question actually came up in the VB groups the other day, though, about
pulling a hard disk serial number from DOS, and, well, call it OCD maybe? I *swear*
I have that code somewhere... <bg>
--
.NET: It's About Trust!
http://vfred.mvps.org
Jim Horvath
2007-02-27 19:28:15 UTC
Permalink
Post by Karl E. Peterson
A question actually came up in the VB groups the other day, though, about
pulling a hard disk serial number from DOS, and, well, call it OCD maybe? I *swear*
I have that code somewhere... <bg>
Sounds like a DOS or BIOS interrupt to me. Probably you could find the
information somewhere in Ralf Browns interrupt list.

Here's one useful link:
http://www.ctyme.com/rbrown.htm

(...I know what you mean about the OCD, but why else would you keep with
computers after all these years... )

Jim
Karl E. Peterson
2007-02-27 19:41:44 UTC
Permalink
Post by Jim Horvath
Post by Karl E. Peterson
A question actually came up in the VB groups the other day, though, about
pulling a hard disk serial number from DOS, and, well, call it OCD maybe? I
*swear* I have that code somewhere... <bg>
Sounds like a DOS or BIOS interrupt to me. Probably you could find the
information somewhere in Ralf Browns interrupt list.
http://www.ctyme.com/rbrown.htm
Yep, that list even came up. Thought I'd have a CALL INTERRUPT example to offer, as
opposed to all the other suggestions to use ASM or C.
Post by Jim Horvath
(...I know what you mean about the OCD, but why else would you keep with
computers after all these years... )
Heh, no doubt...
--
.NET: It's About Trust!
http://vfred.mvps.org
Jim Horvath
2007-02-27 23:19:58 UTC
Permalink
Post by Karl E. Peterson
Thought I'd have a CALL INTERRUPT example to offer, as
opposed to all the other suggestions to use ASM or C.
Here you go. This is the disk serial number shown by the DIR command.

Must start QB with "/L QB.QLB" option.

Jim

<QB4.5 Code>

DECLARE FUNCTION DiskSerialNumber$ (DriveLetter$)
'$INCLUDE: 'c:\qb45\qb.bi'

TYPE DiskInfo
InfoLevel AS INTEGER
DiskSerialLow AS INTEGER
DiskSerialHigh AS INTEGER
VolLabel AS STRING * 11
FileSystemType AS STRING * 8
END TYPE



PRINT DiskSerialNumber("C")
END

FUNCTION DiskSerialNumber$ (DriveLetter$)

DIM Regs AS RegTypeX
DIM DiskInf AS DiskInfo

IF DriveLetter$ = "" THEN DriveLetter$ = " "

DiskSerialNumber$ = ""' In case of early exit

DriveNum = ASC(UCASE$(DriveLetter$)) - &H40
IF DriveNum < 0 OR DriveNum > 26 THEN EXIT FUNCTION

Regs.ax = &H6900
Regs.bx = DriveNum
Regs.dx = VARPTR(DiskInf)
Regs.ds = VARSEG(DiskInf)

CALL INTERRUPTX(&H21, Regs, Regs)
DiskSerialNumber$ = HEX$(DiskInf.DiskSerialHigh) + "-" +
HEX$(DiskInf.DiskSerialLow)

END FUNCTION



<\QB4.5 Code>
Karl E. Peterson
2007-02-27 23:27:17 UTC
Permalink
Post by Jim Horvath
Post by Karl E. Peterson
Thought I'd have a CALL INTERRUPT example to offer, as
opposed to all the other suggestions to use ASM or C.
Here you go. This is the disk serial number shown by the DIR command.
Cool!
Post by Jim Horvath
Must start QB with "/L QB.QLB" option.
Ouch. How might a guy who hasn't fired that up in nearly twenty years refresh
himself on such things? Is there a similar switch that would enable it in PDS?

Thanks so much... Karl
--
.NET: It's About Trust!
http://vfred.mvps.org
Jim Horvath
2007-02-27 23:45:16 UTC
Permalink
Post by Karl E. Peterson
Post by Jim Horvath
Post by Karl E. Peterson
Thought I'd have a CALL INTERRUPT example to offer, as
opposed to all the other suggestions to use ASM or C.
Here you go. This is the disk serial number shown by the DIR command.
Cool!
Post by Jim Horvath
Must start QB with "/L QB.QLB" option.
Ouch. How might a guy who hasn't fired that up in nearly twenty years refresh
himself on such things? Is there a similar switch that would enable it in PDS?
Thanks so much... Karl
The /L option is just because QB doesn't support the InterruptX function
natively, so it's loaded in the QB.QLB "QuickLibrary" file. (MS was
thinking DLL years before Windows).

According to my PDS documentation, the only difference from QB is the
appended letter "X". That is, when you start the compiler:

QBX /L <path to file>\QBX.QLB

and in the code you have to change the '$INCLUDE: line to reference QBX.BI

Jim
Karl E. Peterson
2007-02-27 23:56:06 UTC
Permalink
Post by Jim Horvath
Post by Karl E. Peterson
Post by Jim Horvath
Post by Karl E. Peterson
Thought I'd have a CALL INTERRUPT example to offer, as
opposed to all the other suggestions to use ASM or C.
Here you go. This is the disk serial number shown by the DIR command.
Cool!
Post by Jim Horvath
Must start QB with "/L QB.QLB" option.
Ouch. How might a guy who hasn't fired that up in nearly twenty years refresh
himself on such things? Is there a similar switch that would enable it in PDS?
Thanks so much... Karl
The /L option is just because QB doesn't support the InterruptX function
natively, so it's loaded in the QB.QLB "QuickLibrary" file. (MS was
thinking DLL years before Windows).
According to my PDS documentation, the only difference from QB is the
QBX /L <path to file>\QBX.QLB
and in the code you have to change the '$INCLUDE: line to reference QBX.BI
Hmmmm, what error did/do you get if you don't use /L? I ask, because I'm wondering
if I need to take special steps to get QB/QBX running in XP?
--
.NET: It's About Trust!
http://vfred.mvps.org
Jim Horvath
2007-02-28 00:11:39 UTC
Permalink
Post by Karl E. Peterson
Hmmmm, what error did/do you get if you don't use /L? I ask, because I'm wondering
if I need to take special steps to get QB/QBX running in XP?
Without /L the error is "Subprogram not defined" when QB tries to
compile the "CALL InterruptX" line in the program.

See my response to your other recent message for Windows XP considerations.

Good luck,

Jim
Karl E. Peterson
2007-02-27 23:40:33 UTC
Permalink
Post by Jim Horvath
Post by Karl E. Peterson
Thought I'd have a CALL INTERRUPT example to offer, as
opposed to all the other suggestions to use ASM or C.
Here you go. This is the disk serial number shown by the DIR command.
Must start QB with "/L QB.QLB" option.
Well, even when I try that, I still get "Bad File Mode" in QB?

Puzzled...
--
.NET: It's About Trust!
http://vfred.mvps.org
Jim Horvath
2007-02-28 00:08:07 UTC
Permalink
Post by Karl E. Peterson
Post by Jim Horvath
Post by Karl E. Peterson
Thought I'd have a CALL INTERRUPT example to offer, as
opposed to all the other suggestions to use ASM or C.
Here you go. This is the disk serial number shown by the DIR command.
Must start QB with "/L QB.QLB" option.
Well, even when I try that, I still get "Bad File Mode" in QB?
Puzzled...
I'm not sure when you would get such an error with the code that I
posted. It runs on my WinXP machine.

I have had some odd QB errors when running under Windows if I'm too deep
in the directory structure. On those rare occasions when I still use QB,
I find it best to be sure that I use short DOS 8.3 file names and paths
for all directories involved. That is, the compiler should be located
off the root directory, like C:\QB45, and not "C:\Program
Files\Microsoft QuickBasic 4.5". The working directory should be
something like "C:\Work" and not "C:\Documents and Settings\kpeterson\My
Documents\QuickBasic programs".

I installed QB with all Help, Lib, Include files in the single
directory, so my environment variables are just:

SET HELP=C:\QB45
SET LIB=C:\QB45
SET INCLUDE=C:\QB45

For PDS you may have something like

SET LIB=C:\PDS7\LIB
etc.

Be warned that Windows environment space may exceed what DOS tools are
capable of using. This is especially true for the PATH variable. If you
depend on PATH to get you to your compiler tools, make sure put it up
front, i.e.:

SET PATH=C:\PDS7\BIN;%path%

Jim
Karl E. Peterson
2007-02-28 01:24:22 UTC
Permalink
Hi Jim --
Post by Jim Horvath
Post by Karl E. Peterson
Post by Jim Horvath
Must start QB with "/L QB.QLB" option.
Well, even when I try that, I still get "Bad File Mode" in QB?
I'm not sure when you would get such an error with the code that I
posted. It runs on my WinXP machine.
Okay, running would be a *huge* step forward here. It won't even load. I think the
/L thing would only apply to actually running, right?
Post by Jim Horvath
I have had some odd QB errors when running under Windows if I'm too deep
in the directory structure. On those rare occasions when I still use QB,
I find it best to be sure that I use short DOS 8.3 file names and paths
for all directories involved.
This is where I'm at:

C:\Code\OldCode\QBX\temp>qb /L QB.QLB

After running this batch file:

mode con lines=50

set QBPath=C:\DevTools\QB45
set PATH=%QBPath%;%PATH%
set LIB=%QBPath%;%LIB%
set HELPFILES=%QBPath%;%HELPFILES%
Post by Jim Horvath
That is, the compiler should be located
off the root directory, like C:\QB45, and not "C:\Program
Files\Microsoft QuickBasic 4.5". The working directory should be
something like "C:\Work" and not "C:\Documents and Settings\kpeterson\My
Documents\QuickBasic programs".
You don't think having it two levels deep would be an issue, do you?

I'm starting to wonder if I got bad bits?

Thanks... Karl
--
.NET: It's About Trust!
http://vfred.mvps.org
Jim Horvath
2007-02-28 02:23:58 UTC
Permalink
Post by Karl E. Peterson
I'm starting to wonder if I got bad bits?
It occurred to me that you probably cut and pasted my code into a
Window's editor that saved as UNICODE Text.

I believe Windows defaults to UNICODE, not ASCII and this would
certainly cause a "Bad file mode" in QuickBasic or other DOS app since
each character is 16-bits instead of 8.

Assuming you are using Notepad to save the code, make sure the encoding
is set to ANSI in the "Save As" dialog.

If all else fails just key it in manually in the QB editor - I did <g>.

You'll still need to use the /L QB.QLB switch when starting QuickBasic.
You DO have the files QB.QLB (run-time library file), QB.LIB (object
code library, needed to link to executables), and QB.BI (text include
file) don't you?

Jim
Karl E. Peterson
2007-02-28 02:34:19 UTC
Permalink
Post by Jim Horvath
Post by Karl E. Peterson
I'm starting to wonder if I got bad bits?
It occurred to me that you probably cut and pasted my code into a
Window's editor that saved as UNICODE Text.
Oh, it's *way* more embarrassing than that. You've probably seen my other post by
now? It wasn't the actual algorithm I was after, so much as finding a way to unlock
my old BAS files. I've been trying to do *way* too many different tasks today, and
none of them are turning out all that well, I'm afraid. Keeping up with this
thread, included. <sigh>
Post by Jim Horvath
I believe Windows defaults to UNICODE, not ASCII and this would
certainly cause a "Bad file mode" in QuickBasic or other DOS app since
each character is 16-bits instead of 8.
That's a great intuit, there, but no. The files I was attempting to open are
definitely binary. Buttugly as all can be, when I open them in any sort of editor.
Post by Jim Horvath
Assuming you are using Notepad to save the code, make sure the encoding
is set to ANSI in the "Save As" dialog.
If all else fails just key it in manually in the QB editor - I did <g>.
You'll still need to use the /L QB.QLB switch when starting QuickBasic.
You DO have the files QB.QLB (run-time library file), QB.LIB (object
code library, needed to link to executables), and QB.BI (text include
file) don't you?
Okay, now I *have* to try your code, don't I? <g>

Will do... :-)
--
.NET: It's About Trust!
http://vfred.mvps.org
Tom Lake
2007-02-28 02:56:47 UTC
Permalink
Post by Karl E. Peterson
Oh, it's *way* more embarrassing than that. You've probably seen my other
post by now? It wasn't the actual algorithm I was after, so much as
finding a way to unlock my old BAS files. I've been trying to do *way*
too many different tasks today, and none of them are turning out all that
well, I'm afraid. Keeping up with this thread, included. <sigh>
The BASIC files you sent me loaded into MS PDS (7.1) just fine. I resaved
them as text
so you shouldn't have a problem with them now.

Tom Lake
Karl E. Peterson
2007-02-28 17:19:20 UTC
Permalink
Post by Tom Lake
Post by Karl E. Peterson
Oh, it's *way* more embarrassing than that. You've probably seen my other
post by now? It wasn't the actual algorithm I was after, so much as
finding a way to unlock my old BAS files. I've been trying to do *way*
too many different tasks today, and none of them are turning out all that
well, I'm afraid. Keeping up with this thread, included. <sigh>
The BASIC files you sent me loaded into MS PDS (7.1) just fine. I resaved
them as text so you shouldn't have a problem with them now.
That's fabulous, Tom. Very much appreciated! Now I just have to figure out what's
wrong with my install. At least I know the old code is still intact. :-)
--
.NET: It's About Trust!
http://vfred.mvps.org
Karl E. Peterson
2007-02-28 02:39:34 UTC
Permalink
Post by Jim Horvath
Post by Karl E. Peterson
I'm starting to wonder if I got bad bits?
It occurred to me that you probably cut and pasted my code into a
Window's editor that saved as UNICODE Text.
Just did a straight cut/paste from your original post, into QB, and -- tada! -- it
worked. :-)

Looks like my install is pretty good, now all I need to figure out is why it won't
load those old binaries.

Thanks... Karl
--
.NET: It's About Trust!
http://vfred.mvps.org
Karl E. Peterson
2007-02-28 02:19:21 UTC
Permalink
Post by Jim Horvath
Post by Karl E. Peterson
Post by Jim Horvath
Post by Karl E. Peterson
Thought I'd have a CALL INTERRUPT example to offer, as
opposed to all the other suggestions to use ASM or C.
Here you go. This is the disk serial number shown by the DIR command.
Must start QB with "/L QB.QLB" option.
Well, even when I try that, I still get "Bad File Mode" in QB?
Puzzled...
I'm not sure when you would get such an error with the code that I
posted. It runs on my WinXP machine.
Jeeeez, I'm sorry. I wasn't paying attention to names, and got you and Tom mixed
up. I was thinking I'd sent you *my* code, and you were able to open/run it! Yeah,
it's been a *realllly* long day... <g>

Thanks... Karl
--
.NET: It's About Trust!
http://vfred.mvps.org
Tom Lake
2007-02-27 21:28:48 UTC
Permalink
I have most versions of BASIC so if you'd like to send me one of the
programs,
I could try to find out which version it needs and send it back as an ASCII
file
which you could then load into any version.

Tom Lake
Karl E. Peterson
2007-02-27 21:46:14 UTC
Permalink
Post by Tom Lake
I have most versions of BASIC so if you'd like to send me one of the
programs,
I could try to find out which version it needs and send it back as an ASCII
file
which you could then load into any version.
Only if you promise not to laugh. (The code is nearly 20 years old, remember! <g>)

Hey, that'd be great. I've tried most that I have, and no luck yet.

Thanks... Karl
--
.NET: It's About Trust!
http://vfred.mvps.org
Dick Grier
2007-02-27 21:54:58 UTC
Permalink
Hi Karl,
Only if you promise not to laugh.
<<

I know what you mean. I cringe when I look at some of my old code (even
stuff I did just a few years ago, much less, 20. <g>

Dick
--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
Karl E. Peterson
2007-02-27 22:05:43 UTC
Permalink
Post by Dick Grier
Hi Karl,
Only if you promise not to laugh.
<<
I know what you mean. I cringe when I look at some of my old code (even
stuff I did just a few years ago, much less, 20. <g>
Yeah, makes a guy feel pretty vulnerable... <g>
--
.NET: It's About Trust!
http://vfred.mvps.org
Bob O`Bob
2007-02-28 00:50:36 UTC
Permalink
Post by Karl E. Peterson
Post by Tom Lake
I have most versions of BASIC so if you'd like to send me one of the
programs,
I could try to find out which version it needs and send it back as an ASCII
file
which you could then load into any version.
Only if you promise not to laugh. (The code is nearly 20 years old, remember! <g>)
Hey, that'd be great. I've tried most that I have, and no luck yet.
Does that include VB-for-DOS?

I seem to recall it was a little more more omnivorous than might be expected.
It was, in fact, an actual release of PDS.



Bob
--
Karl E. Peterson
2007-02-28 01:35:23 UTC
Permalink
Hi Bob --
Post by Bob O`Bob
Post by Karl E. Peterson
Hey, that'd be great. I've tried most that I have, and no luck yet.
Does that include VB-for-DOS?
I don't think I've tried that one. But Tom got it to load in QB 4.5, so there's
gotta be something wrong with how I've set that up. I'm trying to rerun the setup
now, but the friggin thing *insists* that I insert disks in A:! I've tried Subst,
using B: (A: isn't allowed), etc., etc., etc... No go. Ugh.
Post by Bob O`Bob
I seem to recall it was a little more more omnivorous than might be expected.
It was, in fact, an actual release of PDS.
Maybe I'll try that next. Man, I hate the thought of burning a half-dozen floppies.
Not even sure I can come up with that many!
--
.NET: It's About Trust!
http://vfred.mvps.org
Tom Lake
2007-02-28 02:04:32 UTC
Permalink
Post by Karl E. Peterson
Post by Tom Lake
I could try to find out which version it needs and send it back as an ASCII
file
which you could then load into any version.
Only if you promise not to laugh. (The code is nearly 20 years old, remember! <g>)
Hey, that'd be great. I've tried most that I have, and no luck yet.
I promise! After all, none of us was as good twenty years ago as we are
now!
(My wife may have a different opinion)

Tom Lake
Karl E. Peterson
2007-02-28 02:20:09 UTC
Permalink
Post by Tom Lake
Post by Karl E. Peterson
Post by Tom Lake
I could try to find out which version it needs and send it back as an ASCII
file
which you could then load into any version.
Only if you promise not to laugh. (The code is nearly 20 years old, remember! <g>)
Hey, that'd be great. I've tried most that I have, and no luck yet.
I promise! After all, none of us was as good twenty years ago as we are
now!
Kewl. Okay, "it's in the mail." If you have _any_ luck with it, I'd sure love to
hear about that! I've even tried reinstalling QB4.5, to no avail.
Post by Tom Lake
(My wife may have a different opinion)
Heh...
--
.NET: It's About Trust!
http://vfred.mvps.org
Loading...