[TI-59/58] Percentage calculation.
|
05-23-2016, 01:46 AM
Post: #1
|
|||
|
|||
[TI-59/58] Percentage calculation.
000 76 LBL
001 11 A 002 82 HIR 003 03 03 004 82 HIR 005 11 11 006 82 HIR 007 43 43 008 82 HIR 009 13 13 010 55 / 011 01 1 012 00 0 013 00 0 014 54 ) 015 91 R/S Ex: 150 + 17 [A] 175.50 150 - 17 [A] 124.50 Systems Analyst 48G+/58C/85B/PC1500A TH-78A/DooGee S9 Focal & All Basic´s |
|||
05-23-2016, 02:08 AM
Post: #2
|
|||
|
|||
RE: [TI-59/58] Percentage calculation.
Very nice use of the TI-58/59 Hierarchical registers!
|
|||
05-23-2016, 01:59 PM
(This post was last modified: 05-23-2016 02:32 PM by Dieter.)
Post: #3
|
|||
|
|||
RE: [TI-59/58] Percentage calculation.
(05-23-2016 02:08 AM)Gene Wrote: Very nice use of the TI-58/59 Hierarchical registers! For those who never heard about the HIR commands and their use: take a look here. So the HIR sequence in the program can be entered this way: Code: Enter this get that Hint: the program assumes there are no other pending operations. To be sure, press [CLR] or [=] before using this program. Question to the TI experts: would it be possible to directly multiply percentage and base number within H2? And do the division by 100 also in H2 (by a HIR 62) in order to recall the final result from there? My idea is something like this: Code: 150 [+] 17 [A] => 25,50 Edit: I have absolutely no idea if this may work, but you get the idea (in this case still using the third hierarchy register). Code: 000 76 LBL Please let me know if (and why) this will not work – and how to make it work. ;-) Dieter |
|||
05-23-2016, 03:54 PM
Post: #4
|
|||
|
|||
RE: [TI-59/58] Percentage calculation.
Perfect :-)
Systems Analyst 48G+/58C/85B/PC1500A TH-78A/DooGee S9 Focal & All Basic´s |
|||
05-23-2016, 11:18 PM
Post: #5
|
|||
|
|||
RE: [TI-59/58] Percentage calculation.
and more completely, the code provided by Dieter works perfectly and as described.
Very nice. |
|||
05-24-2016, 12:54 AM
(This post was last modified: 05-24-2016 01:07 AM by hp41cx.)
Post: #6
|
|||
|
|||
RE: [TI-59/58] Percentage calculation.
2 bytes (step) less ;-)
Code: 00 76 LBL Systems Analyst 48G+/58C/85B/PC1500A TH-78A/DooGee S9 Focal & All Basic´s |
|||
05-24-2016, 09:48 AM
(This post was last modified: 05-24-2016 09:58 AM by Dieter.)
Post: #7
|
|||
|
|||
RE: [TI-59/58] Percentage calculation.
(05-24-2016 12:54 AM)hp41cx Wrote: 2 bytes (step) less ;-) Ah, great, so it really can be done directly within the second hierarchy register. BTW, is the initial HIR 02 required? The last time I got my hands on a TI58/59 was at school in the early Eighties. Can someone recommend a good PC emulator that behaves more or less exactly as the real thing? Dieter |
|||
05-24-2016, 10:20 AM
Post: #8
|
|||
|
|||
RE: [TI-59/58] Percentage calculation.
Systems Analyst 48G+/58C/85B/PC1500A TH-78A/DooGee S9 Focal & All Basic´s |
|||
05-24-2016, 12:24 PM
(This post was last modified: 05-24-2016 12:34 PM by Dieter.)
Post: #9
|
|||
|
|||
RE: [TI-59/58] Percentage calculation.
(05-24-2016 12:54 AM)hp41cx Wrote: I just tried this on Hrastprogrammer's TI59E emulator that is said to run the original microcode. Here the .01 HIR 42 sequence does not work (after the HIR command the display switches from .01 to 100), but 100 HIR 62 does it. So this is the final version: Code: 000 76 LBL BTW, answering my own question: obviously the last operand (the one in the display) is not automatically stored in HIR, so the initial HIR 02 is required. Dieter |
|||
05-30-2016, 06:05 PM
Post: #10
|
|||
|
|||
RE: [TI-59/58] Percentage calculation.
hp41cx,
thank you to report my emulator. Dieter, I recommend you, certainly, my emulator but you can also see the links to other emulators in the menu "Emulators" on my website ti58c.mooo.com . For the HIR feature, my emulator allows to use it, but I do not use these registers in the basic operations (H0... H9 registers are independent of standard operations.) but the HIR command is usable via the calculator keyboard. (Remember that my emulator offers more than 100 programs and more than 200 skins!) Enjoy with TI emulator and find again the pleasure to use an old but great technology of the twentieth century. http://ti58c.phweb.me http://clones.phweb.me http://www.instagram.com/ti58c "No! Do or Do not. There is no try!" [Master Yoda] |
|||
06-01-2016, 07:45 AM
Post: #11
|
|||
|
|||
RE: [TI-59/58] Percentage calculation.
(05-24-2016 12:24 PM)Dieter Wrote:(05-24-2016 12:54 AM)hp41cx Wrote: Although that .01 HIR 42 result looked like bug at first, I checked it on all TI-59 emulators I have access to, and they all produced the same result: (1) My TI-59E for HP-48SX/48G+/48GX/49G/49G+/50G (2) My TI-59E for Windows (3) TI-59 emulator by Hynek Sladky (Windows console version) (4) TI-59 emulator by Willibald Meyer (Windows version) I believe the real TI-59 should behave the same, but I don't have a working one to check it ... https://www.hrastprogrammer.com/hrastwood/ https://hrastprogrammer.bandcamp.com/ |
|||
06-01-2016, 10:52 AM
Post: #12
|
|||
|
|||
RE: [TI-59/58] Percentage calculation.
08 93 .
09 00 0 10 01 1 11 82 HIR 12 42 42 OK! In a real TI-58C. Systems Analyst 48G+/58C/85B/PC1500A TH-78A/DooGee S9 Focal & All Basic´s |
|||
06-01-2016, 12:17 PM
(This post was last modified: 06-02-2016 12:08 PM by Dieter.)
Post: #13
|
|||
|
|||
RE: [TI-59/58] Percentage calculation.
(06-01-2016 10:52 AM)hp41cx Wrote: 08 93 . Very interesting. OK, the 58C has a ROM that's different from the 59. Since it appeared quite a while after the 58/59 were released this could be a kind of bugfix. I did some more tests on TI59.EXE for Windows, using a short test program: Code: 000 76 LBL This loads the first HIR with 1 and multiplies this by the input before the register is finally recalled. So if everything works as expected the output should match the input. Here is what I got: Code: input output So in numbers with negative exponent the sign of the latter is ignored. 0,1 = 1E-1 becomes 1E+1 = 10, and 5E-5 becomes 5E+5 = 500000. But wait, it's getting even better: Code: input output So very small values are handled correctly while for larger ones the sign of the exponent is ignored. Further tests showed that the limit seems to be 5E-11. See below. Now let's enter values below 1 in EE mode. Code: input output So in EE mode everything sees to work fine! Now let's try ENG mode Code: 2nd ENG So ENG mode seems to work fine, too. All in all it turned out that the problem with the ingored exponent sign only occured if the number was displayed without an exponent. That's why 5E-11 still shows the problem (display is rounded to ,0000000001) while 4,99E-11 has no problems (display is 4,99 -11). Is this strange, or what? BTW, I just discovered some other odd behaviour, not sure whether it's the same on a real hardware 58/59/58C: Code:
So even after a number has been entered or calculated, pressing EE seems to re-edit the exponent. Dieter |
|||
06-01-2016, 04:23 PM
Post: #14
|
|||
|
|||
RE: [TI-59/58] Percentage calculation.
Well, I was finally able to revive my ancient TI-59 by using an stabilized power supply and that .01 HIR 42 thing behaves exactly like on the above emulators. Using 100 HIR 62 gives the correct result.
https://www.hrastprogrammer.com/hrastwood/ https://hrastprogrammer.bandcamp.com/ |
|||
06-01-2016, 04:33 PM
Post: #15
|
|||
|
|||
RE: [TI-59/58] Percentage calculation.
And I can also confirm that all other calculations from this thread are the same on the real TI-59 ...
https://www.hrastprogrammer.com/hrastwood/ https://hrastprogrammer.bandcamp.com/ |
|||
06-01-2016, 06:30 PM
Post: #16
|
|||
|
|||
RE: [TI-59/58] Percentage calculation.
So it appears the TI-58C acts differently. Very curious!
|
|||
06-02-2016, 01:13 AM
Post: #17
|
|||
|
|||
RE: [TI-59/58] Percentage calculation.
Code: input display Systems Analyst 48G+/58C/85B/PC1500A TH-78A/DooGee S9 Focal & All Basic´s |
|||
06-02-2016, 03:57 AM
Post: #18
|
|||
|
|||
RE: [TI-59/58] Percentage calculation.
(06-02-2016 01:13 AM)hp41cx Wrote: This is the same as on the real TI-59 and emulators because the original sequence is missing = before INV EE. https://www.hrastprogrammer.com/hrastwood/ https://hrastprogrammer.bandcamp.com/ |
|||
06-02-2016, 05:05 AM
(This post was last modified: 06-02-2016 06:27 AM by HrastProgrammer.)
Post: #19
|
|||
|
|||
RE: [TI-59/58] Percentage calculation.
(06-01-2016 06:30 PM)Gene Wrote: So it appears the TI-58C acts differently. Very curious! Yes. I am now trying to extract a TI-58C ROM dump https://www.hrastprogrammer.com/hrastwood/ https://hrastprogrammer.bandcamp.com/ |
|||
06-02-2016, 12:07 PM
Post: #20
|
|||
|
|||
RE: [TI-59/58] Percentage calculation. | |||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)