HP Forums

Full Version: A Compiler for Pocket Calculators
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I obtained a printout of this memo several years ago. The fellow, Deane Blazie, created a cross-compiler to develop HP-65 code (printed) from a BASIC-like program. The cross-compiler was written in PL/1 and ran on a Burroughs B6700 computer at the University of Delaware. Very interesting.

Here is a link to the memo.

memo
(01-12-2017 07:44 PM)Don Shepherd Wrote: [ -> ]I obtained a printout of this memo several years ago. The fellow, Deane Blazie, created a cross-compiler to develop HP-65 code (printed) from a BASIC-like program. The cross-compiler was written in PL/1 and ran on a Burroughs B6700 computer at the University of Delaware. Very interesting.

Here is a link to the memo.

memo

It would've been much more useful if he had listed the BASIC version of the compiler. I remember back in '78 there was a BASIC program that translated real BASIC programs to TI-59's AOS. I extended it to allow nested loops and a few other things. It worked really well and now I wish I had never gotten rid of it!

Tom L
Tom, I don't think there was a BASIC version of his cross-compiler. He wrote it in PL/1. I don't know PL/1, but it would be interesting to see his code. I don't know why he didn't include it in the paper, perhaps there were legal reasons.
The article says a BASIC version was written for the HP 9830.
(01-15-2017 07:14 AM)NetMage Wrote: [ -> ]The article says a BASIC version was written for the HP 9830.

Oh, I didn't notice that; page 219. Thanks.
Quote:It would've been much more useful if he had listed the BASIC version of the compiler. I remember back in '78 there was a BASIC program that translated real BASIC programs to TI-59's AOS. I extended it to allow nested loops and a few other things. It worked really well and now I wish I had never gotten rid of it!

Tom L

Hi Tom, I've found a TI-59 compiler : http://www.claudiolarini.altervista.org/bax59.htm
It can handle nested loops. So far I've not seen any source code.

Marc.
(01-15-2017 09:59 PM)Marc van Lemmen Wrote: [ -> ]... So far I've not seen any source code...

Try appendix C [pg-110] from this url:
Design and Implementation of a Basic Cross-Compiler and Virtual Memory Management System for the TI-59 Programmable Calculator.
the source reference.

BEST!
SlideRule
Hi all,

I thought I might have a go at one so I uploaded a simple basic compiler for the HP-65 - available at teenix.org.

It bound to have a bug or two as it is hard to traverse the maze of twists and turns the software could take depending on what source code is entered.

Two files are created, one that is compatible with the CCE33 HP65 emulator and a text file as shown below.

As a simple example

loop(A, 3) // Label A - loop 3 times
a=a+1 // just increment reg a
endloop
b=a+(2*c+LN(23.5)*e)/2 // fancy calculation
stop

Output...

1. 3
2. STO 8
3. LBL
4. A
5. RCL 1
6. 1
7. +
8. STO 1
9. g
10. .
11. GTO
12. A
13. RCL 1
14. 2
15. RCL 2
16. *
17. 2
18. 3
19. .
20. 5
21. f
22. 7
23. RCL 3
24. *
25. +
26. 2
27. /
28. +
29. STO 4
30. R/S

cheers

Tony
Reference URL's