HP-41C Trivia Question



#4

What (non-synthetic) HP-41C user code program line is the longest? That is, what single program line requires the most number of bytes (after PACKING)?

Edited: 11 Mar 2013, 6:04 p.m. after one or more responses were posted


#5

has to be a long number with minus signs and exponents.

-1.234567890E-99

perhaps?


#6

Quote:
has to be a long number with minus signs and exponents.

-1.234567890E-99

perhaps?


I think you're right - but I also think that you are allowed (much) more than 10 digits for the mantissa...


#7

The HP-41C will not allow more than 10 digits in the mantissa. This applies both when entering a number from the keyboard and when entering a number into a program.


#8

01 5

02 -1.234567890 E-12

03 6

Line 02 is 16 bytes, but since it has two other numbers around it, there will also be an invisible null between the lines (after packing). If you "charge" half of the null to the one before and the other half to the following, that line would cost 16 + 0.5 + 0.5 = 17 bytes.

The second longest is text 15 which takes 16 bytes.


#9

Håkan,

You are correct. The answer is 17 bytes. For each following number, the HP-41C must maintain a null byte (0) to separate the second number from the first. In such a case, I would say that the null byte belongs in its entirety to the number that follows it, as it is there entirely for its purpose. But your way is correct as well and produces the same answer, it is only a different way of accounting for the extra byte.

Congratulations, I hereby declare you an HP-41C Master!

Dan

Edited: 12 Mar 2013, 9:58 a.m.

#10

Close. You need to specify the number of bytes.

#11

A string of 15 characters?


#12

That would be 16 bytes, and therefore almost the right answer, but not quite.


#13

A LBL with 15 characters


#14

Peter,

From our past correspondence a few years ago, I know you to be a synthetic programming expert.

But, such a label can only be created by synthetic means, and cannot be the correct answer to the question as synthetics was not allowed.

Dan

#15

What about a branch to a fifteen character alpha string?


- Pauli


#16

Pauli,

The HP-41C will only allow GTO and XEQ branches to global labels of seven characters or less. It would be possible to create a synthetic instruction to attempt to branch to a label with a name that is 15 characters long. However, synthetics was not allowed for this trivia question.

Incidentally, even if a 15 character label was created, the HP-41C would never find it, even with a 15 character branch instruction. The register used to search for labels (Q) will only hold 7 characters.


Possibly Related Threads…
Thread Author Replies Views Last Post
  Question about magnetic cards for the HP-41C Card Reader Namir 2 1,512 08-15-2012, 12:15 PM
Last Post: Namir
  41-MCODE trivia: backwards or forwards? Ángel Martin 3 1,535 03-05-2012, 04:38 PM
Last Post: Håkan Thörngren
  Totally useless trivia... 41 Ángel Martin 2 1,205 12-07-2011, 09:38 AM
Last Post: Don Shepherd
  HP-41C PCB Repair Question. Kerem Kapkin (Silicon Valley, CA) 10 3,099 11-21-2011, 07:45 PM
Last Post: BobVA
  (Trivia?) Display setting Kiyoshi Akima 5 1,777 11-30-2010, 03:12 AM
Last Post: Mark Harman
  Trivia: Which HP can't display its own programs? Mark Edmonds 2 1,103 09-24-2009, 04:07 PM
Last Post: Mark Edmonds
  Trivia Question Mark Edmonds 24 5,069 08-15-2009, 11:42 PM
Last Post: Walter B
  early HP-80 restoration and Tallnut HP-41C question. Geoff Quickfall 20 4,369 08-10-2009, 02:32 PM
Last Post: geoff quickfall
  Trivia quiz and mini-challenge: Classic HP35 Allen 25 5,863 10-08-2007, 06:00 PM
Last Post: Paul Dale
  Newbie 41C question. Paul Beijer 6 1,754 02-03-2007, 04:13 AM
Last Post: Karl Schneider

Forum Jump: