HP Forums
A Compiler for Pocket Calculators - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: A Compiler for Pocket Calculators (/thread-7562.html)



A Compiler for Pocket Calculators - Don Shepherd - 01-12-2017 07:44 PM

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


RE: A Compiler for Pocket Calculators - toml_12953 - 01-13-2017 01:16 AM

(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


RE: A Compiler for Pocket Calculators - Don Shepherd - 01-13-2017 02:57 AM

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.


RE: A Compiler for Pocket Calculators - NetMage - 01-15-2017 07:14 AM

The article says a BASIC version was written for the HP 9830.


RE: A Compiler for Pocket Calculators - Don Shepherd - 01-15-2017 01:40 PM

(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.


RE: A Compiler for Pocket Calculators - Marc van Lemmen - 01-15-2017 09:59 PM

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.


RE: A Compiler for Pocket Calculators - SlideRule - 01-16-2017 02:26 AM

(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


RE: A Compiler for Pocket Calculators - teenix - 01-24-2017 06:41 AM

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