HP Forums

Full Version: 41 MCODE: PANAME ROM Bugs
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

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.

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

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).

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).


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...

Go document :)

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

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

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