(HP71B) ASM question
|
07-15-2024, 04:50 PM
(This post was last modified: 08-03-2024 06:01 PM by floppy.)
Post: #1
|
|||
|
|||
(HP71B) ASM question
Hello,
I have here few ASM words (yes, looks similar to HP41 especially the total rekall module fcts). Code: FORTH Forth word for a formatted stack output: Code: : FSTA. RUP ." T: " F. RUP CR ." Z: " F. RUP CR ." Y: " F. I am struggling with the RCL* (the others works). 1.0 2.0 3.0 4.0 FVARIABLE TBX TBX 7.0 STO X<>Y FSTA. T: 2 Z: 3 Y: 7 X: 4 L: 4 OK { 0 } TBX RCL* OK { 0 } FSTA. T: 2 Z: 3 Y: 7 X: -2.94024001018E303 should show 28 and not -2.94 L: 4 OK { 0 } Any idea is welcome how to solve this (having the correct result.. MP2-15 seems a bit weird how to make it working). UPDATE: the now working word is in the posts below. All listed routines in the words are entry points which must be defined. Here the list which has to be included into the word file before you start the command in the forth prompt >> " NEWWORDFILE" ASSEMBLE << (I will try to keep it updated; if any issue, let me know via PM). Code: * System entry points: see 14-1 of IMS Vol 1 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 |
|||
07-16-2024, 06:05 AM
Post: #2
|
|||
|
|||
RE: (HP71B) ASM question
Hi,
Had a quick look, but I'm missing the IDS so I can't verify. But, in general it looks ok, don't see any real problem with the code, but could it be that SPLITA uses R0 or R1? The result is way off (not only -2.94 but -2.94*10^303) which indicates that there is rubbish in to the MP2-15 routine. Shouldn't be (C,D) since that is the result from SPLITA, so my guess is that (A,B) is wrong (which comes from (R0,R1)), and if (I mean if since I don't have the code) SPLITA uses R0 or R1 this might cause the problem. Just my 2 cents ... Cheers, Thomas [35/45/55/65/67/97/80 21/25/29C 31E/32E/33E|C/34C/38E 41C|CV|CX 71B 10C/11C/12C/15C|CE/16C 32S|SII/42S 28C|S 48GX/49G/50G 35S 41X] |
|||
07-16-2024, 07:00 AM
Post: #3
|
|||
|
|||
RE: (HP71B) ASM question
One way to be sure, is to update the code and verify the result.
Comment out the following line, should result in the X value untouched: Code: GOSBVL SPLITA 1.0 2.0 3.0 4.0 FVARIABLE TBX TBX 7.0 STO X<>Y FSTA. T: 2 Z: 3 Y: 7 X: 4 L: 4 OK { 0 } TBX RCL* OK { 0 } FSTA. T: 2 Z: 3 Y: 7 X: 4 <-- Should be 4 after this L: 4 OK { 0 } Comment out the following lines, should result in the value of TBX in X: Code: GOSBVL SPLITA 1.0 2.0 3.0 4.0 FVARIABLE TBX TBX 7.0 STO X<>Y FSTA. T: 2 Z: 3 Y: 7 X: 4 L: 4 OK { 0 } TBX RCL* OK { 0 } FSTA. T: 2 Z: 3 Y: 7 X: 7 <-- Should be 7 after this L: 4 OK { 0 } [35/45/55/65/67/97/80 21/25/29C 31E/32E/33E|C/34C/38E 41C|CV|CX 71B 10C/11C/12C/15C|CE/16C 32S|SII/42S 28C|S 48GX/49G/50G 35S 41X] |
|||
07-16-2024, 07:22 AM
(This post was last modified: 07-16-2024 04:03 PM by floppy.)
Post: #4
|
|||
|
|||
RE: (HP71B) ASM question
(07-16-2024 06:05 AM)ThomasF Wrote: Hi,Thanks for the feedback. I used SPLITA and used the others SPLITC or SPLTAC too with the same weird result. Code: WORD 'RCL*' In EMU71. If there is a difference in HP71B? (dont know for now. I have to test this). Could not read any R0 or R1 impact in IDS Vol3. However, I will have a deeper look into this the next hours. How to use the debugger in EMU71? (no glue how to use a debugger). A short WebEx with anybody could be great. With the X*2 word, I had already a problem with MP2-15 when I had X multiply 2, which gave the wrong result. Its why I changed it to X + X. When we see the Forth/ASM IMS for the words X^2 (no stack change like RCL* but with 2 same parameters A-B * C-D which in fact A-B * A-B) or F* (Stack drop) , it uses MP2-15. I am still looking there what is the difference to the code of the RCL* word (no stack drop, A#C and B#D). Update: I will have a look to the path DV2-15 of 1/X15.. = multiply. Will see if its better on EMU71. 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 |
|||
07-16-2024, 12:07 PM
Post: #5
|
|||
|
|||
RE: (HP71B) ASM question
(07-16-2024 07:22 AM)floppy Wrote: In EMU71. If there is a difference in HP71B? (dont know for now. I have to test this). EMU71 and a 71B should act the same, but this theoretically could vary if your 71B device has a different ROM version than the 2CDCC used by EMU71 (check with VER$ command). EMU71's debugger is explained in the DEBUGGER.TXT file that comes as part of the EMU71 installation (found in the folder you installed EMU71 into). --Bob Prosperi |
|||
07-23-2024, 05:54 PM
(This post was last modified: 07-23-2024 06:12 PM by floppy.)
Post: #6
|
|||
|
|||
RE: (HP71B) ASM question
It was not easy peasy to read the IDS. There are not a lot of float routines examples. the use of RESD1 instead of RES12 and few SETDEC was making it.
Now I have a working code Code: WORD 'RC*' New words like the HP41 Warpcore are on the way RC* RC+ RC/ ST+ ST- & .. more to come. Will be placed into github when more are available (ST* ST/ ?0= ?X= ..). All Forth words. Mostly for float algebra (like HP41). 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 |
|||
07-23-2024, 06:10 PM
Post: #7
|
|||
|
|||
RE: (HP71B) ASM question
(07-23-2024 05:54 PM)floppy Wrote: It was not easy peasy to read the IDS... This is the understatement of the month!! Although reading foreign code, and especially for an unknown assembly language, can be time-consuming, difficult and frustrating, I have found the 71B IDS to be even harder than most on the several attempts I made in the past. No doubt mostly because I never knew the NUT instruction family, but also because I had only used 6800 and PDP-11 assembly languages at the time, and the HP NUT and Saturn could not be more different. The tight code space, layered use of 'library' calls, wacky different sizes of registers and nibble orientation also all contributed to a series of aborted attempts to gain any general understanding. Good for you floppy for sticking with it to make enough progress here, well done! --Bob Prosperi |
|||
07-29-2024, 09:25 AM
(This post was last modified: 07-29-2024 10:06 AM by floppy.)
Post: #8
|
|||
|
|||
RE: (HP71B) ASM question
(07-23-2024 06:10 PM)rprosperi Wrote:(07-23-2024 05:54 PM)floppy Wrote: It was not easy peasy to read the IDS... So, now, how to reduce the Saturn ASM pains?.. Perhaps reading this ? (not HP71B, HP48, but the nice explanations can be overtaken because thats the same processor) https://www.keesvandersanden.nl/calculat...torial.pdf It explained to me what I saw by looking at the IDS prints therefore I think is a great help. If there are any other help around (like this manual I have to read during my upcoming holiday)? Just to reduce the traumatic experience.. here a FORTH word which allow any data exchange between variables and which is perhaps usefull for you. X L <F> will for example act like X<>L . Can be used in any combination X<>Z Z<>L .. (X<>Y exists in FORTH, so no need to use the X Y <F>) Code: * <F> exchange the values of the 2 float variables Then the next question would be: what assembler is similar to the saturn? Rosetta list few ASM versions https://rosettacode.org/wiki/Category:Assembly and if an ASM is not so far away from the Saturn, then something could be perhaps overtaken from there. 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 |
|||
07-30-2024, 06:47 AM
Post: #9
|
|||
|
|||
RE: (HP71B) ASM question
(07-29-2024 09:25 AM)floppy Wrote: Then the next question would be: what assembler is similar to the saturn? Do you mean what assembler has similar syntax and pseudo-ops to those used for Saturn? AFAIK, HP's own SASM is the only published assembler that is fully compatible with the 71B IDS listings. Or do you mean what other processor has a machine language like Saturn? The answer to that is none whatsoever, though the closest would be the Nut processor as used in the 41C/CV/CX, 10C, 11C, 12C, 15C, and 16C, and which is even more painful to program than Saturn. And that, of course, was derived from the Woodstock architecture,(HP-25, HP-67, etc.), which was derived from the classic architecture (HP-35, -45, -46, -55, -67, -70, -80, -81). If you want to go back even further, the HP classic archtiecture was inspired by the Fairchild PPS 25 architecture, which is even more obscure than any of the HP architectures. Whatever assembler(s) existed for the PPS 25 is lost to the mists of time. Prior to the HP 49g+, introduced in 2003, HP used custom processor architectures in all of their calculators, with the lone exception of the HP 9815, which used a Motorola MC6800. For comparison, traditional TI calculators variously used one of two architecture families, "digit" architecture (similar to TMS1000 microcontroller), and "register" architecture, sort of vaguely like the HP classic/Woodstock/Nut archtiectures. However, like the Fairchild PPS 25, they are even more obscure than the HP architectures, and I'm not aware of any assembler for them. In summary, if you want to program HP's Saturn-based products (or Saturn-emulating products) in assembly, you're basically stuck with dealing with the bizarre architecture. (Some of us weirdos actually like it, challenging though it is.) |
|||
07-30-2024, 06:51 AM
Post: #10
|
|||
|
|||
RE: (HP71B) ASM question
I forgot to mention, a C compiler actually exists for the HP Nut architecture:
https://www.calypsi.cc/ It's not open-source, but the binary build targeting Nut is available free-of-charge. I have not tried it. It won't help you with Saturn, though. In principle, if one had the source code (whcih unfortunately is not available), one might consider trying to retarget it to Saturn, since in many regards the architectures are similar. |
|||
07-30-2024, 07:28 AM
Post: #11
|
|||
|
|||
RE: (HP71B) ASM question
(07-29-2024 09:25 AM)floppy Wrote: So, now, how to reduce the Saturn ASM pains?.. RPL was initially developed for the exact purpose: make the calculator development much easier and faster. It was developed for the HP-71B successors and was first used for the 18C. Then RPL was exposed to the user on the 28C, and the internal RPL was renamed "System-RPL". Another well-known example of RPL used for internal system programming and not exposed to the user is the HP-42S. However, using RPL for system programming has a cost: a significant loss of performance. For instance, the HP-32S written in pure assembly is faster than the 42S, despite a slower CPU. For the HP-71B, FORTH is in a similar position: simpler programming, but not as fast as pure assembly. You may rewrite your <F> word in FORTH to evaluate the benefit ease-of-programming/performance. J-F |
|||
07-30-2024, 07:54 AM
(This post was last modified: 07-30-2024 08:13 AM by J-F Garnier.)
Post: #12
|
|||
|
|||
RE: (HP71B) ASM question
(07-30-2024 06:47 AM)brouhaha Wrote: ... the Nut processor as used in the 41C/CV/CX, 10C, 11C, 12C, 15C, and 16C, [...] was derived from the Woodstock architecture,(HP-25, HP-67, etc.), which was derived from the classic architecture (HP-35, -45, -46, -55, -67, -70, -80, -81). I didn't know the connection to the Fairchild PPS 25. Do you know where the Capricorn CPU architecture, used in the Series 80 and the 75C, comes from? It has some loose connections with the calculator architecture with its capability to handle a whole 64-bit register operation in one opcode, but has many distinctive capabilities and is less calculator-oriented with no dedicated register fields but a flexible 'multi-byte' mode. I never found anything close. Did HP develop it from scratch ? (07-30-2024 06:51 AM)brouhaha Wrote: I forgot to mention, a C compiler actually exists for the HP Nut architecture: I remember there were attempts to write a C-compiler for the HP-71B. None never became usable, but a tentative is still described here: github.com/hp71b/fnc J-F |
|||
08-03-2024, 04:47 PM
Post: #13
|
|||
|
|||
RE: (HP71B) ASM question
Information: in order to make your HP71B with MULTIMOD and Forth/ASM in it, acting like an HP41 with RPN on steroid, herewith few words.
Code: * CLX : set X to zero. LastX not modified (see HP41) Code: * CLST : set X Y Z T to zero. LastX not modified (see HP41). Code: * DEG-RAD : Deg to Rad conversion (D-R in HP41) Code: * RAD-DEG : Rad to Deg conversion (R-D in HP41) 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 |
|||
08-03-2024, 05:06 PM
Post: #14
|
|||
|
|||
RE: (HP71B) ASM question
(08-03-2024 04:47 PM)floppy Wrote: Information: in order to make your HP71B with MULTIMOD and Forth/ASM in it, acting like an HP41 with RPN on steroid, herewith few words. Very nice! Both useful as they are, but also good examples for folks learning to dabble in 71B Forth. For readers that may not have been following floppy's explorations, these are new FORTH words acting on the floating point 'stack'. --Bob Prosperi |
|||
08-03-2024, 05:40 PM
(This post was last modified: 08-03-2024 05:55 PM by floppy.)
Post: #15
|
|||
|
|||
RE: (HP71B) ASM question
The HP41 freaks will enjoy? perhaps.. lets throw more to these persons.. (not sure it exist anywhere else. could not find anything like that except perhaps in an HP41Forth-Module-translator where I did not had a look at the code, but hereunder is for use with the standard Forth/ASM module)
Code: * %CH : calculate [(x —-y) 100] / y, see %CH HP41 manual page 84 Code: * %OF : calculate (X*Y)/100, see % in HP41 manual page 83, =pdf 89 UPDATE UPDATE I forgot the entry points (= existing routines which are listed in the IDS V2 or V3 and must be part of an ASM file for it to be assembled). I posted the list in the all first post. 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 |
|||
08-03-2024, 10:56 PM
Post: #16
|
|||
|
|||
RE: (HP71B) ASM question
(07-30-2024 07:54 AM)J-F Garnier Wrote: Do you know where the Capricorn CPU architecture, used in the Series 80 and the 75C, comes from? Check out the August 1980 HP Journal: "A Custom LSI Approach to a personal computer" I think "Custom" tells you what you need to know. 8^) |
|||
08-04-2024, 11:45 AM
Post: #17
|
|||
|
|||
RE: (HP71B) ASM question
Lets make it weird ;-)
an HP71 beeping like an HP41?.. Forth Word by using the Forth/ASM module (as HW or within the MULTIMOD). Code: * BEEP41 the HP41 beep sound on HP71B 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 |
|||
08-05-2024, 04:21 AM
Post: #18
|
|||
|
|||
RE: (HP71B) ASM question
(07-30-2024 07:54 AM)J-F Garnier Wrote: I didn't know the connection to the Fairchild PPS 25. See my comment in the HP 9199A thread, and Steve Simkin's reply. Quote:Do you know where the Capricorn CPU architecture, used in the Series 80 and the 75C, comes from? The HP Journal article KeithB mentioned explains their rationale for designing a custom architecture, namely BCD arithmetic and variable length data. It is unclear that any specific architecture(s) influenced it, other than the generalized influence of the BCD and variable length word of the calculator processors. The earlier Fairchild F8 architecture (also used by Mostek 3870) was AFAIK the earliest microprocessor architecture to have 64 registers, but it doesn't really appear that it had a significant influence. |
|||
08-05-2024, 09:04 AM
Post: #19
|
|||
|
|||
RE: (HP71B) ASM question (Notebook...)
I know this is NOT exactly belonging here with FLOPPYs very cool work - but...
I have taken the "Notebook" from John G. and made it into a compressed single PPDF - 15mb and AFAICT lossless, a lot less than the single page scans which I obviously used I am amazed that I missed this last year - very cool reading!! I don't have a place to put a 15Mb file for y'all to read/get - any advice on how I can get around this, please let me know. |
|||
08-05-2024, 11:50 AM
Post: #20
|
|||
|
|||
RE: (HP71B) ASM question
(08-05-2024 09:04 AM)KimH Wrote: I don't have a place to put a 15Mb file for y'all to read/get - any advice on how I can get around this, please let me know. Assuming you mean how to share a large file here in the MohPc Forum, the simplest thing is to post the file on a OneDrive, GDrive or DropBox account (they're all free up to several GB), then share it and include the link in your post here. The first time through this can be confusing, but in the end it's pretty easy, useful and free! --Bob Prosperi |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)