Hello, i wanted to adapt an old game on the oric and i've a problem to solve. I don't know how to do it with osdk
In the case of the program is too heavy to keep it in one part of code :
For example, i'll have :
$500 : main.c with .s subroutines and global datas
+
$4000 sub program 1 to do one thing
$4000 sub program 2 to do another thing
sub program x will be loaded and called by main.c
but to implement it easily, i'll have to keep labels of subroutines (in assembleur) and global datas in the code to develop sub program x.
What's the best way to do it with osdk ?
Keeping labels between several pieces of code
- coco.oric
- Squad Leader
- Posts: 720
- Joined: Tue Aug 11, 2009 9:50 am
- Location: North of France
- Contact:
Keeping labels between several pieces of code
coco.oric as DidierV, CEO Member
Historic owner of Oric, Apple II, Atari ST, Amiga
Historic owner of Oric, Apple II, Atari ST, Amiga
Re: Keeping labels between several pieces of code
I would have jump tables at the start of your sub programs. That way the code and labels can move around and it won't matter because the jump table order stays the same.
Re: Keeping labels between several pieces of code
XA apparently supports the concept of "label lists" that can be imported and exported:
http://osdk.defence-force.org/index?pag ... =assembler
I never used that, but it's probably possible to compile your first module so it outputs the list of labels/addresses in a file, and then use that as an input for the secondary modules.
I never actually played with that, so it may or may not be working as I think.
http://osdk.defence-force.org/index?pag ... =assembler
I never used that, but it's probably possible to compile your first module so it outputs the list of labels/addresses in a file, and then use that as an input for the secondary modules.
I never actually played with that, so it may or may not be working as I think.