HP Forums
Access Matrix Functions From Sharp BASIC? - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: Not HP Calculators (/forum-7.html)
+--- Forum: Not remotely HP Calculators (/forum-9.html)
+--- Thread: Access Matrix Functions From Sharp BASIC? (/thread-20266.html)



Access Matrix Functions From Sharp BASIC? - toml_12953 - 08-04-2023 01:20 AM

Quite a while back, there was a post detailing how to access the built-in matrix functions from a BASIC program on a particular model of a Sharp pocket computer. I looked everywhere I could think of but I can't find the thread. Can anyone help?


RE: Access Matrix Functions From Sharp BASIC? - Valentin Albillo - 08-04-2023 02:41 AM

.
Sure, see message #45 and most specially message #51 in this ancient thread.

Hope that helps.
V.


RE: Access Matrix Functions From Sharp BASIC? - toml_12953 - 08-04-2023 05:09 AM

(08-04-2023 02:41 AM)Valentin Albillo Wrote:  .
Sure, see message #45 and most specially message #51 in this ancient thread.

Hope that helps.
V.

Thanks! Now I just have to see if Hrast has created a table of entry points for the PC-E500S.


RE: Access Matrix Functions From Sharp BASIC? - HrastProgrammer - 08-09-2023 11:58 AM

(08-04-2023 05:09 AM)toml_12953 Wrote:  Thanks! Now I just have to see if Hrast has created a table of entry points for the PC-E500S.

No, just PC-1403. And even on 1403 (some) addresses are probably different with different ROM revisions (if there are any).


RE: Access Matrix Functions From Sharp BASIC? - Helix - 08-13-2023 11:51 PM

(08-04-2023 05:09 AM)toml_12953 Wrote:  Thanks! Now I just have to see if Hrast has created a table of entry points for the PC-E500S.

You will find the procedure in the PC-E500 technical manual, that you can download here, among other interesting documents:
https://github.com/Robert-van-Engelen/Forth500/tree/main/resources
The relevant pages are 31 and 79-82.

So, for example, if you want the determinant of the matrix X:
POKE &BFE00, 9, 1, &4C : CALL &FFFDC
And the result is in the variable X

Then, if you want the inverse of X:
POKE &BFE02, &45 : CALL &FFFDC

Now, if you want to store the new matrix X in the matrix ME:
POKE &BFE02, &52, ASC("E") : CALL &FFFDC
And so on...


RE: Access Matrix Functions From Sharp BASIC? - toml_12953 - 08-14-2023 12:01 AM

(08-13-2023 11:51 PM)Helix Wrote:  
(08-04-2023 05:09 AM)toml_12953 Wrote:  Thanks! Now I just have to see if Hrast has created a table of entry points for the PC-E500S.

You will find the procedure in the PC-E500 technical manual, that you can download here, among other interesting documents:
https://github.com/Robert-van-Engelen/Forth500/tree/main/resources
The relevant pages are 31 and 79-82.

Fantastic! Thanks so much.


RE: Access Matrix Functions From Sharp BASIC? - toml_12953 - 08-14-2023 03:30 AM

(08-13-2023 11:51 PM)Helix Wrote:  
(08-04-2023 05:09 AM)toml_12953 Wrote:  Thanks! Now I just have to see if Hrast has created a table of entry points for the PC-E500S.

You will find the procedure in the PC-E500 technical manual, that you can download here, among other interesting documents:
https://github.com/Robert-van-Engelen/Forth500/tree/main/resources
The relevant pages are 31 and 79-82.

Do you know what "scholar" means? is it like "scalar"?


RE: Access Matrix Functions From Sharp BASIC? - Helix - 08-14-2023 09:15 PM

(08-14-2023 03:30 AM)toml_12953 Wrote:  Do you know what "scholar" means? is it like "scalar"?

Yes, "scholar" means scalar. Smile For these operations, you store the value of the scalar in the variable X.
There are sometimes weird formulations in this document, perhaps because it was written by Japanese people?
I was intrigued by the "reversion of symbols" function. In fact, it’s the +/- operation in matrix mode.

I have not tested all the matrix functions, but they should work.


RE: Access Matrix Functions From Sharp BASIC? - toml_12953 - 08-15-2023 02:43 AM

(08-14-2023 09:15 PM)Helix Wrote:  
(08-14-2023 03:30 AM)toml_12953 Wrote:  Do you know what "scholar" means? is it like "scalar"?

Yes, "scholar" means scalar. Smile For these operations, you store the value of the scalar in the variable X.
There are sometimes weird formulations in this document, perhaps because it was written by Japanese people?
I was intrigued by the "reversion of symbols" function. In fact, it’s the +/- operation in matrix mode.

I have not tested all the matrix functions, but they should work.

I've tested determinant, inverse and simultaneous equations (which is really just an inversion and multiplication.) They work very fast and return the correct answers. I'm a happy camper.