[comp.sys.handhelds] 41-CV synthetic programming

mueller@schaefer.math.wisc.edu (Carl Mueller) (12/11/90)

While we're at it, I have a HP-41cv (that has been gathering dust for
quite some time).  An acquaintance of mine several years ago told me about
this neat "synthetic programming" thing that could be done on the 41.  It
looked interesting, but pretty involved.  At this point, I'm more
interested in programming, so can anyone direct me to info on synthetic
programming on the HP-41?

Thanks in advance.

Carl Mueller (mueller@math.wisc.edu)

dex@hpcvlx.cv.hp.com (Dex Smith) (12/12/90)

There are several books available for the HP-41, synthetic and otherwise.  
Check your local university bookstore or try the EduCALC catalog.  
Here's EduCALC's customer service number:

                            (800) 677-7001

- Dex Smith
  Interface Technology Operation
  Hewlett-Packard Company


     NOTE:  Synthetic programming is not supported by Hewlett-Packard.

marjo@hpindda.cup.hp.com (Marjo Mercado) (12/21/90)

What is synthetic programming?

Thanks,

Marjo Mercado
(408) 447-2826

umapd51@cc.ic.ac.uk (W.A.C. Mier-Jedrzejowicz) (12/23/90)

>What is Synthetic Programming?

Wow! What an opportunity to go into the history of HP handhelds, user
clubs, and other topics. I expect that several people will
answer this one but I could not let the chance go by.
WARNING: This is a fairly long message.

What it is: Early HP calculators stored programs as sets of
instructions, where each instruction was exactly the same length. Later
models, especially the HP-41C, 41CV and 41CX, stored some instructions
as one byte (a number from 0 to 255) and others as two or more bytes.
For example the simple instruction to calculate a sine is called SIN and
is stored in a program as the number 89. For a second example, the
instruction to fetch a number from storage register 50 is called RCL 50
and is stored as the TWO numbers 144 (for RCL) and 50 (for register 50).
OK, so each instruction that was made up of two or more bytes was
checked before it was stored in a program. You could, for example, type
TONE 0 through TONE 9 (ten different sounds), but you could not have
TONE 10 or any higher TONE. You could have RCL 00 through RCL 99 but not
RCL 102. You could have labels identified by numbers 00 through 99 or
letters A through J or letters a through e, but not identified by other
letters. And so on.

Synthetic programming was a collection of methods used to "synthesize"
instructions such as TONE 50 or RCL 104 or LBL X which were not
permitted by the normal rules, but which could be stored and used in
programs by devious means. The extra TONEs simply provided extra notes,
which could be extremely useful in games programs, morse code
generators, or for providing an extended range of audible feedback for
blind users. RCL instructions provided a few extra storage registers but
also opened techniques for doing binary operations, synthesizing strings
of characters that could not be entered from the keyboard, and accessing
the operating system. It was this last which was the most exciting.

The name Synthetic Programming (or just SP) was used as well for
creating unusual text strings, and assigning instructions to keys (the
HP-41 calculators allowed keys to be redefined, but provided only a
limited range of key definitions - STO could be assigned to a key, but
STO 99 could not - SP allowed this to be done). It allowed programs to
be faster, shorter, to do things that were otherwise impossible, even to
contain self-modifying code (the ultimate for some computer lovers).

HP did not support Synthetic Programming, for various reasons - largely
because they did not have the support staff to answer all questions. SP
was developed and supported by the user clubs, especially through the
journal of PPC. Several books were written about it. The first, and in
many ways still the best, was "Synthetic Programming on the HP-41C" by
Dr. Bill Wickes - who was subsequently employed by HP and who now
designs marvellous things such as the HP28 and HP48, and writes books
about them too. A second book by Keith Jarett called "HP-41 Synthetic
Programming Made Easy" did just that, and introduced some new ideas.
Other books referred to SP as well - the "HP-41/HP-IL System Dictionary"
by Cary Reinstein and "Calculator Tips and Routines - Especially for the
HP-41C/CV" edited by John Dearing used SP extensively. My own book,
"Extend Your HP-41", repeated a lot about SP and introduced ways to use
it with the Extended Functions. Jeremy Smith's "The HP-41 Synthetic
Quick Reference Guide" provided a mass of information for the SP user
and also for general use of the HP-41. Most of these books are still
available, for example via EduCALC who are often mentioned in
comp.sys.handhelds.

SP led to more detailed studies of the HP-41 still, including use of its
machine language. This was pioneered largely by Australian users, and
described in their journal "Technical Notes", marvellously edited by
John McGechie. Books on this topic appeared too. Two HP-41 plug-in
modules made entry of synthetic instructions easy by allowing them
direct from the keyboard - these were the Zenrom and the CCD Module -
still on sale as well. The ideas of SP were used on other HP handhelds
too, but the questioner referred to the HP-41CV so I have kept to that.

SP was largely superseded when HP released the HP-71B and provided full
internal documentation so that users could write HP-71 machine language
programs without the need for many extra discoveries. A translator
module written by Bill Wickes allowed HP-71 users to run HP-41 programs,
but SP instructions were not accepted by this translator. When the HP-41
Emulator was released for the HP48, some people asked if SP would be
allowed by this emulator. Only a very limited number of SP instructions
are accepted, but more could be added if there were sufficient
interest! The authors wonder just how much interest there is ;-)

I repeat that Synthetic Programming is NOT supported by HP. Please
do not bother them about it. Information is available in the books
mentioned, and from the clubs. The British club continues to support SP
in its 8-times-a-year journal DATAFILE - members all over the world
receive this journal.

This message is already too long! If you want further information, let
me know or post another question on comp.sys.handhelds. If you want to
ask me something, please note that email is disrupted at Christmas, and
that my EARN/BITNET address (MIER@SPVA.PH.IC.AC.UK) is more robust than
my uucp address.

Wlodek A.C. Mier-Jedrzejowicz, Space & Atmospheric Physics, Imperial
College, London
Disclaimer: This is a historical discourse, coloured by my rose-tinted
spectacles, no doubt. It does not necessarily represent the opinions of
nor any undertakings by HP, Imperial College, Zengrange, or EduCALC.