Amiga.org

Amiga computer related discussion => Amiga Tutorials => Topic started by: Corrie on November 16, 2003, 11:24:08 AM

Title: Learning to code on the Amiga
Post by: Corrie on November 16, 2003, 11:24:08 AM
Hi all,

For those of you who have some skill in coding in ASM on the Amiga, is there a very good tutorial for it anywhere, that explains the basics right through to advanced, aswell as the programs you need to compile and edit code?

Any reccomendations?


Title: Re: Learning to code on the Amiga
Post by: Amiga1200PPC on November 16, 2003, 11:41:58 AM
Forget it.
Coding in Asm is not recommendable.
Try at least C.
Even better would be something like C++, Modula2 or Oberon2.
If you don't know any high level language, your Asm or C programs will be utmost crap.
You program with a compiler language which are normally fast enough, if you really need hand written asm you simply rewrite some of the functions of your program in asm after it is running stable in the higher level language.
Title: Re: Learning to code on the Amiga
Post by: alx on November 16, 2003, 11:51:50 AM
@Corrie

While I'm not much of a programmer myself, I agree entirely with Wishmaster.  ASM isn't known for being easy to learn or portable (try porting that ASM app from 68k Amiga to A1/Peg :-) )  Of course if you're writing a hardware-hitting demo then that won't exactly matter...

BTW there's an ongoing C tutorial in Total Amiga magazine.
Title: Re: Learning to code on the Amiga
Post by: thorrin on November 16, 2003, 01:38:30 PM
Waaaay back in 1993, I downloadad an Amiga 'C' tutorial off of aminet.  Very nice indeed and it was very well written.  I only have a hardcopy of it now.

If you REALLY want to learn assembly, I have a book here called Amiga Machine Language.  It was published by Abacus in 1990.  It shows you intuition stuff like windows, event handling, requestors, etc and disk IO.  Pretty dern nice book, BUT I would STRONGLY recommend that you experiment with 'C' first.  I learned the basics of programming in 'C' and then kinda translated some things into ASM.  Much easier that way :)

Of course, you may be a better programmer than I was back then, but with the 'C' code, it was easier to focus on the structures and stuff that was going on as opposed to having to learn structures AND fight 68000 Assembly at the same time.

-Thorrin
Title: Re: Learning to code on the Amiga
Post by: Skippy on November 16, 2003, 02:03:22 PM
I've got some stuff for you on my website: here (http://www.amigarealm.com/resources/coding.htm)

Aminet is also a good point of reference and I can't remember which issue but LSD's Grapevine magazine ran a tutorial on programming.

I 'was' a 680xx coder between 1991-97ish and have quite a large resource of reference material that I archived, which incidently I was thinking of sorting out and uploading some day.

Have a word with this guy

http://www.petergordon.org.uk/

he's a very good ASM coder, hi pete :)

Skippy

.moo: BTST #6,$BFE001
BNE.S .moo

Mmmm, interesting Mr Bond...
Title: Re: Learning to code on the Amiga
Post by: Jose on November 16, 2003, 02:20:24 PM
Hey! Cool, so I'm not the only one learning assembler these days...
I started last year but don't have much time.
Didn't found a comprehensive tutorial thgout but
"Mastering Amiga Assemble"r by Paul Overaa is a  GREAT book!

There are some very good tutorials on Aminet but they omit some stuff IMO.

 

Title: Re: Learning to code on the Amiga
Post by: Monoxyde on November 16, 2003, 03:14:27 PM
Quote

alx wrote:

BTW there's an ongoing C tutorial in Total Amiga magazine.


Yes, and since it's only three months between each lessons you'll become a good programmer in, say, 10 years ;-)

If the author of the tutoral is following this thread (DaveP, or is my RAM failing me?), would it be possible to make the entire tutorial available on the website for subscribers of TAM? If it's already written, that is. It's just too long to wait a year or so to get into the fun parts.
Title: Re: Learning to code on the Amiga
Post by: that_punk_guy on November 16, 2003, 03:21:15 PM
You could look at car boot sales, etc for old copies of CU Amiga or AF, they ran a lot of tutorials over the years...
Title: Re: Learning to code on the Amiga
Post by: amigau on November 16, 2003, 05:47:36 PM
there's quite a bit on our site as well, including some downloadable code samples, depending on the language at issue:

http://www.amigau.com/c-programming/cphome.html

kevin orme
amiga university
www.amigau.com
Title: Re: Learning to code on the Amiga
Post by: Trev on November 16, 2003, 08:23:06 PM
You'll want to track down a dealer that carries the latest Amiga Developer CD (http://www.haage-partner.com/products/aos35/aos35-devcd21-e.htm). Then head over to Motorola's semiconductor (http://e-www.motorola.com/) site and grab the 680x0 documentation (check the Design Support link). Finally, head over to Aminet (http://www.aminet.net/) and search for an assembler. I don't have my dev CD handy to check, but there might be an assembler on there as well.

GoldED (http://golded.dietmar-eilert.de/) is a popular text editor / IDE.

Trev
Title: Re: Learning to code on the Amiga
Post by: Prod on November 16, 2003, 10:54:25 PM
Yo there, and welcome to the wonderful world of professional
programming. :-)
This should be a good place to start, tutorials and cool downloads:
http://www.algonet.se/~chaozer/assembler.html (http://www.algonet.se/~chaozer/assembler.html)
And btw, forget about C and its cheap clones, its older than me and
beyond useless, its main purpose nowadays is to make new
versions of Windows and related horrors, if its a headache you want
you should rather just install a few Linuxes or something. :-)
For the best of Assemblers i would suggest the amazing Devpac 3, it is
very cheap these days:
http://www.hisoft.co.uk (http://www.hisoft.co.uk)
Title: Re: Learning to code on the Amiga
Post by: twizzle on November 16, 2003, 11:12:39 PM

 why dont you try st andrews university in scotland
 they have got loads of amiga programming stuf
 on the amiga.
 mike
Title: Re: Learning to code on the Amiga
Post by: wildstar1063 on November 17, 2003, 01:41:57 AM
I was thinking about learning assembler the other day
 and went looking for a tutorial and found this:


Amiga Assemlber Tutorial (http://www.algonet.se/~davsjo/amigaasm.html)

The tutorials are at the bottom

Chuck
Title: Re: Learning to code on the Amiga
Post by: iamaboringperson on November 17, 2003, 03:50:51 AM
Quote

Corrie wrote:
Hi all,

For those of you who have some skill in coding in ASM on the Amiga, is there a very good tutorial for it anywhere, that explains the basics right through to advanced, aswell as the programs you need to compile and edit code?

Any reccomendations?



I'm just wondering why you want to program in ASM?

If you learn 680x0 code now, you will only need to learn PowerPC in the future.

You would be much better learning C or C++, and then you can usually use the exact same code that you use on AOS 3.x on MorphOS 1.0+

Title: Re: Learning to code on the Amiga
Post by: Karlos on November 17, 2003, 04:19:05 AM
Whilst I feel that writing entire apps in asm is purely for the insane / demo coder, you can't know too much. It's worthwhile knowing asm, even if only for debugging compiler output.

Primarily I program in C++, then C. However, once any piece of software becomes specialised for a system, the dependency issue largely is out of your hands anyway.

Then you find that sometimes, no matter how efficient your algorithms in C/C++ code, some intensive function call is still too slow, especially if you are developing for a 680x0 system say.

Knowing asm is good for these situations especially. You keep the C++ code and conditionally compile away the C++ function definition when compiling for the system you wrote the asm version for.

Your project is still portable, just fine tuned on the particular implementations.
Title: Re: Learning to code on the Amiga
Post by: Castellen on November 17, 2003, 07:48:03 AM
I've been writing in assembly for a while now, but you guys are right in that it's very labour intensive and not portable.

Picked up the SAS/C development system with disks and manuals recently, but it's quite hard to get into.  Too many {brackets} and stuff for my liking :-)
Can anyone suggest a good "learning C for morons" site?

Once I learn the basics, it should be sweet.
Title: Re: Learning to code on the Amiga
Post by: diamondgeezer on January 15, 2004, 01:04:42 AM
Actually it's just as easy to program in assembler as it is in C if you're happy to use macros - C is not that much more high-level than asm. C++ on the other hand... :-o .

It's horses for courses really. If you like to be totally in command and don't mind taking a weekend to track down a bug caused by a misprint in "Amiga Machine Language" (yes, that happened to me) then go with something like Devpac 3 from Hisoft (still on sale). Otherwise,  I got reasonable results with SAS/C, although that may be a bit long in the tooth for a newish Amiga. 8-)
Title: Re: Learning to code on the Amiga
Post by: z36ra on January 15, 2004, 01:42:32 AM
Don't you love all of the "nonanswers" you get when  you ask a very specific question?

"You should do this..." "You should do that.."

Friend, ASM is very good. Learn it. I saw a couple of posts to good toots but you will need to buy a book. ASM is good if you want to get into electronics. ASM is good for all microprocessors but you will need to learn the in's and out's of each. ASM is useful in computer programming if you want to optimize your "Language"  code. Most of all ASM is good for the thinking man.
Don't listen to these other fools.
Title: Re: Learning to code on the Amiga
Post by: lazarus on April 18, 2004, 08:44:08 PM
I'm looking to program some old school scrolling demos (you remember the demos on the pirated games nobody ever had as we all bought originals!!)

Anyway, would I be better off using C, ASM or some other language?  I've tried AMOS (stop sniggering at the back) but find this is very limited

Any help greatly appreciated

Thanks in advance

Chris

EDIT > Forgot to mention I'm not shy of a little hard work learning the language.  I have an A500, an A2000, a CD-32, CD-TV (with keyboard, floppy, HDD etc) and an A1200 so can use any of those platforms (but would like it to run on all Amigas if possible!)

Just to give you an idea of what I'd finally like to achieve : I'd like a logo up the top (possibly with a vu-meter behind it), a scrolly starfield background (or one of the nice luminous fractal patterns) with scrolly sine wave text over the top
Title: Re: Learning to code on the Amiga
Post by: Dr_Righteous on July 12, 2004, 04:09:24 AM
[holy opinion on demo coding]
Demos coded in ASM ALWAYS look better than ones coded in high-level languages. ASM allows you to run your calculations faster, communicate with hadware faster and directly... and most importantly, your program runs EXACTLY how you write it - as opposed to being translated from what you code to what your compiler thinks it should be and your poor system trying to do it's best to do what you want.
[/holy opinion on demo coding]

Before coding in any language you have to look at what you need your programs to do. If they need direct hardware access, or perhaps just need to be small and fast, then you want to use ASM. If you need platform portability, then C or another language is in order. And of course if you just need something quick, dirty, simple and perhaps temporary... There's always scripting languages!  :-D
Title: Re: Learning to code on the Amiga
Post by: drHirudo on July 12, 2004, 04:58:22 AM
Learning assembly for any processor isn't bad, because despite the different instruction sets the assembler is pretty common, algorythms are pretty common and easy to port if you know what you are doing. And learning 68000 assembly, doesn't mean that you will make as much effort as in the beginning for going to PPC assembly for example. Me for example learnt mostly 6502 assembler, but it wasn't hard writing programs for Z80 and 68000. Of course having the programs written in C first helps. Read the documentations about the instruction sets and look at the instructions which will satisfy your needs when trying to implement something.
Title: Re: Learning to code on the Amiga
Post by: PhatBoiCollier on July 12, 2004, 09:39:53 AM
Didnt Amiga Computing magazine do the source and step-by-step for Jolyon Ralph (what happened to him?) demos?  There was "Zowee" with the bouncing Tuts (yes, thats Tuts), and another which was a 64 colour (EHB) affair but cant remember the name?

EDIT - Found him - he is the MD of a company called "Mysterious Ways".  On there site, there is some good amiga
How To Code (http://mways.test.fox3000.com/amiga/howtocode/) docs.
Title: Re: Learning to code on the Amiga
Post by: Cyberus on July 12, 2004, 12:18:57 PM
lol @ your sig

btw, how's the Weim?


edit: I've been meaning to pick up a copy of the ADK for ages. How much is 49 Deutschemarks?
Title: Re: Learning to code on the Amiga
Post by: Magic-Merl on July 12, 2004, 12:52:07 PM
In response to some of the earlier mails.

I myself have coded for many systems in many languages.  If you have experience of some form of Basic or Pascal etc. then Assembler can be very rewarding.  I would say that assembler on ALL platforms out-performs (obviously) but more importantly; is easier to learn.
There is alot to be said about communicating directly with the hardware, although frowned upon these days, it is not ideal for future compatability.

Go for assembler.  Learn C/C++ some other time.
Title: Re: Learning to code on the Amiga
Post by: PhatBoiCollier on July 12, 2004, 01:33:55 PM
@Cyberus

Weimie (Gil) is fine thanks.  Saw this (http://photos.photosig.com/photos/46/75/1277546-8c860a1352393b2e.jpg) on one of the photography sites today, makes me want another puppy!
Title: Re: Learning to code on the Amiga
Post by: redrumloa on July 12, 2004, 04:56:34 PM
About once a year I make a pledge to learn some programming, and I never really do.. Back in the day I learned basic and a little 6502 assembly, but never did much useful with it. At a quick glance 680X0 assem looks much easier than C+++. Any books or tutorials for C+++ I've glanced over left me saying what the hell are they talking about? It seems like even so called entry level C+++ manuals assume waay to much about the experience level of the reader.

If there is a true beginners C++ book or guide that was either Amiga oriented or at least not purely Wintendo specific, I'd like to know.
Title: Re: Learning to code on the Amiga
Post by: Karlos on July 12, 2004, 05:03:47 PM
@Red

C++ is OK, but I agree C+++ is a {bleep} :-D
Title: Re: Learning to code on the Amiga
Post by: irishmike on July 12, 2004, 06:20:27 PM
I like the beginners book I have, it is covering ANSI C++ and while the book is quite helpful to VisualStudio users, it at least covers the ANSI standard which Microsoft seems to not want to follow :-)  It is also older... the book is "Ivor Horton's Beginning C++:  The Complete Language" published by Wrox and apparently first published in 1998.

The ISBN number is:  1-861000-12-X

I love this book as it got me through my college courses for C++ and he talks in plain English!

Hope that helps.