Post Reply 
Early (earliest?) HP-41C find.
08-01-2018, 05:43 PM (This post was last modified: 08-01-2018 05:44 PM by hth.)
Post: #14
RE: Early (earliest?) HP-41C find.
This was a great find of archeology!

Like Didier pointed out, PATCH5 was added to correct the DEL function with 000. The D ROM obviously has this bug.

The packing of I/O area was changed and the old code looks wrong. There are two cases here, either the buffer has been marked unused (nibble 13 equal to 0), or it is to stay (same nibble non-zero, but not 15). In the delete case, the buffer is removed correctly as far as I can see, but the keep variant treats the buffer as being one register longer than the size indicates. This means it will move one register too many and probably cause issues as it will lose synchronization with the buffer headers.

The code in E version is greatly simplified and does it right.

Or perhaps more likely, the copy code is actually correct and the removal code is wrong! It could be that HP initially intended the buffer size to be minus one, which would make some sense as a zero buffer makes no sense at all. A zero would then mean that the buffer is one register long. Changing the meaning of the length caused another bug later on in that the HP-41 will get into an infinite loop with a zero length buffer! This was worked around in the ROM0 rev H (and CX ROMs), allowing backarrow-ON to break such lockup loop at power on.

At least the D ROM is not consistent here and has a bug. I think that when they fixed it, the code became so much simpler by just using the size "as is", that they went for it. Limiting the max buffer size to 255 instead of 256 is a small price to pay for much simpler code, but as mentioned it resulted in other consequences later on, which they maybe did not think about at that time. This is my educated guess.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Early (earliest?) HP-41C find. - hth - 07-29-2018, 07:46 PM
RE: Early (earliest?) HP-41C find. - CY-CL - 08-01-2018, 11:58 AM
RE: Early (earliest?) HP-41C find. - hth - 08-01-2018 05:43 PM
RE: Early (earliest?) HP-41C find. - hth - 08-01-2018, 05:50 PM
RE: Early (earliest?) HP-41C find. - CY-CL - 09-06-2018, 07:07 PM
RE: Early (earliest?) HP-41C find. - CY-CL - 08-30-2019, 11:13 AM
RE: Early (earliest?) HP-41C find. - CY-CL - 08-30-2019, 07:31 PM
RE: Early (earliest?) HP-41C find. - Gene - 08-31-2019, 12:57 PM
RE: Early (earliest?) HP-41C find. - hth - 08-31-2019, 06:56 PM
RE: Early (earliest?) HP-41C find. - Gene - 08-31-2019, 07:11 PM
dump of 1901A "DDC" ROM 2C? - brouhaha - 03-10-2024, 11:30 AM



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