A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.
I recently began work on a side project involving "modernizing" an old program written in 1984. I didn't know what language it was written in, how it was used, or if there was even any human-readable source available; but, as is characteristic of a young (24) programmer fresh out of the University "green house," I was optimistic that, aided by the mighty oracle at Google, I would demystify this little understood program, for the output of which the owners had to keep an old dot-matrix printer around.
Upon first glance, the program appeared to be written in Basic; the famously misspelled BASICA.exe and several .bas files presented themselves as evidence. "Great," I thought. "Basic is an interpreted language, so I should be able to pour over the source to understand the program with a little testing."
Aside from small hurtles, setting run paths, downloading and installing the wild "blue" yonder of QBasic 4.5, I was humming right along. Until I opened the source files.
Nothing. Nothing aside from some string comments made by the original programmer were visible, yet the file took up 56 Kb on my hard drive. I pulled out my trust Swiss Army Knife TextPad, hoping its robust capabilities would reveal the hidden text QBasic was adverse to showing.
It did somewhat better, showing me variable names, looping constructs, and some assignment statements, but multitude of null characters littered the screen. What's more, Textpad wouldn't let me copy any of the text, due to the null characters.
After a little poking around, I thought that maybe (perhaps out of Basic ignorance ;) ) this file had been written on a system using an EBCDIC charset. Armed with this hypothesis, I set out to convert the file into ASCII, something which (I thought) TextPad could display as readable to me.
Not so much luck. The ASCII conversion from http://www.iconv.com/asciiebcdic.htm produces something slightly less helpful to me than ancient Sanskrit:
ÿ)ŽÉ€€€€€€¯¼¹¾¾µ>€²`š€¦/¼`€Á€¯¹¾¸¼?ÁŒ€ %%€ª¹·¸¾½€ªµ½µ¼Àµ´ dŽ’€€¢!(&+ (¤„X‚€€€€€€€€€€€©(¨Œ€¨>³‚ kŽ„€€]¤ª!
X âŽ€€f€¤„ˆ‰€šÉR!&¤ª ¬¨!+€£¤«¢ª¨&¬¨!+ PŽ˜€€f€£¨ ˆ‰€šÉR£¨ (¤¬¤ª 1Ž¡€€f€¥¤¤£ˆ‰€šÉR¥¤¤£ ‡<€€f€<¤+¦¢¬ˆ‰€šÉR<¤+¦¬§€!¥€¢¬ ®€€f€¯¨£¬§¬!!<ˆ‰€šÉR¬!!<€¯¨£¬§ ´-€€f€«ª¥¬(¨+
I submit these things for your consideration, ladies and gentlemen. Can anyone give me clue as to how I can work with these files?
Sunday, August 10, 2008
Yup, sounds like they're "tokenized" basic files.
will save them as the ascii equivalents, and you can work on them from there.
Sunday, August 10, 2008
During those times, you could save your BASIC source code files in binary form or ASCII form (up to VB3, VB4 I think). If it was saved in binary, you could open it in a text editor but it would give a byte textual representation. I suspect this file was saved in binary form.
Monday, August 11, 2008
Interesting. Is there more information about this "binary" format?
What is it really?
Is there a file format definition?
Thursday, August 21, 2008
This topic is archived. No further replies will be accepted.Other recent topics
Powered by FogBugz