07 December 2014, 17:06 | #1 |
Fernando Cabrera
Join Date: Oct 2013
Location: Spain
Posts: 106
|
Linker to use with AsmOne (68000)
Hi everyone! I've spent some time today trying to find the easiest way to link more than one file using AsmOne (for the 68000) but I wasn't able to find anything. I have a source file which uses xdef for some routines and another source where I use xref to be able to call those routines.
As far as I know I can't do that with AsmOne, can I? It would be great if someone could just point in the right direction about the easiest way to do this, having into account that, as I said before, I'm programming only for the 68000. Thanks in advance! Last edited by nandius_c; 10 December 2014 at 15:10. |
07 December 2014, 19:25 | #2 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,537
|
"wl" writes a linkable object file, doesn't it?
Then proceed with the linker of your choice. |
08 December 2014, 00:00 | #3 | |
Fernando Cabrera
Join Date: Oct 2013
Location: Spain
Posts: 106
|
Quote:
Thanks for your answer . |
|
09 December 2014, 00:05 | #4 |
Registered User
Join Date: Oct 2008
Location: Assemini/Italy
Age: 51
Posts: 23
|
To call the linker inside AsmPro (should work also on AsmOne), I add these lines at the start of the source:
AUTO wl rad:main.o\ AUTO y c:blink rad:main.o LIB path:somelib.lib\ When you assemble, and there are 'No errors', the first line save the Linkable file, while the second line execute the linker to create the executable file. In your work you should assemble and write-linkable one of the file, and put a similar command in the other: AUTO wl rad:main.o\ AUTO y c:blink rad:main.o rad:file1.o TO rad:myexe\ Bye Fabio Last edited by DrCinicus; 09 December 2014 at 09:31. Reason: Forgot '\' in the last line, |
09 December 2014, 01:28 | #5 |
Registered User
Join Date: Oct 2008
Location: EU
Posts: 163
|
OT: "AUTO" was one of the many features which made me buy AsmOne 1.02 as one of the few investments in Amiga software at the time it was released by Rune Gram-Madsen. Was far superior to Seka. Even "hacked" a later version, so the editor would work with DoublePAL when I got the A4000. Best tool ever in my Amiga life...
|
09 December 2014, 12:00 | #6 | |
Fernando Cabrera
Join Date: Oct 2013
Location: Spain
Posts: 106
|
Quote:
blink main.o LIBRARY lib.o TO myexe First, I tried with something like this: blink main.o lib.o TO myexe but it didn't work. Guess it was necessary to specify lib.o as a library. I understand this is all basic stuff but it's new to me, so... thanks again for your help! |
|
09 December 2014, 15:36 | #7 |
Fernando Cabrera
Join Date: Oct 2013
Location: Spain
Posts: 106
|
I've being doing some tests with AUTO in AsmOne and I haven't been able to make it work completely. These are the first lines of my source file main.s:
AUTO wl main.o\ AUTO y BLink main.o LIBRARY lib.o TO myExe\ BLink, main.o and lib.o are in the current directory. When I assemble the source from AsmOne, the first line is executed and generates the main.o file but the second line always produces an "End of File" message and doesn't generate the myExe file. As I said before, I can execute that BLink command from a Shell window and it works. Any ideas? |
09 December 2014, 16:51 | #8 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,537
|
Is lib.o a library (i.e. several object files coalesced) or a single object file? In the last case it should work to omit the LIBRARY keyword. Otherwise there is something wrong.
|
10 December 2014, 10:00 | #9 | |
Fernando Cabrera
Join Date: Oct 2013
Location: Spain
Posts: 106
|
Quote:
Another problem I'm having is with the copperlist. I have a single file, copper.s (attached), which just sets a new copperlist and waits for the left mouse button. If I generate the object file with 'wo copper.o', I can run the exe file from a shell window and it does changes the copperlist and works OK (background color changes to black). BUT, If I do 'wl copper.l' in AsmOne and after that I generate the exe file with 'blink copper.l TO copper', it doesn't work (background color doesn't change). With the WinUAE debugger I see that COP1LC is pointing to an address which is not that of my copperlist. I get the same result from AsmOne if I change 'section data,DATA_C' to 'section data,DATA_F'... |
|
10 December 2014, 10:47 | #10 | |||
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,537
|
Quote:
'wl' writes a linkable object file (not executable until linked). Quote:
Quote:
|
|||
10 December 2014, 11:53 | #11 | |
Fernando Cabrera
Join Date: Oct 2013
Location: Spain
Posts: 106
|
Quote:
EDIT: I have found this link relating to AsmOne v1.48 with info about errors dealing with sections and the 'wl' command... http://www.theflamearrows.info/documents/asmfuture.html It doesn't seem to be the same problem I'm having, but if v1.47 had such a bug, imagine v1.20 (the one I'm using)... Last edited by nandius_c; 10 December 2014 at 12:53. |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Strange AsmOne operator | phx | Coders. Asm / Hardware | 23 | 18 March 2015 23:13 |
AsmOne: Undefined symbol | copse | Coders. Asm / Hardware | 2 | 02 April 2012 01:41 |
AsmOne doesn't like my accelerator... | Photon | Coders. General | 6 | 03 February 2011 23:37 |
AsmOne even directive...? | pmc | Coders. General | 30 | 04 December 2009 09:33 |
ASMOne: Sectors and Tracks | Vortex | Coders. General | 19 | 03 December 2009 08:31 |
|
|