HP Forums
HP BASIC (Series 200/300): Detokenizer - Printable Version

+- HP Forums (http://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: HP BASIC (Series 200/300): Detokenizer (/thread-9094.html)



HP BASIC (Series 200/300): Detokenizer - Michael Fehlhammer - 09-16-2017 11:22 PM

I received a question from a person who has some floppy disks containing HP BASIC programs; He wonders wether it is possible to read these programs on a modern PC.
The first problem can easily be solved: A program like HPDir or the old LIF Utils can help to copy the files from LIF to FAT (DOS) formatted disks.
But then: The Basic programs normally were not saved in ASCII - Format, but in tokenized PROG format.
So the question is: Is there a de-tokenizer program available ( for free, preferably) that translates HP series 200/300 BASIC (version 5 or 6) programs into simple ASCII text? I faintly remember that I read about such a tool, but where?


RE: HP BASIC (Series 200/300): Detokenizer - Paul Berger (Canada) - 09-17-2017 12:16 AM

If you have a 200/300 system available load the program then use the "SAVE" command to write it out to disk, this saves the program as ASCII text.

Paul.


RE: HP BASIC (Series 200/300): Detokenizer - Michael Fehlhammer - 09-17-2017 10:52 AM

@ Paul:
Yes, of course, I could do that as I have got working HP 300 series systems; but I am looking for a solution for people who have no (more) access to vintage hardware ( only some old floppy disks).

@ Mike:
Using an emulator is a good idea. I just have read that the emulator for series 200 machines by Olivier De Smet supports (boots) BASIC up to version 5.0. The floppy disks that should be translated probably were used on a (much) more modern 9000/375; I am afraid at least BASIC 6.2 was in use at that time.
Does anyone know of a series 300 emulator, or whether Olivier plans to develop further his emulator? On the real 9836 machine you can use BASIC 6.2 as well.
Maybe BASIC 6.x just hasn't been tested yet on Olivier's emulator. Did anyone try this out meanwhile? The latest information I found about the emulator dates from beginning of 2011. Maybe BASIC 6.2 wasn't easily available for download at that time.


RE: HP BASIC (Series 200/300): Detokenizer - Martin Hepperle - 09-18-2017 03:24 PM

There is a detokenizer for the Integral Technical Basic at
http://insar.stanford.edu/~lharcke/programming/
which could be useful for starting. But one would also need a means to read the LIF formatted floppy disk.

The best way is probably, as already mentioned, to go through a SAVE statement using the real thing or printing to a laptop via a serial interface.

Martin


RE: HP BASIC (Series 200/300): Detokenizer - Michael Fehlhammer - 09-21-2017 12:06 AM

@ Mike:
I found a download source for Olivier's emulator; just google "Smet 9836 emulator". But I didn't test it yet.
@ Martin: Thanks for the link. I am not sure whether HP-UX Technical BASiC uses the same file formats and BASIC tokens as Workstation BASIC?
The guy who wants his old BASIC programs transformed into ASCII text didn't get back to me. So it seems it's not that important for him. Since I could use SAVE on vintage hardware for that purpose, I won't investigate that any further.
Thank you guys for your hints!


RE: HP BASIC (Series 200/300): Detokenizer - vassilisprevelakis - 11-02-2017 02:13 PM

(09-18-2017 03:24 PM)Martin Hepperle Wrote:  There is a detokenizer for the Integral Technical Basic at
http://insar.stanford.edu/~lharcke/programming/
which could be useful for starting. But one would also need a means to read the LIF formatted floppy disk.

I am not sure about the integral detokenizer, but the HP-85 and HP-87 are more works in progress. They can identify the tokens, but the arguments are left as an exercise to the reader.

So you'll get something out of the program, but it will not be a listing that you can feed to another BASIC system.

I too tried to fix this, but its a lot of work, and as Martin pointed put, you just feed it to an (emulated) computer and get the listing.

**vp