The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

Matrices on HP39gii (Cautionary Tale)
Message #1 Posted by Eddie W. Shore on 20 Mar 2013, 6:10 p.m.

Don't try to store a matrix in a program, the calculator either gives an error or freezes.

Example code:

M1:=[[A,B],[C,D]] where A, B, C, and D are previously defined, at least when A, B, C, and D are local.

I am thankful that the ON and backspace trick doesn't erase the memory.

      
Re: Matrices on HP39gii (Cautionary Tale)
Message #2 Posted by Patrice on 21 Mar 2013, 12:57 p.m.,
in response to message #1 by Eddie W. Shore

Actual firmware is evaluating matrix at compile time. Hope it change in next firmware.

in home: A:=A+1;[A,A+1] the matrix use the value of A before the increment :(

            
Re: Matrices on HP39gii (Cautionary Tale)
Message #3 Posted by Gilles Carpentier on 23 Mar 2013, 7:54 p.m.,
in response to message #2 by Patrice

I second you about this behavior.

A new firmware is needed...

here a small program for "sprites" ... Works fine and quick but ... I crashed my calc with it. So be carefull and backup the 39GII memory ( Copy your sources in another place that the connectivity kit because all is lost in a bad crash !!)

EXPORT Sprite(Pause)
BEGIN
 IF Pause==0 THEN Pause:=.00001 END;
 L1:={ 0,0,  0,1, 1,0, 9,0, 10,0, 10,1, 0,9, 0,10, 1,10, 10,10, 10,9, 9,10, 2,3, 2,5, 3,2, 3,4, 4,1, 4,3, 5,2};
 DIMGROB_P(G1,13,13,0); RECT_P(G1,0,0,12,12,3,0);
 FOR I FROM 1 TO SIZE(L1) STEP 2 DO
  PIXOFF_P(G1,L1(I)+1,L1(I+1)+1);
 END;
 RECT_P(0,0,255,126,0,3); X:=100;Y:=100;
 REPEAT
  X:=MIN(241,ABS(X+ISKEYDOWN(10)-ISKEYDOWN(14)));
  Y:=MIN(112,ABS(Y+ISKEYDOWN(15)-ISKEYDOWN(9)));
  BLIT_P(X+1,Y+1,G1); WAIT(Pause);
 UNTIL 0;
END;

Usage

Sprite(0.01) //0 is max speed To exit ON/C

Small video on an adapted version

Snake II alpha

Edited: 24 Mar 2013, 6:07 a.m.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall