[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

4840.0. "help getting started with ASM68K" by RGB::ROSE () Mon Jun 24 1991 00:48

    	I am trying to get started using ASM68K from FF081. I can get my
    program to assemble OK. Then I link it using BLINK and the astartup.obj
    from the C= update deverloper's kit. I get an undefined symbol for
    _main in the astartup.obj. I labeled the entry point "_main:" and put a
    
    ENTRY _main
    
    statement at the beginning. It didn't help.
    
    	Can anyone provide an example of a simple ASM68K program and example
    statements for the assembler and linker? Or a pointer to an FF disk?
    Any help would be greatly appreciated.
T.RTitleUserPersonal
Name
DateLines
4840.1Not much help, but ... !FORTY2::CADWALLADERTue Jul 09 1991 15:2638
	Hi there!,

	Your problem rung a bell with me since one of our lecturer's had a
	similar problem at Portsmouth Poly whilst trying to call chunks of
	m/c from C. The problem was due somehow to the way that a C compiler
	will prefix labels with a _ symbol, or maybe expect external references
	to start with _.
	 I believe that you may need tochange *ONE* of the labels to "_main" - 
	I think the one in your assembler code, but not the other one which is
	probably C source which has been compiled to a .OBJ file.
	I am familiar with 68000 (I use DEVPAC II) but unfortunately not so
	with C - I only know the rudiments! Therefore I probably haven't been
	much help. You did not describe exactly what the component astartup.obj
	was for - I guess it allows you to start a project from the Workbench.
	You could try leaving the "main" symbol alone in the assembler and just

	1> BLINK <filename>

	then type the filename from CLI to run it.

	If you are new to assembler and don't know quite where to start I
	*strongly* recommend sampling the ACC (Amiga Coders Club) disks from
	Amiganuts PD which have tutorials (easy to read!) and source code to
	try (some good, some crap). Coincidentally, one of the disks has A68K
	on it BUT with a nice front-end which is partially completed but at
	least allows really easy assembly & linking of files. I do not have my
	AMIGA here with me at Reading (DECPark) yet, but I will collect it in
	1 - 2 weeks, then I can give you more info on ACC disks (I have 1-10),
	and on which one the "new" A68K resides. Also, if you wish I can contact
	one of my friends who will certainly know the answer to your above
	problem, but this will take time since he is probably in Germany by
	now! Let me know what you think, and if you have solved the problem.

	If you are a real beginner I may be able to give you some tips on how
	to get things to work (I'm still thinking about astartup.obj!!!)

							- JIM CAD*
4840.2RGB::ROSEMon Jul 15 1991 18:219
	I did get past the inital hurdle with ASM68K. I can now assemble and 
link successfully. I also found a number of example programs on FF431. But I
would be interested in the ACC disks. Anything to speed up the learning curve
is welcome. Also, if there is a newer version of ASM68K, I would like to get it.

	I have the Abacus book on assembly programming. It's OK as far as it
goes, but it tends to be rather specific to their own developement system
product. It also tends to focus on Amiga specific features, which I already
learned in C. Can anyone recommend a book that is more focused on 68K assembly?