PureAssembler and ORG

All 680x0 related coding posts in this section please.

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

User avatar
Arne
Captain Atari
Captain Atari
Posts: 466
Joined: Thu Nov 01, 2007 10:01 am

PureAssembler and ORG

Postby Arne » Tue Dec 04, 2018 1:39 pm

So I need to write a little ASM code (C is out of question for this... unfortunately). I want:
  • project files
  • 68020+ code
No problem with PASM. It understands 68020+ mnemonics and I can use Pure C's project files for making the output file.
BUT... has anyone ever used the ORG directive?
I need to write code located at $FA0000 (cartridge port) so I put an

Code: Select all

ORG $FA0000

at the beginning. What happens is that PureLinker runs amok! For about 200 lines of code it generates a 16MB .o file and then quits with out-of-memory error. If I remove the ORG directive it links fine. Anyone else encountered this issue?

Is there an assembler providing 68020+ mnemonics and has a makefile system around? I know that Devpac can generate 68020+ code but does it come with multiple-file project capability? I tries Turboassembler but it doesn't support what I want.
I want to avoid stuffing all code in a single file.

Thanks, Arne
Image

ThorstenOtto
Captain Atari
Captain Atari
Posts: 448
Joined: Sun Aug 03, 2014 5:54 pm

Re: PureAssembler and ORG

Postby ThorstenOtto » Tue Dec 04, 2018 2:44 pm

Instead of using ORG, just tell the linker to link at text segment address $FA0000. Only culprit: it then creates a 38-byte long header instead of the usual GEMDOS program header that you have to remove afterwards.

BTW: does anybody know about that header? I've never seen it from any other tool. It starts with the magic $6024.

User avatar
Arne
Captain Atari
Captain Atari
Posts: 466
Joined: Thu Nov 01, 2007 10:01 am

Re: PureAssembler and ORG

Postby Arne » Tue Dec 04, 2018 4:24 pm

Hello Thorsten,

I do have two copies of PureC. One came with three manuals (Compiler, Assembler and Debugger) the other one with one big manual.
That one includes a chapter about PureLinker:

Image

You were talking about the -T option? Naturally I will not have DATA or BSS segements.

Thanks, Arne
Image

ThorstenOtto
Captain Atari
Captain Atari
Posts: 448
Joined: Sun Aug 03, 2014 5:54 pm

Re: PureAssembler and ORG

Postby ThorstenOtto » Tue Dec 04, 2018 4:45 pm

Arne wrote:One came with three manuals (Compiler, Assembler and Debugger) the other one with one big manual.


Oh. I can't remember that i ever had a manual. Not that i missed it, thx to the online help. But thanks for the info.

You were talking about the -T option?
Naturally I will not have DATA or BSS segements.


Yes. I think if you only specify -T, the linker will just use the normal order of text+data+bss. Not that bss in a ROM makes much sense... but readonly-data can be put there, too.

ThorstenOtto
Captain Atari
Captain Atari
Posts: 448
Joined: Sun Aug 03, 2014 5:54 pm

Re: PureAssembler and ORG

Postby ThorstenOtto » Tue Dec 04, 2018 4:46 pm

Oops. Duplicate deleted.

User avatar
Arne
Captain Atari
Captain Atari
Posts: 466
Joined: Thu Nov 01, 2007 10:01 am

Re: PureAssembler and ORG

Postby Arne » Tue Dec 04, 2018 6:56 pm

ThorstenOtto wrote:It starts with the magic $6024.


To me it seems that the magic isn't a magic. $6024 is the machine code for BRA with 8bit displacement ($24 = 36dec). :idea:
Image


Social Media

     

Return to “680x0”

Who is online

Users browsing this forum: No registered users and 5 guests