Keeping labels between several pieces of code

Questions, bug reports, features requests, ... about the Oric Software Development Kit. Please indicate clearly in the title the related element (OSDK for generic questions, PictConv, FilePack, XA, Euphoric, etc...) to make it easy to locate messages.

Post Reply
User avatar
coco.oric
Flight Lieutenant
Posts: 381
Joined: Tue Aug 11, 2009 9:50 am
Location: North of France
Contact:

Keeping labels between several pieces of code

Post by coco.oric » Sun Jul 13, 2014 6:41 am

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 ?
coco.oric as DidierV, CEO Member
Image Image

User avatar
Xeron
Emulation expert
Posts: 382
Joined: Sat Mar 07, 2009 5:18 pm
Contact:

Re: Keeping labels between several pieces of code

Post by Xeron » Sun Jul 13, 2014 8:12 am

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.

User avatar
Dbug
Site Admin
Posts: 2268
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Keeping labels between several pieces of code

Post by Dbug » Sun Jul 13, 2014 1:12 pm

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests