Assembler question

All 680x0 related coding posts in this section please.

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

User avatar
lp
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2312
Joined: Wed Nov 12, 2003 11:09 pm
Location: GFA Headquarters
Contact:

Assembler question

Postby lp » Wed May 10, 2006 6:56 pm

This is not really a question about assembler commands, but about the various assembler packages. Does anyone know of an assembler package that can completely build a DRI Library file directly from one large souce listing?

Generally speaking a library is built up from many smaller object files, then put together to from a library. It's very tedious to rebuild the library if you have alot of modules and making alot of changes. Reason I asked is I noticed in the Devpac v2 manual it can do this but _only_ for GST Libraries. You can do this:

module <name>
.xdef bla..
.xref bla..
.text
[code...]
.data
[data...]
.bss
[bss...]

module <name>
repeat.... as needed

all in one source. Pretty slick actually.

Is there any assembler that can do this for DRI Libs? I really could use one that does this, even if the assembler is old as dirt. ;)

User avatar
ggn
Atari God
Atari God
Posts: 1194
Joined: Sat Dec 28, 2002 4:49 pm

Postby ggn » Wed May 10, 2006 8:26 pm

lp,

not sure if it's what you're after, but the Pure C assembler has a switch called 'Generate DRI-Object file'. Now, if it accepts the syntax you request, that's another thing (I never used libraries anyway :))

Could be worth a try though
Last edited by ggn on Thu May 11, 2006 6:00 am, edited 1 time in total.
is 73 Falcon patched atari games enough ? ^^

ijor
Hardware Guru
Hardware Guru
Posts: 3305
Joined: Sat May 29, 2004 7:52 pm
Contact:

Postby ijor » Thu May 11, 2006 4:51 am

I’m not sure, but I don’t think you’ll find an assembler with that capability. The option of making multiple modules from a single object file is up to the linker and the librarian, not up to the assembler or compiler.

The usual way to deal with this is to use one of the many command shell available and build a script to update the whole library.

Actually, although I didn’t make ST libraries for centuries, I think most C packages have a built-in make facility to make this process automatically.

User avatar
lp
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2312
Joined: Wed Nov 12, 2003 11:09 pm
Location: GFA Headquarters
Contact:

Postby lp » Thu May 11, 2006 4:44 pm

Well devpac will do it in GST format. I could make a GST -> DRI conversion tool.
Anyone know how GST object modules are constructed?

ijor
Hardware Guru
Hardware Guru
Posts: 3305
Joined: Sat May 29, 2004 7:52 pm
Contact:

Postby ijor » Thu May 11, 2006 4:51 pm

lp wrote:Well devpac will do it in GST format.


Of course, but only because the GST linker/librarian and GST object format support multiple modules in a single object file. DRI doesn't.

I could make a GST -> DRI conversion tool. Anyone know how GST object modules are constructed?


Object modules are documented. I think there are already convertion utilities available. But I guess they won't be able to break the single object into multiple modules.

User avatar
lp
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2312
Joined: Wed Nov 12, 2003 11:09 pm
Location: GFA Headquarters
Contact:

Postby lp » Thu May 11, 2006 5:51 pm

ijor wrote:
"Of course, but only because the GST linker/librarian and GST object format support multiple modules in a single object file. DRI doesn't."

That's called a library, at least that is what two of my manuals refer to them as. Just object files stacked one after the other. Dead simple design in that regard.

DRI indeed has these too, same idea, object files simply stacked one after the other. Only difference I see from my point of view, is that devpac forces me compile each and every module one at a time, and then build the DRI library with a seperate tool. The concepts are basically the same though.

Yes a shell would work here. Might be my answer in the end.

ijor
Hardware Guru
Hardware Guru
Posts: 3305
Joined: Sat May 29, 2004 7:52 pm
Contact:

Postby ijor » Thu May 11, 2006 7:19 pm

lp wrote:ijor wrote:
"Of course, but only because the GST linker/librarian and GST object format support multiple modules in a single object file. DRI doesn't."

That's called a library, at least that is what two of my manuals refer to them as. Just object files stacked one after the other. Dead simple design in that regard.


Not exactly. There is a difference between a library, which is a collection of multiple object file modules. And between a single object file that have separate section modules.

I don’t know the internals of the GST format. But I suppose this is an extension to the standard object module model. If all what Devpac does is to produce a library file, then I’d suppose it should be able to do so disregarding GST or DRI output.

User avatar
lp
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2312
Joined: Wed Nov 12, 2003 11:09 pm
Location: GFA Headquarters
Contact:

Postby lp » Thu May 11, 2006 8:57 pm

ijor wrote:
"Not exactly. There is a difference between a library, which is a collection of multiple object file modules. And between a single object file that have separate section modules."

Yes, you can break a module down into sections, but those are required sections at the lowest level. I don't follow your logic here.

As I've said, GST object format is virtually identical to DRI object format. It's like NEO versus DEGAS. Same end result, different file format. Libraries are built the same way. Just object files concatenated together. I've built several tests objects in both formats as well as libs. It's all quite straghtforward.

However devpac refuses to do the task if I set the DRI option. It looks like a design decision on their part. It's also possible its some other command I don't know, because I have no v3 manual. :lol:

ijor
Hardware Guru
Hardware Guru
Posts: 3305
Joined: Sat May 29, 2004 7:52 pm
Contact:

Postby ijor » Thu May 11, 2006 9:59 pm

lp wrote:As I've said, GST object format is virtually identical to DRI object format. It's like NEO versus DEGAS. Same end result, different file format.


No. The basics are shared among all object formats, of course. But there are extra features and data that are specific to each format. For example, the GST format allows multiple imports symbols per expression, DRI does not:

Code: Select all

    xref label1, label2
    dc.l  label2-label1


This is valid only for GST format. And it's not an assembler limitation. You just can't define such an expression in the DRI format.

However devpac refuses to do the task if I set the DRI option. It looks like a design decision on their part.


Might be, but I don't think so. Devpac 3 introduced a new Lattice object format, and deprecates the GST one. You would think that they would implement every possible with their own new format. However you still can't make libraries from a single source file using Lattice (or DRI) format. And you still can if you use GST format.

Again, I don't know the internals of the GST format to be more specific. But it seems that there is something in it that it allows (or at least, it allows easier) making libraries out of single source files.

User avatar
lp
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2312
Joined: Wed Nov 12, 2003 11:09 pm
Location: GFA Headquarters
Contact:

Postby lp » Fri May 12, 2006 10:36 pm

The differences you noted are true, the manual mentions these, but my source is targeted for DRI, so these bonus features of GST won't cause me any problems.

I found docs on GST object files in a book. I at least now I have some info as to the layout of the files. :D

User avatar
charles
10 GOTO 10
10 GOTO 10
Posts: 2253
Joined: Tue Aug 17, 2004 12:11 am
Location: ont. Canada
Contact:

Re: Assembler question

Postby charles » Mon Mar 23, 2009 1:49 am

did you ever come to a resolution about this dri thing lonny?

charles
atari is my lifestyle,not a hobby.
HOLD ON ! ! !,
Im printing unreadable characters ...!

User avatar
lp
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2312
Joined: Wed Nov 12, 2003 11:09 pm
Location: GFA Headquarters
Contact:

Re: Assembler question

Postby lp » Mon Mar 23, 2009 5:29 pm

Sure I solved it way back when this thread died. Based on ijor's shell suggestion I wrote my own custom shell/librarian. It compiles 300+ modules and builds the library and required index for the linker and even installs it into the proper location in my working GBE/GFA set up in one go.

User avatar
charles
10 GOTO 10
10 GOTO 10
Posts: 2253
Joined: Tue Aug 17, 2004 12:11 am
Location: ont. Canada
Contact:

Re: Assembler question

Postby charles » Mon Mar 23, 2009 10:11 pm

ok satisfied ,
never fully satisfied until i see some hard core code ,

but i can see it ,

linking a script of o files to link into a master 'o' dri library ..

gfa is a schinch to use the 'o' files

i think you just use a $X file.o as a local in a procedure then the import names that are declared local too.

but in asm much harder to use a dri 'o' file at compile time, linking one is easy but to test

who helped you with this , you figure out all by self?

charles
atari is my lifestyle,not a hobby.
HOLD ON ! ! !,
Im printing unreadable characters ...!

User avatar
lp
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2312
Joined: Wed Nov 12, 2003 11:09 pm
Location: GFA Headquarters
Contact:

Re: Assembler question

Postby lp » Tue Mar 24, 2009 2:21 am

No one. Just some books, that contained the format details. I already knew what I needed. It just turns out that the DRI format is not as flexible as GST as is explained above in the thread. So I simply wrote a tool to do it. Of course I made it with GFA. :) But since the GFA compiler requires DRI format this is what I must use.


Social Media

     

Return to “680x0”

Who is online

Users browsing this forum: No registered users and 1 guest