Base conversion for DM41X
|
10-21-2023, 11:52 PM
Post: #1
|
|||
|
|||
Base conversion for DM41X
This program uses the larger display of the DM41X combined with the PPC ROM's BD and TB functions to convert from binary, octal, decimal, or hex to all four and displays them all at once on the DM41X screen.
You need to remember which stack register is which base but they are arranged from top to bottom in ascending base order T=2, Z=8, Y=X=10, ALPHA=16. Since ALPHA covers X you see all four at once. This has limitations of course but was a fun learning exercise. Any optimization suggestions welcome. Code:
|
|||
10-22-2023, 01:54 PM
Post: #2
|
|||
|
|||
RE: Base conversion for DM41X
Interesting,
Sylvain Côté |
|||
10-22-2023, 03:33 PM
Post: #3
|
|||
|
|||
RE: Base conversion for DM41X
(10-22-2023 01:54 PM)Sylvain Cote Wrote: [*]You could also use a single global label to activate the program and use local alpha labels (A..J, a..e) to call the conversion routines. FYI, if the key is unassigned, a local alpha label auto-assign itself to its key when the program is active. I'm not following what you are meaning here. Let's say for example I have a single global label of "MAIN" and four local labels of A,B,C,D. If keys A,B,C,D are not otherwise assigned in user KB then those keys will call the local labels? If multiple programs use the same A,B,C,D local labels how would the machine know which to auto-map to the keys? |
|||
10-22-2023, 04:16 PM
Post: #4
|
|||
|
|||
RE: Base conversion for DM41X
(10-22-2023 03:33 PM)Jeff_Birt Wrote: I'm not following what you are meaning here. Let's say for example I have a single global label of "MAIN" and four local labels of A,B,C,D. If keys A,B,C,D are not otherwise assigned in user KB then those keys will call the local labels? If multiple programs use the same A,B,C,D local labels how would the machine know which to auto-map to the keys? It would probably be good for you and save much time if you would go on and read the Owner's Handbook, which explains everything in a simple yet complete manner and in fact it's quite an enjoyable, productive read. The information you're asking about local alpha labels is perfectly explained in pages 188 and 189, so do yourself a favor and read it before asking here. V. All My Articles & other Materials here: Valentin Albillo's HP Collection |
|||
10-22-2023, 06:41 PM
Post: #5
|
|||
|
|||
RE: Base conversion for DM41X
(10-22-2023 04:16 PM)Valentin Albillo Wrote: It would probably be good for you and save much time if you would go on and read the Owner's Handbook, which explains everything in a simple yet complete manner and in fact it's quite an enjoyable, productive read. I have read through all of Part I of the HP-41CX Owner's manual and am using Part II as a reference. Forgive me for not committing 400+ pages of technical documentation to memory in two weeks. If part of the purpose of a forum is not to ask questions than what is the point? Scolding someone who is new to a particular machine for asking a question is not particularly friendly nor constructive. Looking at volume on of the HP-41CX User's manual this is found on page 88. From reading this I could not guess as this auto-assignment of A-F scheme. "Local labels are not listed in catalog 1 and cannot be assigned to the User keyboard. This is because local labels are for strictly “local” use; they can only be used within the context of a single program." Looking at the HP-41CX User's manual volume 2 on page 300 reveals this: "Local Alpha labels require two bytes of program memory and can be used for branching any distance within a program. They are designed for manual execution: when the User keyboard is active, a local Alpha label is automatically assigned to each key on the top two rows (as described in “The Top Two Rows” in section 9). You can then use these keys to execute the corresponding local Alpha labels in the current program." Then if you look up Section 9 it goes into more detail. To summarize while the HP-41C manual you linked to does mention this auto-assignment up front the HP141CX manual does not. In fact, the first mention of local labels in volume 1 would suggest the opposite to the new reader. One has to read three separate sections to get the full picture of this one feature. To answer my own question about how the machine knows what program these top two rows of keys might be assigned to its scope is the 'current program'. If one has not executed the base conversion program, you would need to GTO to its global label to bring it into scope first. This is an interesting functionality and could be very handy for repetitive operations. |
|||
10-22-2023, 07:41 PM
(This post was last modified: 10-23-2023 12:39 PM by Sylvain Cote.)
Post: #6
|
|||
|
|||
RE: Base conversion for DM41X
The following non-optimized program works on all 41's (C, CV, CX, 41CL, DM41X, etc) and assumes that the top row key is unassigned.
Local alpha label demo program: Code: 01 LBL "ALD" // alpha label demo Usage: Code: [XEQ][ALPHA]ALD[ALPHA] // display: "A B C D E" Edit: available local alpha labels are: Code: LBL A Sylvain Côté |
|||
10-22-2023, 11:32 PM
Post: #7
|
|||
|
|||
RE: Base conversion for DM41X
(10-22-2023 06:41 PM)Jeff_Birt Wrote: I have read through all of Part I of the HP-41CX Owner's manual and am using Part II as a reference. Forgive me for not committing 400+ pages of technical documentation to memory in two weeks. Forgiven, but those "400+ pages of technical documentation" you mention aren't meant to be memorized but consulted when necessary. In this particular case, simply look in the back cover of the HP-41CX Owner's Manual Volume 2: Operation in detail and you'll see there the line "20: Branching (page 298)". Looking in that page you'll quickly find at p.300 the following paragraph (my highlights):
Quote:Scolding someone who is new to a particular machine for asking a question is not particularly friendly nor constructive. Far from "scolding" you, I was trying to give you some allegedly useful advice, as I did here and here, but if you see my well-meant attempt here as "scolding", rest assured you'll get no further advice or suggestions from me in the future. V. All My Articles & other Materials here: Valentin Albillo's HP Collection |
|||
10-23-2023, 06:54 AM
Post: #8
|
|||
|
|||
RE: Base conversion for DM41X
I would say that it is rather acceptable for someone to not be aware of or understand all the 41's gory details after only two weeks, even having read the manual cover-to-cover.
Do keep asking your questions here, Jeff. We are only too happy to show off our knowledge on the subject ;-) Werner 41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE |
|||
10-23-2023, 01:05 PM
Post: #9
|
|||
|
|||
RE: Base conversion for DM41X
(10-22-2023 11:32 PM)Valentin Albillo Wrote: [/i], rest assured you'll get no further advice or suggestions from me in the future. Valentin, I do appreciate your helpfulness. In person it is easy for us to pick up on the speech pattern's someone uses, their expressions and body language to gauge the full meaning of their words. In a forum such as this we have only words; we miss out on all the other communication clues. Those to whom we are communicating in writing my not interpret our words as we intended. Using reference material is great when are well versed in a subject but need to find some finer detail. If I am well versed in French for example, I can make good use of reference materials such as a dictionary, thesaurus, etc. Not having studied French for 35 years it is more of an effort for me. I can sometimes divine the meaning of a sentence. I can sometimes use Google translate, but sometimes there is no substitute for asking a native speaker. Someone fluent in the language can quickly find a reference to correct grammar usage, or a colloquial expression that a student will struggle with. In fact, your link to the HP-41C manual and my looking up the same information in the HP-41CX manuals led me to a bit of information that related to something I heard at one of the HHC presentations that was tangentially related. |
|||
10-23-2023, 06:13 PM
Post: #10
|
|||
|
|||
RE: Base conversion for DM41X
(10-23-2023 01:05 PM)Jeff_Birt Wrote: Valentin, I do appreciate your helpfulness. [...] Good. I do appreciate your appreciation. Let bygones be bygones. Regards. V. All My Articles & other Materials here: Valentin Albillo's HP Collection |
|||
10-24-2023, 02:33 PM
Post: #11
|
|||
|
|||
RE: Base conversion for DM41X | |||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)