Post Reply 
(HP71B) ASM question
08-23-2024, 07:37 AM
Post: #25
RE: (HP71B) ASM question
Question: what is the best method for creating PI in Forth/ASM?
Is there a memory optimized calculation procedure?

In HP71B, apart from using the BASICX command with PI as parameter in a Forth word, its possible to upload a constant; but perhaps not the best memory cautious method.

Comments/remarks are welcome.

Entry points
Code:
=SAVEFP EQU #E717A            save Forth pointer
=STKLFT EQU #E7320            Stacklift Forth OM page 609 pdf
=OX     EQU #2FBD0            X address
=GETFP  EQU #E71A5            restore Forth pointers
PI word
Code:
* PI : put PI into X in the stack. uplift the float stack. lastx not changed (like HP41)
* tested 23Aug2024
       WORD 'PI'
       GOSBVL =SAVEFP
       C=0    S
       P=     0
       LCHEX  314159265359000
       R0=C                  R0 = Result
       GOSBVL =STKLFT
       A=R0
       D0=(5) =OX
       DAT0=A W              Result into X
       GOSBVL =GETFP
       RTNCC

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: 10 Guest(s)