On 19.03.2015 15:57, Harry Potter wrote:
> I have DASS and want to start programming in it. Now, I have ideas
> that require multiple modules. Now, I know that, if I want to
> compile multiple modules, I compile the "slave" first then the
> "master." Now, by slave/master is that the "master" can access the
> information in the "slave" and not the other way around. However, I
> want *every* module to be able to access every other. Is this
> possible? Also, I want to relocate code and data in a DASS program.
> I assume that I need to calculate the run offset as:
>
> run=load start offset-load+run start offset
>
> where run is the label used to access the function and the offsets
> are the beginning of the block to be relocated. Thank you for
> listening!
>
Why you must compile the slaves first?
On 65xx platform, there is no such thing as protected memory. You can
access the data without restrictions. The cpu does not make difference
between master or slave programs nor program data or actual data.
What program is DASS. Is it a assembler or something else?
If it is an assembler, you just make a common data area and use that. If
you have loaded all code to memory, you can access all from all. If it
is not in memory, you must load it to memory to access it. Assembly
language takes off the borders of higher level languages, and you get
fine grain control of the machine. But if it is a higher level language,
then I cannot help.
In assembly language you can create a self-relocating code. If you load
the code in main program, you can tell the slave program where it has
been loaded. Then you can have a relocate code that repairs the needed
jumps and then execute the code. If you make a program that is loadable
in all machines, you just need to read the begin of basic and then
change the code accordingly. After that, detect the machine and ram
configuration. In theory, you are able to make a software that detects
if it is running on a Commodore Pet, Vic20, c64, c128 or anything based
on a 6502 family processor. Then you can load common parts and if the
program handles screen, a screen driver that is unique to machines. All
this can be automated by proper programming, since the kernal roms of
the system are similar.
But if DASS is not an assembler, I cannot help you.
--- MBSE BBS v1.0.4 (GNU/Linux-i386)
* Origin: Elisa Customer (3:633/280@fidonet)
|