English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 29 October 2013, 15:39   #1
nandius_c
Fernando Cabrera
 
Join Date: Oct 2013
Location: Spain
Posts: 106
Error "No object" generating executable from ASM-One 1.20

Hi there,

I'm trying to generate an executable from ASM-One 1.20. I assemble the source ('a') and the write the object ('wo test.o') but it keeps saying "No Object". I have read this thread (eab.abime.net/showthread.php?t=37243&page=1) and it all works perfect with the moveq example... I have 'LOAD', 'ORG' and 'JUMPPTR' at the beginning of my source code and I use 'EVEN' and 'SECTION chip, BSS_C' also.

Can anybody help me with this, please?

Thanks!
nandius_c is offline  
Old 29 October 2013, 16:40   #2
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,865
Remove the LOAD/ORG directives as ASM-One can't create an executable when these are used (there's no way to tell AmigaDOS to load to the specified address). If you really need to use absolute addresses you need to save your code as binary and then either crunch it with a cruncher that supports absolute address binaries or create the header yourself and generate the executable.
StingRay is offline  
Old 29 October 2013, 18:08   #3
nandius_c
Fernando Cabrera
 
Join Date: Oct 2013
Location: Spain
Posts: 106
Quote:
Originally Posted by StingRay View Post
Remove the LOAD/ORG directives as ASM-One can't create an executable when these are used (there's no way to tell AmigaDOS to load to the specified address). If you really need to use absolute addresses you need to save your code as binary and then either crunch it with a cruncher that supports absolute address binaries or create the header yourself and generate the executable.
Thanks, StingRay! If I remove LOAD and ORG I get this error: "Relative mode error" pointing to this instruction (I've got plenty of these in the copper list):

dc.w $120,(Spr0_Pad>>16)&$ffff
...

As it is said in ASM-One manual:

"39. Relative Mode Error

If try to use a relativ value as a constant (e.g. word size or in
calculations other than »+ -«) this is the error message you will
get."

How could I solve this?

Thanks again!

Last edited by nandius_c; 29 October 2013 at 18:16.
nandius_c is offline  
Old 29 October 2013, 19:00   #4
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,690
Since you have removed the statements that fixate the program in a specific place in memory, the calculation on this line has no value for "Spr0_Pad". You have to poke it when the program is running.

To do this, remove the calculation causing the error and put a 0 instead. Add a unique label before that copper line, and put a # before the calculation and poke it to that label+2:

Code:
	move.w #(Spr0_Pad>>16)&$ffff,SprP00+2
...

SprP00:	dc.w $120,0 ;<--calculation was here

The line that pokes the copper must be put at the start of your program, so that it has been executed before you start the copper list.
Photon is offline  
Old 29 October 2013, 19:04   #5
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,865
Quote:
Originally Posted by Photon View Post
Since you have removed the statements that fixate the program in a specific place in memory, the calculation on this line has no value for "Spr0_Pad".
Not really true, this is more or less an ASM-One bug/limitation. It doesn't matter where something is located, you can always divide by 65536 (i.e. swap) to get the high word of something. That this calculation has no value isn't true.
StingRay is offline  
Old 29 October 2013, 19:26   #6
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,552
Hmm... I tend to disagree with both of you.

It is neither true that the expression with Spr0_Pad cannot be evaluated nor is it correct that this is an AsmOne bug or limitation.

The problem only appears when creating an executable, because the AmigaDOS hunk file format has no relocation type to represent the high-word of an address (assuming Spr0_Pad is a label in this source and not an equate).
phx is offline  
Old 29 October 2013, 22:18   #7
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,690
Evaluation, reloc, hunk... these are all pretty abstract to a new coder.

Starting to talk about them would make a simple problem confusing. It's better to explain the assembler doesn't know the value yet. Each assembler's different types of temporary internal work-values for its labels is pretty irrelevant to the problem at hand.
Photon is offline  
Old 29 October 2013, 23:11   #8
nandius_c
Fernando Cabrera
 
Join Date: Oct 2013
Location: Spain
Posts: 106
Quote:
Originally Posted by Photon View Post
Since you have removed the statements that fixate the program in a specific place in memory, the calculation on this line has no value for "Spr0_Pad". You have to poke it when the program is running.

To do this, remove the calculation causing the error and put a 0 instead. Add a unique label before that copper line, and put a # before the calculation and poke it to that label+2:

Code:
    move.w #(Spr0_Pad>>16)&$ffff,SprP00+2
...

SprP00:    dc.w $120,0 ;<--calculation was here
The line that pokes the copper must be put at the start of your program, so that it has been executed before you start the copper list.
Thanks Photon! However, it hasn't worked... I've done what you said but I get the same error, now in the line that pokes the addresses into the copper list... Any ideas?
nandius_c is offline  
Old 29 October 2013, 23:31   #9
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,690
Yes, how stupid of me. I did teach how to poke the Logo bitplane pointers in this same tutorial 11, though.

You do the same here, except if you only have a single pointer to poke you don't need a loop.

To set a sprite pointer, change to:

Code:
move.l #Spr0_Pad,d0
swap d0
move.w d0,SprP00+2
swap d0
move.w d0,SprP01+2

...

SprP00: dc.w $120,0
SprP01: dc.w $122,0
The logo bpl pointer poke loop was warm-up for the cleanup of the source. Be patient and await the next tutorials, because I'm very busy now.
Photon is offline  
Old 30 October 2013, 00:20   #10
nandius_c
Fernando Cabrera
 
Join Date: Oct 2013
Location: Spain
Posts: 106
Quote:
Originally Posted by Photon View Post
Yes, how stupid of me. I did teach how to poke the Logo bitplane pointers in this same tutorial 11, though.

You do the same here, except if you only have a single pointer to poke you don't need a loop.

To set a sprite pointer, change to:

Code:
move.l #Spr0_Pad,d0
swap d0
move.w d0,SprP00+2
swap d0
move.w d0,SprP01+2

...

SprP00: dc.w $120,0
SprP01: dc.w $122,0
The logo bpl pointer poke loop was warm-up for the cleanup of the source. Be patient and await the next tutorials, because I'm very busy now.
Now I'm able to assemble without errors and (after removing LOAD and ORG) generate the executable. BUT there must be something else because if I leave LOAD and ORG screen gets drawn and everything works perfect, but if I remove them I just get an empty screen (though I can still exit with keys and mouse). I'm trying to figure out the problem but any suggestion would be welcome.
nandius_c is offline  
Old 30 October 2013, 00:52   #11
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,690
What you're doing is adapting a whole source in the middle of its development. The reason it's doesn't work to write an object file from it is because it isn't made for that yet. I've briefly shown the SECTION statements to warm viewers up for the change. Likely you just need to add SECTION mydemo,CODE_C at the start and it will work. If you still get problems, you need to link or attach your source.
Photon is offline  
Old 30 October 2013, 07:02   #12
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,865
Quote:
Originally Posted by phx View Post
Hmm... I tend to disagree with both of you.

It is neither true that the expression with Spr0_Pad cannot be evaluated nor is it correct that this is an AsmOne bug or limitation.

The problem only appears when creating an executable, because the AmigaDOS hunk file format has no relocation type to represent the high-word of an address (assuming Spr0_Pad is a label in this source and not an equate).
It is an ASM-One limitation because it can not resolve this properly even if absolute addresses are used and the data is in the same section. Other than that you are correct of course.


Quote:
Originally Posted by Photon View Post
Starting to talk about them would make a simple problem confusing. It's better to explain the assembler doesn't know the value yet. Each assembler's different types of temporary internal work-values for its labels is pretty irrelevant to the problem at hand.
In my opinion it is better to also give the reason so he can solve similar problems on his own next time! And he will have to deal with hunks, relocations and all that stuff sooner or later anyway.


Quote:
Originally Posted by nandius_c View Post
Now I'm able to assemble without errors and (after removing LOAD and ORG) generate the executable. BUT there must be something else because if I leave LOAD and ORG screen gets drawn and everything works perfect, but if I remove them I just get an empty screen (though I can still exit with keys and mouse). I'm trying to figure out the problem but any suggestion would be welcome.

This is probably because the code assumes that the screen is located at a fixed address (often done to speed up some effects since if the screen is aligned only the low word needs to be modified). Can you upload your source somewhere? Would make it easier to check.
StingRay is offline  
Old 30 October 2013, 10:28   #13
nandius_c
Fernando Cabrera
 
Join Date: Oct 2013
Location: Spain
Posts: 106
Quote:
Originally Posted by Photon View Post
What you're doing is adapting a whole source in the middle of its development. The reason it's doesn't work to write an object file from it is because it isn't made for that yet. I've briefly shown the SECTION statements to warm viewers up for the change. Likely you just need to add SECTION mydemo,CODE_C at the start and it will work. If you still get problems, you need to link or attach your source.
Thanks again, Photon! It worked! Though I guess that having CODE_C at the beginning of the code is not the best idea for the final version. But it's OK for me at this moment as the only thing I needed was generating the executable so that I can send it to the person who is doing the graphics for the game. Later on I hope I will be able to find the right solution, with some help, probably...
nandius_c is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hired Guns WHDload Error #205 (object not found) on writing "SavedGames/Track00"? dex support.Games 12 08 February 2019 03:35
"Exception "Line 1111 Emulator" ($2c) Error at $1004" when exiting game demolition support.WinUAE 15 30 November 2012 16:43
Aminet ZipPPC "not executable" ??? keropi support.Apps 5 02 April 2007 13:51
"DOS-Error #205 (object not found) on reading "devs:kickstarts/kick 40068.a4000" Brutal_dentist New to Emulation or Amiga scene 10 03 April 2005 23:12
"DOS-Error #205 (object not found) on reading "devs:kickstarts/kick 40068.a4000" Unregistered New to Emulation or Amiga scene 1 22 December 2004 09:48

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 18:59.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.10005 seconds with 13 queries