The Museum of HP Calculators

HP Forum Archive 20

[ Return to Index | Top of Index ]

41-MCODE Vector Calculator (3D)
Message #1 Posted by Ángel Martin on 16 Nov 2011, 8:15 a.m.

I've taken the opportunity to add some extensions to the ROMS containing some of the HP_Solution_Books. In particular the Geometry ROM had more than 2/3rds. of empty space, a waste that needed correction - So I added a few triangle solvers and a coordinate tranformations FOCAL programs.

As there was still more available room, I went ahead and wrote a handy set of MCODE functions to handle 3D-Vector operations - you know, the usual suspects. They use the stack for the first operand and Alpha for the second, leaving the results in the stack - so nothing fancy like a Vector-stack or similar, just plain and simple.

A couple of interesting remakrs :

- V<>, VVIEW, VRCL and VSTO are programmable prompting functions that work on three-register blocks at once
- VVIEW and VIEWV sequentially display the three vector components using the display (not Alpha obviously)
- using the new functions the "VC" program from the HP-41 Advantage module shrinks down to barely 45 lines ;-)

The functions are listed below:- you can download it from TOS, just use the usual procedure.

-VECTORS	Header Section
A+V     	Vector Addition
A-V     	Vector Subtraction
A*V     	Vector Dot Product
AXV     	Vector Cross Product
V<> _ _ 	Vector Exchange
V<>A            Vector Swap
VADST   	Distance between Vectors
VANG    	Angle Between Vectors
VCHS    	Vector negative
VENTER^ 	Vector ENTER^ 
VIEWV   	Vector View
VINV    	Vector Inverse
VMOD    	Vector Magnitude
VNORM   	Vector Norm
VRCL _ _	RCL Vector
VSTO _ _	STO Vector
VUNIT   	Unit Vector
VVIEW _ _	View Vector

Best, ÁM


[ Return to Index | Top of Index ]

Go back to the main exhibit hall