Amiga.org

Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: jj on October 10, 2009, 10:48:17 PM

Title: Which Assembler?
Post by: jj on October 10, 2009, 10:48:17 PM
Hi All

I am looking to have a stab at some 68k ASM.  I have a few books on the subject but was wondering which would be the best assembler to use.  Free pref.  Which is the most standard.

Also where would I find info on programming the various custom chips.
Title: Re: Which Assembler?
Post by: xeron on October 10, 2009, 10:50:57 PM
I always found Asm-Pro the best assembler for democoding or game coding. For system coding you should be using C, so i guess i'm recommending Asm-Pro ;-)

The forums at ada.untergrund.net are really great for assembler coding questions.
Title: Re: Which Assembler?
Post by: Karlos on October 10, 2009, 11:14:49 PM
I used phxass, seems pretty capable :)
Title: Re: Which Assembler?
Post by: matthey on October 10, 2009, 11:57:02 PM
I used to use PhxAss but I'm starting to use vasm now. It is by Frank Wille, the same author. Frank is providing great support for it as it's part of vbcc. He fixed a minor issue with the use of macros in less than 1 day for me. I don't think this newest version is available on his web site yet. Let me know if you want it ;). The PhxAss docs are better so you should get them as vasm is similar and can be made compatible. Using vasm and reporting bugs will help vbcc get better.
Title: Re: Which Assembler?
Post by: ChaosLord on October 11, 2009, 01:31:51 AM
What is wrong with PhxAss that made him abandon it and start a whole new assembler? :confused:
Title: Re: Which Assembler?
Post by: matthey on October 11, 2009, 04:12:38 AM
@ChaosLord

I would guess that vasm was created to be more portable and better support vbcc. I don't know how much code vasm and PhxAss share. Here is an interview with Frank that is related...

http://intuitionbase.com/static.php?section=en_FrankWilleInterview
Title: Re: Which Assembler?
Post by: Karlos on October 11, 2009, 10:42:39 AM
Vasm is also very good. I tend not to write entire applications in assembler. Therefore I use whichever assembler integrates best with the compiler I'm also using.
Title: Re: Which Assembler?
Post by: Joloo on October 11, 2009, 10:52:46 AM
The differences between PhxAss and 'vasm' are large.

PhxAss is an AmigaOS and Amiga-Hunk format limited assembler while 'vasm' is a any-platform, many-binary output formats and many CPUs supporting assembler, which is also compatible to the Amiga m68k defacto assembler, Devpac.

For m68k the main difference is that 'vasm' is almost 100 percent Devpac compatible, while PhxAss isn't.
In addition, 'vasm' contains less bugs, or better said, it is not as tolerant as PhxAss.
It even spots more optimisation possibilities.

With version 14b of 'vasm' (not released yet - do you refer to this version, matthey?) it is also possible to create executables in one go without using a linker, which wasn't possible with previous versions:

vasmm68k_mot -Fhunkexe -nosym -ISDK:includes_i source.asm

Unfortunately, Frank Wille is always busy and is working at the same time on several projects, which means that he does not release a version althought it is already ready.


Quote

@matthey
I don't know how much code vasm and PhxAss share.


I would speculate that PhxAss was written in m68k assembler while 'vasm' is written in ANSI-C.
'vasm' was initially written by Dr. Volker Barthelmann (?) but actually I would say that 95 percent of the code is now written by Frank Wille; see all the written backends and output modules.

I personally would use PhxAss for machines only equipped with a m68000 or m68020 CPU while up from a m68030 I would prefer 'vasm', however, what assembler one does use is just a matter of taste.


Quote

@JJ
Also where would I find info on programming the various custom chips.


Amiga Hardware Reference Manual, Aminet and intro/demo scene sites.
Title: Re: Which Assembler?
Post by: pmc/Retro on October 11, 2009, 01:16:32 PM
All my demo code is developed in UltraEdit (text editor) on the PC and then I use Devpac v3.18 to assemble on the Amiga.
 
Use of Devpac seems to be a British thing (the makers, Hisoft, were a British company) as, in my experience, mostly British guys use it.
 
Almost all of the European demos coders I talk to use Asm-One.
 
At the end of the day I agree with Joloo - which assembler you use all comes down to personal taste. The code's the important thing - the assembler's just the tool to assemble it...
 
Get the Hardware Reference Manual for learning the Amiga internals. If you'd like to see some source codes that include the boring but necessary stuff like system takeover etc. then check the Coder's Heaven forums on EAB. You'll find a good few of my sources knocking around on there that you're welcome to. You can always PM me questions as well if you like - I'd be happy to help you out. :-)
 
Anyway, I wish you luck JJ - in my opinion, 68k coding is rewarding and fun. :-)
Title: Re: Which Assembler?
Post by: ChaosLord on October 11, 2009, 01:59:13 PM
Quote from: pmc/Retro;525529
All my demo code is developed in UltraEdit (text editor) on the PC and then I use Devpac v3.18 to assemble on the Amiga.
 
Use of Devpac seems to be a British thing (the makers, Hisoft, were a British company) as, in my experience, mostly British guys use it.
 

I am American and I have been using Devpac for all my game coding for many years.

Quote
Almost all of the European demos coders I talk to use Asm-One.
 
I used it for 1 year in the early 90s.  It had the best user-interface, very very friendly but it was just to darn buggy (and it lacked FPU instructions) so I was forced to switch to Devpac.


Quote
At the end of the day I agree with Joloo - which assembler you use all comes down to personal taste. The code's the important thing - the assembler's just the tool to assemble it...
 

I agree.


Devpac works great with SASC so I was never forced to switch again.
Title: Re: Which Assembler?
Post by: ChaosLord on October 11, 2009, 02:00:09 PM
@joloo

Thanx 4 all the .info
Title: Re: Which Assembler?
Post by: Phx_ on October 11, 2009, 08:32:29 PM
Quote from: pmc/Retro;525529
All my demo code is developed in UltraEdit (text editor) on the PC and then I use Devpac v3.18 to assemble on the Amiga.

UltraEdit sounds like Windows. You could compile vasm, which is 99% Devpac-compatible, for Windows and create your binaries there. Saves you from copying the sources to your Amiga.
 
Quote
Use of Devpac seems to be a British thing (the makers, Hisoft, were a British company) as, in my experience, mostly British guys use it.

I don't think so. Devpac is the de-facto standard for 68k assemblers, even on the Atari. But it was quite expensive at that time.
Title: Re: Which Assembler?
Post by: matthey on October 11, 2009, 08:58:47 PM
Quote from: Joloo;525518
With version 14b of 'vasm' (not released yet - do you refer to this version, matthey?)

Yes, 14b. I requested that it have the Amiga version string in-bedded so it is the first to do so. I reported and Frank fixed the JSRLIB GetMsg type macro generating something like this...

JSR ($FFFFFe8C.L,A6,ZD0.W)

instead of this...

jsr (-372,a6)

The latter is faster and smaller. It probably didn't affect any compiled programs but many assembled programs. He has fixed all this in the last week! The new much improved version of vbcc will be out soon and it will have the new vasm but here is a link for anyone that wants it now...

http://www.heywheel.com/matthey/Amiga/vasm14b.lha

I also included ced 3.5+ ARexx scripts (put in REXX: ) I use to assemble with vasm or PhxAss. They allow a function key to be pressed to assemble and link the current file in ced (use a .asm or .a extension). A window will open displaying all output (errors).

Quote
it is also possible to create executables in one go without using a linker, which wasn't possible with previous versions:

vasmm68k_mot -Fhunkexe -nosym -ISDK:includes_i source.asm

I tried that but it didn't work. I get...

fatal error 17: could not initialize output module

Are you sure the above vasm line is correct?

Quote
I would speculate that PhxAss was written in m68k assembler while 'vasm' is written in ANSI-C.

I suspect that to be true also.

Quote
I personally would use PhxAss for machines only equipped with a m68000 or m68020 CPU while up from a m68030 I would prefer 'vasm', however, what assembler one does use is just a matter of taste.

We don't have a shortage of good assemblers for the Amiga. Vasm has excellent support and can be Devpac or Phxass compatible with a switch. It's nice that it's already included with vbcc which every Amiga developer should already have installed.
Title: Re: Which Assembler?
Post by: pmc/Retro on October 12, 2009, 07:36:23 AM
Quote from: ChaosLord

I am American and I have been using Devpac for all my game coding for many years.


Quote from: matthey

I don't think so. Devpac is the de-facto standard for 68k assemblers, even on the Atari. But it was quite expensive at that time.

That's really interesting to me guys - with all the people using AsmOne I've spoken to I thought I must be one of the only guys around still using Devpac.
 
Perhaps, in that case, use of Devpac is less a British thing like I suspected and it's more just that demo coders mainly use AsmOne. Probably for the very reason you gave matthey - expense - when most of the demo guys started coding stuff as teenagers in their bedrooms way back when they would've used whatever was available easiest and cheapest I suppose...
Title: Re: Which Assembler?
Post by: Phx_ on October 12, 2009, 08:42:27 AM
Quote from: matthey;525579
I reported and Frank fixed the JSRLIB GetMsg type macro generating something like this...

JSR ($FFFFFe8C.L,A6,ZD0.W)

instead of this...

jsr (-372,a6)

That looks evil on first sight, but I have to clarify the scope of this bug: it only happened when all of the following conditions were true:
- assembling for 68020+
- the displacement is an undefined external symbol (GetMsg in this case)
- you didn't specify a discplacement size, like ".w"


Quote

I tried that but it didn't work. I get...

fatal error 17: could not initialize output module

Are you sure the above vasm line is correct?

It is. There is always somebody with a newer beta. ;)
Title: Re: Which Assembler?
Post by: xeron on October 12, 2009, 09:01:32 AM
Hmm.. interesting. I thought nobody used DevPac any more. Certainly in the Amiga demoscene, Asm-One and Asm-Pro are pretty much "the standard".
Title: Re: Which Assembler?
Post by: jj on October 12, 2009, 11:54:21 AM
Thanks all for some opinions and options there.
 
I have not done any assembling or dissasembling for about 17 years or moreand that was Z80 amstrad cpc stuff.  Are all therse options pretty user friendly?
Title: Re: Which Assembler?
Post by: jj on October 12, 2009, 11:55:51 AM
Quote from: xeron;525635
Hmm.. interesting. I thought nobody used DevPac any more. Certainly in the Amiga demoscene, Asm-One and Asm-Pro are pretty much "the standard".

 
Where would I get these.  I am guessing they are commercial ?
Title: Re: Which Assembler?
Post by: jj on October 12, 2009, 11:59:48 AM
Quote from: pmc/Retro;525529
All my demo code is developed in UltraEdit (text editor) on the PC and then I use Devpac v3.18 to assemble on the Amiga.
 
Use of Devpac seems to be a British thing (the makers, Hisoft, were a British company) as, in my experience, mostly British guys use it.
 
Almost all of the European demos coders I talk to use Asm-One.
 
At the end of the day I agree with Joloo - which assembler you use all comes down to personal taste. The code's the important thing - the assembler's just the tool to assemble it...
 
Get the Hardware Reference Manual for learning the Amiga internals. If you'd like to see some source codes that include the boring but necessary stuff like system takeover etc. then check the Coder's Heaven forums on EAB. You'll find a good few of my sources knocking around on there that you're welcome to. You can always PM me questions as well if you like - I'd be happy to help you out. :-)
 
Anyway, I wish you luck JJ - in my opinion, 68k coding is rewarding and fun. :-)


Thanks for the words of support.  I am just looking to have a poke around ( sorry for the pun).  But you never know how far I get into this.  Loved to do all sorts of wierd and wonderful things on the Amsrtrad as had all the manuals for all the chips.
Title: Re: Which Assembler?
Post by: xeron on October 12, 2009, 12:26:07 PM
Quote from: JJ;525647
Where would I get these.  I am guessing they are commercial ?

No, free and open source.

http://aminet.net/package/dev/asm/AsmPro
http://aminet.net/package/dev/asm/ASM-One

Edit: And again, if you need help getting started, the forums at http://ada.untergrund.net are great.
Title: Re: Which Assembler?
Post by: jj on October 12, 2009, 12:28:27 PM
Thanks
Title: Re: Which Assembler?
Post by: pmc/Retro on October 12, 2009, 02:27:02 PM
Quote from: JJ

Thanks for the words of support. I am just looking to have a poke around ( sorry for the pun). But you never know how far I get into this.

No worries guy :-) The main thing is to enjoy yourself - just do that to start with and let the journey take you where it will. :-)
 
By the way, if you'd like to try Devpac it's available around online if you know where to look or I can send you a copy. I actually bought it back in the day so I can send you .adf images or real disks, whatever you need. :-)
Title: Re: Which Assembler?
Post by: matthey on October 12, 2009, 08:13:22 PM
Quote from: Phx_;525632

There is always somebody with a newer beta. ;)


Mine was only like 2 days old too :).

The newest vasm v1.4b (beta) is here...

http://www.heywheel.com/matthey/Amiga/vasm14b.lha

I also updated my ced scripts that assemble with vasm and PhxAss to use vlibos3: assign instead of lib: assign. Now all that is needed for vasm script is to install vbbc and copy the scripts to REXX:. The PhxAss script will also need PhxAss and PhxLnk copied to C: or vbcc:bin. Then go to CygnusEd menu "Special->DOS/ARexx interface->Install DOS/ARexx command..." and type the function key number and then the name of the script in. Then when everything is set, select Save DOS/ARexx Commands in the same sub menu.

I got the -Fhunkexe working but I didn't use it for the ARexx scripts because I have amiga.lib look up function offsets. Vasm is more compatible with the linker.
Title: Re: Which Assembler?
Post by: Joloo on October 18, 2009, 08:42:57 PM
A little late, but better late than never... :)

Quote

@pmc/Retro
That's really interesting to me guys - with all the people using AsmOne I've spoken to I thought I must be one of the only guys around still using Devpac.

Perhaps, in that case, use of Devpac is less a British thing like I suspected and it's more just that demo coders mainly use AsmOne. Probably for the very reason you gave matthey - expense - when most of the demo guys started coding stuff as teenagers in their bedrooms way back when they would've used whatever was available easiest and cheapest I suppose...


Yes, that makes sense.
Although I was one of those, who were able to purchase Devpac (1 and 2) I never did.
I sticked with Seka. The illegal copies of Devpac (1 and 2) I obtained at copy-parties were not comparable with Devpac3. Devpac3 was the assembler which I had to have after I illegally copied it! Because it was nowhere to purchase (not store had it) I wrote a letter to HiSoft in 1992. For 71 £ plus shipping cost I got it - and I have never regretted it!


Quote

@xeron
Hmm.. interesting. I thought nobody used DevPac any more. Certainly in the Amiga demoscene, Asm-One and Asm-Pro are pretty much "the standard".


As Frank (Phx) pointed out, who could afford Devpac3 purchased it.
If I am not mistaken, AsmOne / AsmPro are successors of K-Seka. Clones of K-Seka were used in the 80ths by any demo/intro coder because they were the fastest assemblers available (although all were illegal; K-Seka was the source and disassembled and enhanced in order to produce a clone). Where the duo 'ASSEM' (MetaComCo) and 'Alink' would require more than two minutes to build the executable, K-Seka (I used MasterSeka) required just three seconds. Unfortunately, not one K-Seka clone was conforming with the Motorola syntax, nor they did allow to generate linkable code (K-Seka's link command was just a bad joke). So source codes written and successfully assembled with 'ASSEM' didn't work under K-Seka and clones.
And the same happened with Devpac. Source codes created with Devpac3 couldn't be assembled by using AsmOne / AsmPro nor vice versa, at least not in those times when I tried them. Frankly, even AsmOne / AsmPro would have worked I wouldn't have stopped using Devpac3. I was only curious at these times.


Quote

@matthey
The newest vasm v1.4b (beta) is here...


Not entirely correctly anymore since Frank has since yesterday a new version available (1.4c).
As I already told, he is always very busy. :)

By the way. The official release of 'vbcc 0.9a' (yesterday) does not contain it.


Quote

@matthey
I got the -Fhunkexe working but I didn't use it for the ARexx scripts because I have amiga.lib look up function offsets. Vasm is more compatible with the linker.


Hmm, I never used the 'amiga.lib' in conjunction with any assembler. Because Devpac, which I used in the past, came with all '..._lib.i' files, I used them. And now that I am using 'vasm', I am still using these '...._lib.i' files for 'vasm'. No problems at all.
By the way, I didn't use the 'amiga.lib' for my projects because I don't like relocation data in my executable. If possible, the codes I built using assemblers were PC-relativ and often reentrant, too.
Title: Re: Which Assembler?
Post by: Moto on October 18, 2009, 11:13:31 PM
I used to use k-seka.  Great assembler!  I used it to code demos and was working on an amiga version of bolo back in the day.  That thing was so amazingly fast.
Title: Re: Which Assembler?
Post by: Lando on October 18, 2009, 11:51:01 PM
I started off back in 92 or so with Devpac 3, and I loved it. Then I switched to AsmPro when I came back to Amiga in 2001.  I still much prefer Devpac and only really used AsmPro due to my inability to get a hold of Devpac 3 disks back in the day.  AsmPro is fine, nothing against it, I just found Devpac's editor much better, and more professional.
Title: Re: Which Assembler?
Post by: matthey on October 19, 2009, 05:48:27 AM
Quote from: Joloo;526436

By the way. The official release of 'vbcc 0.9a' (yesterday) does not contain it.


Thanks for the info on the new vbcc release. I posted info on utility.com.

Quote

Hmm, I never used the 'amiga.lib' in conjunction with any assembler. Because Devpac, which I used in the past, came with all '..._lib.i' files, I used them. And now that I am using 'vasm', I am still using these '...._lib.i' files for 'vasm'. No problems at all.
By the way, I didn't use the 'amiga.lib' for my projects because I don't like relocation data in my executable. If possible, the codes I built using assemblers were PC-relativ and often reentrant, too.


I don't use the amiga.lib link functions either. I just use it to look up the function offsets. It would have the latest function offsets compared to your lib.i files. There is nothing wrong with including the lib.i files though. It's probably faster although I can assemble and link just about anything almost instantly.
Title: Re: Which Assembler?
Post by: Sig999 on October 19, 2009, 07:31:15 AM
I don't think there is a best assembler - I guess whatever you can get, that you're happy with, and within your pricerange is the best.

Personally I use Devpac. I got it off a coverdisk back in the day, as did a few of my friends. We started learning together, so it was convenient.

I tried a couple of others, but by then I was familiar and comfortable with Devpac.  When I decided to buy - I bought Devpac 3.  No other reasons really - it was what I was, and still am comfortable with on the Amiga.

I think the days of assembler/language snobbery are well behind us at this point. Most coders have left for other pastimes or greener pastures. Anyone wanting to start something new, in assembly, C, E, Blitz, even Amos is to be commended and supported as far as I'm concerned.

Shop around, hunt around, try things out, and choose what gives you a pleasant experience.
Title: Re: Which Assembler?
Post by: Phx_ on October 19, 2009, 10:00:46 AM
Quote from: Joloo;526436

By the way, I didn't use the 'amiga.lib' for my projects because I don't like relocation data in my executable. If possible, the codes I built using assemblers were PC-relativ and often reentrant, too.

When you use amiga.lib just to resolve the LVOs, as matthey did, there will be no new relocations, because an LVO is an absolute symbol.