Post Reply 
(HP71B) ASM question
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...

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!

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
* use: FVAR1 FVAR2 <F> 
       WORD '<F>'
       GOSBVL SAVEFP         save pointers: CPU reg, D0, D1
       C=DAT1 A              copy data at 1st address in D1 into C(A)
       CD0EX                 exchange C(A) with D0
       A=DAT0 W              value into A
       R0=A                  R0 = Value1
       D1=D1+ 5
       C=DAT1 A              copy data at 2nd address in D1 into C(A)
       CD0EX
       A=DAT0 W
       R1=A                  R1 = value2
       A=R0
       DAT0=A W              Store value1 at addr2
       D1=D1- 5
       C=DAT1 A
       CD0EX
       A=R1
       DAT0=A W              Store value2 at addr1
       GOSBVL GETFP          restore pointers: CPU reg, D0, D1
       D1=D1+ 10             return nothing on data stack
       RTNCC

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
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(HP71B) ASM question - floppy - 07-15-2024, 04:50 PM
RE: (HP71B) ASM question - ThomasF - 07-16-2024, 06:05 AM
RE: (HP71B) ASM question - floppy - 07-16-2024, 07:22 AM
RE: (HP71B) ASM question - rprosperi - 07-16-2024, 12:07 PM
RE: (HP71B) ASM question - ThomasF - 07-16-2024, 07:00 AM
RE: (HP71B) ASM question - floppy - 07-23-2024, 05:54 PM
RE: (HP71B) ASM question - rprosperi - 07-23-2024, 06:10 PM
RE: (HP71B) ASM question - floppy - 07-29-2024 09:25 AM
RE: (HP71B) ASM question - brouhaha - 07-30-2024, 06:47 AM
RE: (HP71B) ASM question - J-F Garnier - 07-30-2024, 07:54 AM
RE: (HP71B) ASM question - KeithB - 08-03-2024, 10:56 PM
RE: (HP71B) ASM question - brouhaha - 08-05-2024, 04:21 AM
RE: (HP71B) ASM question - J-F Garnier - 08-05-2024, 02:12 PM
RE: (HP71B) ASM question - J-F Garnier - 07-30-2024, 07:28 AM
RE: (HP71B) ASM question - brouhaha - 07-30-2024, 06:51 AM
RE: (HP71B) ASM question - floppy - 08-03-2024, 04:47 PM
RE: (HP71B) ASM question - rprosperi - 08-03-2024, 05:06 PM
RE: (HP71B) ASM question - floppy - 08-03-2024, 05:40 PM
RE: (HP71B) ASM question - floppy - 08-04-2024, 11:45 AM
RE: (HP71B) ASM question - rprosperi - 08-05-2024, 11:50 AM
RE: (HP71B) ASM question - floppy - 08-17-2024, 08:46 AM
RE: (HP71B) ASM question - floppy - 08-17-2024, 01:40 PM
RE: (HP71B) ASM question - floppy - 08-22-2024, 09:32 AM
RE: (HP71B) ASM question - floppy - 08-23-2024, 07:37 AM
RE: (HP71B) ASM question - floppy - 09-03-2024, 03:36 PM



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