How can I segment a Palm OS 68K app?

If you have a 68K application written using CodeWarrior for Palm OS, how do you assign individual functions to different segments without manually moving files on the segment tab in the IDE?

+3
source share
2 answers

I use #pragma segment. Much simpler than the CodeWarrior segment tab.

#pragma segment Foo
some code

#pragma segment Bar
some code

Now your code is automatically placed in two different segments.

+3
source

CW 68K linkers support this using .seg files added to your project.

Format

{ "<segment_name>" [= <hex>] "<name1>" ... "<namen>" }
"<segname1>" = "<segname2>"

/, . ( 0x) , Palm OS. . , "#pragma segment".

CodeWarrior, Metrowerks, 68K , . Mac OS 68K Linker, Palm OS 68K Linker, , .

+2

Source: https://habr.com/ru/post/1697101/


All Articles