Post Reply 
HP-45 Internal Pointer Operations
04-25-2023, 08:16 AM
Post: #4
RE: HP-45 Internal Pointer Operations
Thanks, Tony.

(04-24-2023 09:52 PM)teenix Wrote:  A constant has to be loaded into the C register for part of the calculation. However, at the start of the loading this value, when C = 09999999999006, the P register = 15, then decrements to 14 and so on until P=1 then the code segment is complete. The segment loop uses Load Constant 6.

Indeed. This is exactly where my code 'fell over' if I removed the the check in loadConstant, and prompted my question.

(04-24-2023 09:52 PM)teenix Wrote:  Yes, there are a few redundant instructions, but there might not have been a simple coding way around the P issue. My hat is off to the guys that wrote the original code with the ROM addressing limitations on the Classics. Try adding an instruction anywhere in the ROM code, and you'll see the mess that it can create.

When I wrote my first simulator, a couple of years ago, I created a disassembler in Excel so I could figure out how the byte contents decoded to instructions, and inevitably errors crept in the transfer over to code. That gave me a clear picture of (a) how beautiful the code is and (b) how 'unyielding' it is. The new simulator is being written because I wanted to get better at Python, but also because I wanted a better way to watch the code as it runs, winding its way through ROMs and bytes.

Thanks again,

Sarah
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP-45 Internal Pointer Operations - Z80Sarah - 04-25-2023 08:16 AM



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