Shop OBEX P1 Docs P2 Docs Learn Events
Flexprop - ORGH question — Parallax Forums

Flexprop - ORGH question

pik33pik33 Posts: 2,366
edited 2022-11-28 15:11 in Propeller 2

I tried to put the code into the desired HUB location, so the first guess was using ORGH.

So at the end of the program i did

DAT
        orgh $7C000
'       ..... the rest of the short code I wanted to have at $7C000

What the flexprop did:
it generated a warning:

warning: orgh with explicit origin does not work if Spin methods are present

and then it added $7C000 to the pointer between several existing DAT sections.

As if it started to add the new DAT, found ORGH and added this to the current pointer.
Then, it added more DAT sections, after this, at addresses $9xxxx, generating 700 kB unusable binary file.


The desired behavior is to place the code where ORGH points to, if specified.

Until this is not the case, the error should be generated instead of the warning, as the generated binary is bad. ORGH in reality works there, destroying the binary file


... is there any method to put the code at the desired, constant address?
(of course there is this megayume low/high trick which always can be used...)

Comments

  • No, there is no way to place the code at the desired address, at least not if there are any Spin methods present. orgh $xxx can only work in pure assembly programs.

Sign In or Register to comment.