Post Reply 
HP-12CP Programming - Multiple programs
01-05-2023, 04:44 AM
Post: #1
HP-12CP Programming - Multiple programs
So I currently have more than one program in my 12CP's memory, how can I delete a row (an instruction?) or remove an entire program?

For example I have the first program that is the 70 PI digits calculation code provided by the forum, the program occupies lines 001 to 071. Then I have other programs with different sizes after that.

Now I want to remove the second program that occupies lines 072 to 086. How to do that and what happens to the empty space between the remaining programs (if any?).

Thank you.

HP-12C Gold / HP-12C Platinum
Find all posts by this user
Quote this message in a reply
01-05-2023, 07:12 AM (This post was last modified: 01-05-2023 08:22 AM by ThomasF.)
Post: #2
RE: HP-12CP Programming - Multiple programs
Hi,

With the 12C the program editing support is very sparse, eg. there is no insert or delete in programming mode.

This means that you can enter an instruction on a line, but you can't move or delete it, and you can only replace it by writing a new instruction on the same line (replacing the old one).
Note that when entering an instruction, ONLY that line is changed (ie replacing the old instruction on that line), no other lines are changed or moved (like on the HP41 where entering an instruction will insert that instruction and move all following instruction up one line in memory).

So, if you have entered a program in line 072 to 086, you can't move it, you can only do that by manually typing in the same program in a new position (replacing something else).

The only way to remove that second program is to clear that part of the program memory (remember that "Clear PRGM" will erase the complete memory).

So to erase just line 072-086 you have to do that manually in programming mode:

1: Goto line 072:
(a) If in Run-mode, type "GTO 072" then enter Program mode ("P/R")
(b) Or if already in Program mode, type "GTO . 072" (notice the dot) to goto line 072.
2: Clear or replace program:
(a) Enter "GTO 000" on each line (eg 072-086) to clear that memory
(b) Or enter new instructions to replace the old program.

There is no way to move an instruction from one location to another.

(Edit: updated instruction line numbers, since 12CP handles more then 99 lines.)

Cheers,
Thomas

[35/45/55/65/67/97/80 21/25/29C 31E/32E/33E|C/34C/38E 41C|CV|CX 71B 10C/11C/12C/15C|CE/16C 32S|SII/42S 28C|S 48GX/49G/50G 35S 41X]
Find all posts by this user
Quote this message in a reply
01-05-2023, 07:52 AM
Post: #3
RE: HP-12CP Programming - Multiple programs
@thomasF:

Thanks, so it seems that there will be a lot of "unused" space in the calculator's program memory as I can't reclaim the empty lines.

Fortunately I decided to buy the 12CP first so there's still room for the programs thanks to its larger memory (400 vs 99 on the gold version).

HP-12C Gold / HP-12C Platinum
Find all posts by this user
Quote this message in a reply
01-05-2023, 08:20 AM
Post: #4
RE: HP-12CP Programming - Multiple programs
Yes, since the 12C has no labels and only absolute addressing, it is quite cumbersome to use with multiple programs (always have to remember the line number for each program), and make sure that changes don't overwrite other code.

But, empty blocks of lines could always be used for patches (if original program needs to be updated or expanded).
Unfortunately subroutines are not available, but patches could be used as describe on page 113 in the 12CP manual (http://h10032.www1.hp.com/ctg/Manual/bpia5309.pdf).

Cheers,
Thomas

[35/45/55/65/67/97/80 21/25/29C 31E/32E/33E|C/34C/38E 41C|CV|CX 71B 10C/11C/12C/15C|CE/16C 32S|SII/42S 28C|S 48GX/49G/50G 35S 41X]
Find all posts by this user
Quote this message in a reply
01-05-2023, 09:15 AM (This post was last modified: 01-05-2023 09:16 AM by lvt.)
Post: #5
RE: HP-12CP Programming - Multiple programs
(01-05-2023 08:20 AM)ThomasF Wrote:  But, empty blocks of lines could always be used for patches (if original program needs to be updated or expanded).
Unfortunately subroutines are not available, but patches could be used as describe on page 113 in the 12CP manual (http://h10032.www1.hp.com/ctg/Manual/bpia5309.pdf)

Yes if the patch fits.

Personally I have to use a spreadsheet with 400 rows to manage my 12CP's memory. Anything present in the memory is saved and commented on the spreadsheet for reference.

It's hard to believe that they expanded the memory without providing a method to move the code around.

HP-12C Gold / HP-12C Platinum
Find all posts by this user
Quote this message in a reply
01-05-2023, 02:32 PM
Post: #6
RE: HP-12CP Programming - Multiple programs
Labels and subroutines would have been helpful.
Visit this user's website Find all posts by this user
Quote this message in a reply
01-05-2023, 03:22 PM
Post: #7
RE: HP-12CP Programming - Multiple programs
(01-05-2023 02:32 PM)Eddie W. Shore Wrote:  Labels and subroutines would have been helpful.

Is it possible with keystroke programming?

HP-12C Gold / HP-12C Platinum
Find all posts by this user
Quote this message in a reply
01-05-2023, 03:29 PM (This post was last modified: 01-05-2023 03:29 PM by Didier Lachieze.)
Post: #8
RE: HP-12CP Programming - Multiple programs
(01-05-2023 03:22 PM)lvt Wrote:  
(01-05-2023 02:32 PM)Eddie W. Shore Wrote:  Labels and subroutines would have been helpful.

Is it possible with keystroke programming?

Sure, the HP-11C, the scientific model introduced with the HP-12C, has both.

Note: a nice tool on the hpmuseum is the Calculator Comparison.
Find all posts by this user
Quote this message in a reply
01-05-2023, 10:56 PM
Post: #9
RE: HP-12CP Programming - Multiple programs
And here is to help save your programs: https://www.hpmuseum.org/forum/thread-10524.html

Thibault - not collector but in love with the few HP models I own - Also musician : http://walruspark.co
Find all posts by this user
Quote this message in a reply
01-06-2023, 04:25 AM
Post: #10
RE: HP-12CP Programming - Multiple programs
(01-05-2023 03:29 PM)Didier Lachieze Wrote:  
(01-05-2023 03:22 PM)lvt Wrote:  Is it possible with keystroke programming?

Sure, the HP-11C, the scientific model introduced with the HP-12C, has both.

Note: a nice tool on the hpmuseum is the Calculator Comparison.

That's nice, hope they include this feature on the 12C in the next version (12C Diamond?) Big Grin

HP-12C Gold / HP-12C Platinum
Find all posts by this user
Quote this message in a reply
01-06-2023, 04:35 AM
Post: #11
RE: HP-12CP Programming - Multiple programs
(01-05-2023 10:56 PM)pinkman Wrote:  And here is to help save your programs: https://www.hpmuseum.org/forum/thread-10524.html

Thanks a lot, wow it even works with Gnumeric on my Linux laptop !!!

HP-12C Gold / HP-12C Platinum
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)