Unusual QuickBasic problem 
Author Message
 Unusual QuickBasic problem

   I've got a friend (no, really!) who is having an interesting little
problem with some Microsoft QuickBasic programs that were saved in
binary quick load format.  I'm stumped and hoping that the net can
come through with a solution.

   In short:  A programmer saved half of the modules in his program
in ASCII and half in binary.  While it's bizarre, it wasn't causing
troubles until he 'put' these files into a version control system.
Now he can't get the binary files to load into QBX and all work has
come to a halt.

   If you're intrigued and think you might have an answer, here is
the original mail message he sent me with more details.  Thanks in
advance for any help you can give.

-----   (detailed explanation of the problem)

The scenario: One of the programmers at work did a lot of coding in the QBX
environment.  For some reason, he saved some of the files as ASCII and some
in QBX's binary quick load format.  All was well until he 'put' these files
into PVCS (Polytron Version Control System).  Now, the code saved as ASCII
can be read from PVCS and edited as before, but the code saved in QBX binary
format can be read from PVCS but will no longer load into QBX!  When you try,
you get an 'Invalid File Format' error.  The PVCS people have no explanation
for this and Microsoft was no help either.

The problem: The affected modules cannot be modified since QBX cannot read
them anymore and none of the other modules can be modified because the program
won't compile anymore!

The investigation: I saved three different modules from QBX in binary format
(they were created as ASCII files) and printed out the DEBUG display for
addresses 0100(h) - 01FF(h).  It turns out that only the following addresses
are different - 0114, 011B-011C, 0129-012A, 014B-014C, 016F-0170, and 0177.
Their values do not, however, make any obvious sense, ie. no obvious
correlation to file size, creation date, etc.  However, when I changed these
locations in FE018-03.BAS (one of the problem modules), I no longer got the
above message.  Now it gets to 'Loading and Parsing', but then it hangs up
and requires the 3-fingered salute.

The question: Will the person or persons on the Internet who know what the
QBX binary header format is tell us?

-------------  
Brett Coryell                When I get my peace of mind
U. of VA, CS Dept            I'm gonna give you some of my good time.



Fri, 31 Jan 1997 04:04:22 GMT  
 Unusual QuickBasic problem


Quote:
>    I've got a friend (no, really!) who is having an interesting little
> problem with some Microsoft QuickBasic programs that were saved in
> binary quick load format.  I'm stumped and hoping that the net can
> come through with a solution.

>    In short:  A programmer saved half of the modules in his program
> in ASCII and half in binary.  While it's bizarre, it wasn't causing
> troubles until he 'put' these files into a version control system.
> Now he can't get the binary files to load into QBX and all work has
> come to a halt.

Other than get the exact format of the binary load files,
then translating them back into ASCII, then doing thing right,
no.

This is a classic case for having good practices.
The PVCS system is not to blame - the programmers bad practices are.

First solution: fire the programmer.
He should have been making backups, at a very minimum.
And saving anything in non-ascii format is a crime against nature.
He will not do anything so brain-dead again.

Are there any backups or text listings?

For those who followed the previous thread between
Martin and myself (bandit), take this as a zen-like example of
what happens when you do not have good practices.
This guy's practices have affected a complete project with
(apparently) several people on it.

Worst case .. my rates are quite reasonable.

... bandit

--
bandit                              systems and embedded engineering
topdown design associates           "Waltzing where mere mortals fear to look"

(408) 458-9228



Fri, 31 Jan 1997 05:08:28 GMT  
 Unusual QuickBasic problem
When the files where transfered, did your friend remember to specify
binary file transfer (as opposed to ASCII)? If he didn't, the computers
would automatically try to format it to ASCII as it was transferred, and
use all of the ASCII file rules (such as ending at Ctrl-Z)... Most likely
thats what mangled the binary files.

Paul
====



Sat, 01 Feb 1997 10:40:09 GMT  
 Unusual QuickBasic problem

Quote:
>When the files where transfered, did your friend remember to specify
>binary file transfer (as opposed to ASCII)?

   I checked on this and the answer is yes, he did specify binary file
transfer.  It remains a mystery to all involved.  Microsoft is not
being much help and their office is slowly coming to a halt.

   Can anyone tell me where I can find the format for these binary files
in QuickBasic?  The modules "lost" are quite large and nobody wants
to have to rewrite them.  

Brett

-------------  
Brett Coryell                When I get my peace of mind
U. of VA, CS Dept            I'm gonna give you some of my good time.



Sun, 02 Feb 1997 21:22:21 GMT  
 Unusual QuickBasic problem

Quote:



>>    In short:  A programmer saved half of the modules in his program
>> in ASCII and half in binary.  While it's bizarre, it wasn't causing
>> troubles until he 'put' these files into a version control system.
>> Now he can't get the binary files to load into QBX and all work has
>> come to a halt.

>Other than get the exact format of the binary load files,
>then translating them back into ASCII, then doing thing right,
>no.

   This is what I'm asking for.  Can anyone say where I can find this
information?

Quote:
>This is a classic case for having good practices.
>The PVCS system is not to blame - the programmers bad practices are.

   I agree almost entirely.  Having never used PVCS I don't know whether
it's supposed to be able to handle binary files and if so, whether you
have to specify some special switch.  If it can handle binary files and
*if* it did mangle these QB modules then it must share the blame.  Of
course, the burden is on the programmer to know what PVCS can and cannot
do.

Quote:
>First solution: fire the programmer.

   This fixes the cause of the problem and is a long term solution.
It does not get them out of the mess they are currently in.  

Quote:
>And saving anything in non-ascii format is a crime against nature.

   I tend to agree.  Saving in non-ascii doesn't buy you anything and
opens you up to this kind of problem.  

Quote:
>He should have been making backups, at a very minimum.
>He will not do anything so brain-dead again.
>Are there any backups or text listings?

   As I've gathered more info about this problem I found out that the
programmer who put these things into PVCS in binary mode was, indeed,
fired about a month ago.  It seems that he won't be doing anything
brain dead again (at least for this company).

   I asked about the possibility of sabotage but they seem to be able
to reproduce the problem independently.  When this guy left the company
he put the current version of his work into PVCS and considered it to
be the backup.  I haven't asked about text listings but I do know that
the machine this guy used has been formatted and had a new operating
system installed in the mean time.

   Once again, it's a bad situation that probably should never have
come up.  At least one person in the office is at a standstill and
others are waiting for this code at least part of the time.  Right now
they're looking to fix the problem, not the blame.  If anybody knows
where to find the file format for binary load files in QuickBasic, I'll
pass it on and you can rack up some good karma.

Thanks,

Brett

-------------  
Brett Coryell                When I get my peace of mind
U. of VA, CS Dept            I'm gonna give you some of my good time.



Sun, 02 Feb 1997 21:47:07 GMT  
 Unusual QuickBasic problem
PVCS (and all other SCCS systems I've run across) work only on text files,
since they store version change information into a big text file.  SCCS
on Unix stores (I think) as a series of edit commands, that goes from one
version to another.  PVCS may be the same.


Mon, 03 Feb 1997 01:48:18 GMT  
 Unusual QuickBasic problem


          (S. Brett Coryell) writes:

Quote:

> >When the files where transfered, did your friend remember to specify
> >binary file transfer (as opposed to ASCII)?

>    I checked on this and the answer is yes, he did specify binary file
> transfer.  It remains a mystery to all involved.  Microsoft is not
> being much help and their office is slowly coming to a halt.

>    Can anyone tell me where I can find the format for these binary files
> in QuickBasic?  The modules "lost" are quite large and nobody wants
> to have to rewrite them.  

> -------------  
> Brett Coryell                When I get my peace of mind
> U. of VA, CS Dept            I'm gonna give you some of my good time.


The only thing I can think of is to write sample programs,
very simple ones,
and examine the binary save output.
They do not even need to run, just be legal syntax.
Then change a statement and look at the resulting differences.
Most of these things use one-byte opcodes for the keywords.
I don't know how variables are handled; sometimes as
indexes into arrays.

You might also check wit the PVCS folks.
I think it's weird that the binary files got munged,
unless the guy first checked them in, then out,
throwing away the original files (by overwriting them).
You might be able to "reverse engineer" the PVCS save sequence,
thus leaving (as a second-order effect) the original files.

If the company re-formatted this guy's system,
then they REALLY desserve what they have.
Again, my rates are reasonable, but I would have a special rate
just for this client ...

... bandit

--
bandit Gangwere                     systems and embedded engineering
topdown design associates           "Waltzing where mere mortals fear to look"

(408) 458-9228



Mon, 03 Feb 1997 15:19:35 GMT  
 Unusual QuickBasic problem

Quote:



>>>    In short:  A programmer saved half of the modules in his program
>>> in ASCII and half in binary.  While it's bizarre, it wasn't causing
>>> troubles until he 'put' these files into a version control system.
>>> Now he can't get the binary files to load into QBX and all work has
>>> come to a halt.

>>Other than get the exact format of the binary load files,
>>then translating them back into ASCII, then doing thing right,
>>no.

[...]

Hmm...so part of the file is ASCII and part is Binary.  Could you
use a text editor (or other file editor) and extract the ASCII
parts, saving them as separate files, and seeing if QB can read
the leftover binary parts?  If the appropriate headers are in there,
or if it's just a tokenized-type of file type, it might work, I dunno.
It's a longshot, but ya never know....

include stddisclaimer

White Flame



Mon, 03 Feb 1997 23:49:37 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Unusual (I think) Access problem

2. Deployed Workstations having unusual problems

3. Unusual problem with Printform?

4. Unusual/Interesting VB6/XP problem

5. Unusual Problem

6. Unusual problem with setup1.exe

7. Unusual problem with Printform?

8. Unusual COM Release Problem

9. Unusual problem with printform?

10. Unusual problem with Printform?

11. Unusual Problem !!!!! w/NT4 and Shutdown

12. converting quickbasic code to ascii, or vb, or anything besides quickbasic

 

 
Powered by phpBB® Forum Software