Synthetic Programming, by William C. Wickes (with additions by Gene Wright)

Back to main page If this is useful to you, Email me: Genewright143@hotmail.com


New users of the HP-41 and indeed many experienced users, will be surprised to encounter program lines that they do not recognize. "STO M" and "RCL b", for example, can not be found in the HP-41 Owners Manuals; yet they are well defined, quite executable and useful functions. They can be assigned to keys, recorded on cards, etc.--in short, they possess all the properties of "normal" functions. These new functions are called "synthetic" functions, because they are created in the calculator memory by synthesizing together combinations of program bytes that can't be obtained with ordinary keystrokes. A "RCL b" is the result of combining the "RCL" prefix with the "b" postfix (as normally found in a "LBL b").

"Synthetic Programming" simply refers to any use of synthetic functions in HP-41 programming. Stated most concisely, the synthetic program lines constitute an extension of the normal HP-41 function set. Their usefulness depends on the particular application, and on the programmer's creativity--just like any other function. If a programmer doesn't have a use for the "LN" function, he doesn't really care whether it's available. But if he needs it, there's no substitute for it. The same applies to synthetic functions. They perform certain operations--if you can use them, they're great; if you can't, you can forget about them.

The applications of synthetic functions fall into two general categories: program enhancement and user-machine interaction.

For program enhancement, synthetic functions perform certain tasks faster than normal functions, and other tasks that normal functions can't do at all. For example, the function "STO M" stores the number from the X-register into the first 7 positions of the alpha register. It turns out the alpha register is actually made up of 4 memories. If you have a program that doesn't use the alpha register, you can use 3 of the 4 alpha register memories as data memories very easily by the synthetic instructions STO M, STO N, STO O and RCL M, RCL N, and RCL O, as well as register arithmetic, indirect addressing, and exchanges. (The fourth alpha memory, register P, has a few restrictions on its use). Using these instructions would then free up 3 normal data registers and might mean the difference between being able to fit that program into the HP- 41's memory and not being able to. Accessing these data memories is faster than accessing the numbered data registers when executed during a program too. This also includes the availability of over 100 new tones with variations in duration of the tone and six new frequencies. This has allowed the creation of a program that play's Bach's Toccata and Fugue in D Minor or a series of beeps that sound like Phasers firing, for example.

The second class of application is in user-machine interaction. An example is synthetic key assignments, where multi-keystroke operations such as GTO IND X (5 keystrokes) can be assigned to a key for single keystroke execution or program entry. The list of examples of applications for synthetic programming is too long for description here.

The techniques of creating synthetic instructions, which execute on ALL HP-41's, have gone through considerable evolution. The present state-of-the-art is represented by the GASN (Generalized Assign) and the LB (Load Bytes) programs presented elsewhere.

A user wanting to learn more about synthetic programming should probably buy a book. Several are available VERY cheaply from Educalc (1-800-677-7001). A good one to get is "Extend Your HP-41" by Wlodek Mier-Jedrzejowicz, item # 621. It's only $6.95 plus shipping and is a great 700 page reference and includes the GASN program among others.


Visitors since 6/10/97