41 MCODE: PANAME ROM Bugs



#10

While looking at the PANAME source code (in search of exportable functions, I confess it) I noticed a few weird-looking code lines that may well be plain bugs.

They're on Port_Dependent calls within the same quad, which in theory should read like:

379

03C

addr

but they read like:

375

03C

addr

Did they have something else in mind or it's just an error? (if so, it's quite repetitive!)

This occurs in the following addresses:

Lower ROM: E16, E20

Upper ROM: 0A6, 0AF, 768, 783, 980, B53, B5E.

Edited: 22 Jan 2011, 6:49 a.m.


#11

My Emu41 shows the code as :

8E16  375 03C      GSUBNC =GOSUBH

GOSUBH is a variant of the GOSUB entry point:

=GOSUBH
0FDD 260 SETHEX
=GOSUB
0FDE 1B0 C=STK
0FDF 330 CXISA
etc...

J-F


#12

Thanks J-F. Pointing to the SETHEX line may not be of any help, as the address won't be properly calculated with the CPU in DEC mode!

So perhaps a superfluous step, or at worst an error (if SETHEX is not done prior to the call).


#13

The two word GOSUB instruction (not label) does not care if the mode is in hex or dec, it works fine. The GOSUB routine (which picks up the third word) needs to be in hex mode so the alternative entry point ensures hex mode in case it was in dec.


Quote:
Thanks J-F. Pointing to the SETHEX line may not be of any help, as the address won't be properly calculated with the CPU in DEC mode!

So perhaps a superfluous step, or at worst an error (if SETHEX is not done prior to the call).



#14

So effectively calling GOSUBH saves one code line, as there's no need to call SETHEX before it (as it happens with GOSUB). Nice trick...


#15

Go document :)

#16

Just wondering, do you have the *original* Paname source files, possibly with symbols and comments? It could be very interesting.

And BTW, there are bugs in the Paname module, related to the RGXTR and RGORD functions...

J-F


#17

No, I don't have any original source code for any module, or the OS either - I wish! Imagine, all the dark corners documented and explained in plain light... mmm.

What I have is "blueprints", result of disassembling plus uncountable hours of code-smithing going over the listing. Some are posted at TOS (basically my own modules), and others are still being worked on. I did the CCD and the AECROM, the PANAME is next.

These are EXCEL documents, with hyperlinks to navigate between calls and subroutines. It's quite friendly in my opinion, albeit not everybody's cup of tea.

If you're interested I'll send you a copy once it's "done".

Cheers,
'AM


#18

Me too. It will go up on the MCODE wiki :)


Possibly Related Threads...
Thread Author Replies Views Last Post
  Digging for bugs Stefan Dröge (Germany) 2 309 11-13-2013, 04:39 PM
Last Post: Stefan Dröge (Germany)
  HP-41 MCODE: The Last Function - at last! Ángel Martin 0 226 11-08-2013, 05:11 AM
Last Post: Ángel Martin
  [HP-Prime] Simple Game (Bugs) CompSystems 1 310 11-01-2013, 10:18 AM
Last Post: Han
  HP-35s Cos[x] and Tan[x] bugs resolved? Thomas Windisch 2 333 10-31-2013, 01:12 PM
Last Post: Dieter
  RPN bugs both present in Prime Calc and emulator Eelco Rouw 9 647 10-16-2013, 12:22 PM
Last Post: Eelco Rouw
  [HP-Prime] AND, OR BUGs? CompSystems 0 186 10-04-2013, 04:03 PM
Last Post: CompSystems
  HP 50g: question about bugs Miguel Toro 2 300 09-26-2013, 01:27 PM
Last Post: Miguel Toro
  [HP-Prime xcas] operations with complex numbers + BUGs + Request CompSystems 9 770 09-08-2013, 10:40 PM
Last Post: CompSystems
  [HP_Prime] definition of functions, APPLY command and BUGs CompSystems 1 281 09-05-2013, 03:59 PM
Last Post: CompSystems
  [HP-Prime xCAS] Review Polynomial Tools + BUGs + Request CompSystems 0 210 09-05-2013, 12:53 PM
Last Post: CompSystems

Forum Jump: