Post Reply 
HP-71B Dynamic array allocation
02-26-2024, 11:53 AM (This post was last modified: 02-26-2024 12:20 PM by Namir.)
Post: #1
HP-71B Dynamic array allocation
Hi All,

Using the HP-71B emulator by Chris, I discovered that I can use several DIM statements to increase the size of an array. The succesive DIM statements do not erase existing array values stored after using the previous DIM statements.

My question is. Is this a feature of the emuator only? I have a physical 71B in my house but cannot seem to find it! That's why I am asking the question.

Also, if you are a psychic, can you please tell me where to find my HP-71B calculator?

:-)

Namir
Find all posts by this user
Quote this message in a reply
02-26-2024, 12:24 PM
Post: #2
RE: HP-71B Dynamic array allocation
Hello,

(02-26-2024 11:53 AM)Namir Wrote:  My question is. Is this a feature of the emuator only?

No. This is what the manual has to say about redimensioning arrays:

"If an array’s dimensions are reduced, some elements will of course be lost. Otherwise, existing elements remain intact, although they will probably appear to have been rearranged. Array element values are stored row-by-row. That is, the first row, last column value is followed by the second row, first column value. If an array’s dimensions are expanded, all new elements are initialized to zero."

(02-26-2024 11:53 AM)Namir Wrote:  Also, if you are a psychic, can you please tell me where to find my HP-71B calculator?

Unfortunately not...

Regards
Max
Find all posts by this user
Quote this message in a reply
02-26-2024, 01:17 PM
Post: #3
RE: HP-71B Dynamic array allocation
Despite the apparent conflict between what the manual says and your observed results, I am confident the Emu71/Win is behaving exactly the same as a real 71B when it comes to how statements behave. Emu71 is emulating the 71b h/w and runs the original ROMs, it's not a simulator with some functions implemented possibly in a different or enhanced way. So it's likely you are simply expanding the matrices in a way that does not 'remove' any elements, i.e. never decreasing any matrix dimension.

As for your 71B, I can't say for sure, but I can narrow it down to one of your eBay buyers. Smile

You're welcome!

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
02-26-2024, 04:56 PM (This post was last modified: 02-26-2024 04:56 PM by Namir.)
Post: #4
RE: HP-71B Dynamic array allocation
(02-26-2024 01:17 PM)rprosperi Wrote:  Despite the apparent conflict between what the manual says and your observed results, I am confident the Emu71/Win is behaving exactly the same as a real 71B when it comes to how statements behave. Emu71 is emulating the 71b h/w and runs the original ROMs, it's not a simulator with some functions implemented possibly in a different or enhanced way. So it's likely you are simply expanding the matrices in a way that does not 'remove' any elements, i.e. never decreasing any matrix dimension.

As for your 71B, I can't say for sure, but I can narrow it down to one of your eBay buyers. Smile

You're welcome!

I sold several HP-71B on eBay but I knw I had one more with some nice modules too. Problem is that machine is doing a Houdini number of me!

Namir
Find all posts by this user
Quote this message in a reply
02-26-2024, 04:57 PM
Post: #5
RE: HP-71B Dynamic array allocation
(02-26-2024 12:24 PM)Maximilian Hohmann Wrote:  Hello,

(02-26-2024 11:53 AM)Namir Wrote:  My question is. Is this a feature of the emuator only?

No. This is what the manual has to say about redimensioning arrays:

"If an array’s dimensions are reduced, some elements will of course be lost. Otherwise, existing elements remain intact, although they will probably appear to have been rearranged. Array element values are stored row-by-row. That is, the first row, last column value is followed by the second row, first column value. If an array’s dimensions are expanded, all new elements are initialized to zero."

(02-26-2024 11:53 AM)Namir Wrote:  Also, if you are a psychic, can you please tell me where to find my HP-71B calculator?

Unfortunately not...

Regards
Max

Thank you for the verification.
Find all posts by this user
Quote this message in a reply
02-26-2024, 04:59 PM
Post: #6
RE: HP-71B Dynamic array allocation
(02-26-2024 04:56 PM)Namir Wrote:  I sold several HP-71B on eBay but I knw I had one more with some nice modules too. Problem is that machine is doing a Houdini number of me!

Namir

The most effective solution is to stop looking for the 71B and look for something else, it should turn up quickly.

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
02-26-2024, 07:54 PM
Post: #7
RE: HP-71B Dynamic array allocation
(02-26-2024 11:53 AM)Namir Wrote:  Also, if you are a psychic, can you please tell me where to find my HP-71B calculator?

After many years of training (“where is my phone?”, “where are my spectacles?”, “where are my keys?”, “do something!”) I have developed some modest abilities - but I failed a few times as well, for example when her phone appeared only after the snow melted down in spring or her watch had to spend a few years in the composter, so don’t get overexcited.

Anyway. From what I can see, the calculator is in your study or bedroom, possibly living room. If not, check the pantry. The attic, cellar and garage are worth a try, too. In any case, it’s somewhere in your house. Or very close.

As a compensation for my services, I call dibs on everything HP you’ll find and you consider lost or just forgot about it.

Good luck!
;-)
Find all posts by this user
Quote this message in a reply
02-26-2024, 10:02 PM
Post: #8
RE: HP-71B Dynamic array allocation
My little devil says I should wait. My little angel says I should help now:
Ok. The HP71b has two hiding places, it's also mentioned in the manual:
In or under a magazine or book.
In its hard case, still because of the last journey.
Good luck!
Find all posts by this user
Quote this message in a reply
02-27-2024, 12:08 AM
Post: #9
RE: HP-71B Dynamic array allocation
Hi,

rprosperi Wrote:So it's likely you are simply expanding the matrices in a way that does not 'remove' any elements, i.e. never decreasing any matrix dimension.

Not exactly. You can decrease any matrix dimension as long as the new total number of elements is equal or bigger than the number of elements before redimensioning.

For instance, assuming OPTION BASE 1, if you redimension a 10x10 array to 20x5 (thus decreasing one dimension from 10 to 5) you won't lose any elements, as the total number of elements (10x10 = 100 = 20x5) remains the same.

In short, decreasing the total number of elements is what will lose you some elements, not decreasing a dimension per se.

Regards<
V.

  
All My Articles & other Materials here:  Valentin Albillo's HP Collection
 
Visit this user's website Find all posts by this user
Quote this message in a reply
02-27-2024, 03:22 AM
Post: #10
RE: HP-71B Dynamic array allocation
Thanks for clarifying this Valentin! After your note, I more closely re-read the manual portion and although I can see what is said there is not inconsistent, your way of stating it was far more clear.

I suppose this means element [2,1] of the new matrix is equal to element [1,6] of the original, and so one, from the storage being row-oriented, is that correct? I'd normally try it, at home there are always 2-3 71B's within reach, but I'm away in my Florida home for a winter break, and convinced myself to not take a 71 along - 'Why bother, I won't need it while there for sure...' was my thinking... HAH!

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
02-27-2024, 07:59 AM (This post was last modified: 02-27-2024 08:19 AM by J-F Garnier.)
Post: #11
RE: HP-71B Dynamic array allocation
The array allocation on the 71B is indeed dynamic, that is you can increase/decrease the size of the array with memory taken from/released to the free memory pool.

In other HP BASIC implementations, such as the 75C, Series 80 or RMB, the array is allocated only once (sometimes in the "pre-run" phase) with the DIM statement and constant (static) dimensions, i.e. DIM A(10,10) not N= 10 @ DIM A(N,N).
In these implementations, the REDIM statement can be used to change the array dimensions within the limits of the DIM memory allocation, and the elements are then preserved, with a significant difference versus the 71B:

HP-71B                     HP-75C
10 OPTION BASE 1           10 OPTION BASE 1
20 DIM A(3,3)              20 DIM A(3,3)
30 MAT A=(1)               30 MAT A=(1)
40 DIM A(2,2)              40 REDIM A(2,2)
50 DIM A(3,3)              50 REDIM A(3,3) 
60 MAT PRINT A;            60 MAT PRINT A;

1 1 1                      1 1 1
1 0 0                      1 1 1
0 0 0                      1 1 1

J-F
(from a hypothetical future "Lectures on HP BASIC" :-)
Visit this user's website Find all posts by this user
Quote this message in a reply
03-01-2024, 06:16 PM
Post: #12
RE: HP-71B Dynamic array allocation
(02-27-2024 07:59 AM)J-F Garnier Wrote:  The array allocation on the 71B is indeed dynamic, that is you can increase/decrease the size of the array with memory taken from/released to the free memory pool.

In other HP BASIC implementations, such as the 75C, Series 80 or RMB, the array is allocated only once (sometimes in the "pre-run" phase) with the DIM statement and constant (static) dimensions, i.e. DIM A(10,10) not N= 10 @ DIM A(N,N).
In these implementations, the REDIM statement can be used to change the array dimensions within the limits of the DIM memory allocation, and the elements are then preserved, with a significant difference versus the 71B:

HP-71B                     HP-75C
10 OPTION BASE 1           10 OPTION BASE 1
20 DIM A(3,3)              20 DIM A(3,3)
30 MAT A=(1)               30 MAT A=(1)
40 DIM A(2,2)              40 REDIM A(2,2)
50 DIM A(3,3)              50 REDIM A(3,3) 
60 MAT PRINT A;            60 MAT PRINT A;

1 1 1                      1 1 1
1 0 0                      1 1 1
0 0 0                      1 1 1

J-F
(from a hypothetical future "Lectures on HP BASIC" :-)

Thanks for clarifying the difference on how to implement dynamic arrays between the 71B and the 75C.
Find all posts by this user
Quote this message in a reply
03-05-2024, 12:43 PM
Post: #13
RE: HP-71B Dynamic array allocation
   
Long time ago one of your 71B's landed at my place. It was not working and had suffered some abuse.
The bezel was so bad, so I removed it. I had to rebuild the Keyboard ( polisched the Key's) fix
the connection between the two halves, and then it worked again. It had 3 front EPROM modules.
I rewired one to support a 64k EPROM, and it became my Favorite 71B !    
Find all posts by this user
Quote this message in a reply
03-05-2024, 03:01 PM (This post was last modified: 03-05-2024 03:56 PM by floppy.)
Post: #14
RE: HP-71B Dynamic array allocation
(02-26-2024 11:53 AM)Namir Wrote:  can you please tell me where to find my HP-71B calculator?
Lets think in problem solving (first strong logical).
NOTHING psychological. Only standard project management thinking and issue solving.
example https://sixsigmadsi.com/what-is-an-is-is...nduct-one/

IS.........................................IS-NOT
dry place................................wet place
no particle exposed....................................................-> .. in the house? or NOT in the garden house
.............................................in sight of spouse..........-> .. NOT the bedroom
like other around the house.........................................-> .. oh no, start a wide search
..
So, feed the problem solving matrice then you find the part in 2-3 weeks (can take time).

except erratic (non logical) happenings are sometime there (drunkness, showing off to the good looking female neighbour..) with any outcome and anything was found anywhere (in neighbour house, in the garden house). However, these others experienced happenings (lets call them friendly "best practice") should be introduced into the matrice, too.
Let inform us of the outcome.

HP71B 4TH/ASM/Multimod, HP41CV/X/Y & Nov64d, PILBOX, HP-IL 821.62A & 64A & 66A, Deb11 64b-PC & PI2 3 4 w/ ILPER, VIDEO80, V41 & EMU71, DM41X
Find all posts by this user
Quote this message in a reply
03-05-2024, 04:46 PM
Post: #15
RE: HP-71B Dynamic array allocation
"Also, if you are a psychic, can you please tell me where to find my HP-71B calculator?"
What does Alexa, ChartGPT or Siri say?
Find all posts by this user
Quote this message in a reply
03-06-2024, 04:16 PM
Post: #16
RE: HP-71B Dynamic array allocation
(03-05-2024 04:46 PM)KeithB Wrote:  "Also, if you are a psychic, can you please tell me where to find my HP-71B calculator?"
What does Alexa, ChartGPT or Siri say?

Thay have NO CLUE!

Namir
Find all posts by this user
Quote this message in a reply
03-06-2024, 04:33 PM (This post was last modified: 03-06-2024 04:35 PM by J-F Garnier.)
Post: #17
RE: HP-71B Dynamic array allocation
(03-05-2024 12:43 PM)RamLab Wrote:  Long time ago one of your 71B's landed at my place. It was not working and had suffered some abuse.
The bezel was so bad, so I removed it. I had to rebuild the Keyboard ( polisched the Key's) fix
the connection between the two halves, and then it worked again. It had 3 front EPROM modules.
I rewired one to support a 64k EPROM, and it became my Favorite 71B !

Removing the bezel gives your 71B a nice unique touch !

So you wired an external DIP EPROM to a front port CMT module. A picture of your wiring is welcome!
And if you have interesting things in your CMT modules, please share.

Is your 71B display an indication that you have a CMT HP-IL RAM disc unit ? Smile

J-F
Visit this user's website Find all posts by this user
Quote this message in a reply
03-07-2024, 10:27 AM
Post: #18
RE: HP-71B Dynamic array allocation
Hello J-F, indeed with the later model 71B removing the bezel look nice. The older model has a hole and a notch under the bezel. I tried to re-use the EPROM front modules in various ways. Not having the CMT programmer, I desoldered the EPROM, erased and re-programmed it. Soldered a socket on the CMT front module. Regretfully this gave contact issues, and programming errors. So I ended up rewiring it to a DIP socket. This works fine ! I copied the DATA ACQ HP 82497A in, since I have two HP3421A Units. Indeed, there is an CMT 256k RAM Disl in the loop. and the CMT Display.
   
Find all posts by this user
Quote this message in a reply
03-07-2024, 12:44 PM (This post was last modified: 03-07-2024 04:19 PM by J-F Garnier.)
Post: #19
RE: HP-71B Dynamic array allocation
(03-07-2024 10:27 AM)RamLab Wrote:  I tried to re-use the EPROM front modules in various ways. Not having the CMT programmer, I desoldered the EPROM, erased and re-programmed it. Soldered a socket on the CMT front module. Regretfully this gave contact issues, and programming errors. So I ended up rewiring it to a DIP socket. This works fine !

Your module is a HTI not CMT. They use different PCBs:
   
I believe these HTI modules have been made by Zengrange (who built HP71 modules for sure) for HTI-SD, thus the "Made in England".
I once tried to program a HTI module with the CMT programmer but it failed. I was told that others did succeed so it may be unreliable, and your re-use of the HTI module is great !

J-F
Edit: I was sure that RamLab wasn't an unknown name for me: thread-142045-post-142557 , so hi again !
Visit this user's website Find all posts by this user
Quote this message in a reply
03-07-2024, 07:31 PM
Post: #20
RE: HP-71B Dynamic array allocation
Hello J-F,
After I bought my first HP3421A in 2005, the first HP71B followed fast, and since then I follow the Forum. Got an Registrated Emu71 HP-71B & HP-IL system emulator from you in 2006.
You are right, the M109/M189 ROM's/EPROMS are not by CMT, but by HTI. The ROM module by the way, was made in Singapore, and uses an HP PCB.


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
Post Reply 




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