The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
HP-45 Internal Pointer Operations
04-24-2023, 06:10 PM (This post was last modified: 04-24-2023 08:12 PM by Z80Sarah.)
Post: #1
HP-45 Internal Pointer Operations
(Slightly embarrassed to have to edit my first ever post, but I thought to check the original HP patent 4,001,569 after I'd submitted this post, and the answer is on page 24: the loadConstant operation does, indeed, skip loading the constant (but not decrementing the pointer) if the pointer is greater than 13.)

Hi,

tl;dr: Does the internal pointer carry values between 0 and 15, requiring a check for a value < 14 in the loadConstant operation or does it only hold values between 0 and 13, with no need for that check? Either answer seems curious.

Full version: I'm in the process of rewriting a previous HP-45 simulator of mine in Python (I'll post when it's done) and have a slightly abstruse question about the internal pointer. The pointer is used to point to the 14 nibbles of the internal registers, which are numbered 0 to 13. One operation which makes use of this is loadConstant, which puts a given value into the C register at a nibble determined by the pointer, and then decrements the pointer. My existing code (which works fine) has a couple of things going on with the pointer operations:

(1) if a decP operation is carried out on a pointer value of 0, the pointer is set to 15
(2) If a incP operation is carried out on a pointer value of 15, the pointer is set to 0
(3) If a loadConstant operation is attempted with a pointer value > 13, the load is skipped (but the pointer is still decremented).

I'm uncomfortable with (3), because it's in-effect adding an additional operation into the calculator: it should just perform the loadConstant, with no checks on the pointer value. The actual ROM code performs no such check elsewhere (i.e. to make sure that the pointer is < 14 before a loadConstant is even called).

Changing (1) and (2) would be an option, so that the pointer
'looped' to 13 on a decP on 0, and to 0 on an incP on 13. This seems neater (and reduces the number of operations required per calculator function), but also seems like odd behaviour for a 4-bit pointer.

Does anyone have any ideas?

(Also, first post, so a warm "hello" to everyone, too.)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP-45 Internal Pointer Operations - Z80Sarah - 04-24-2023 06:10 PM



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