Welcome, Guest. Please login or register.

Author Topic: Learning to code on the Amiga  (Read 7204 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show only replies by Karlos
Re: Learning to code on the Amiga
« Reply #14 from previous page: 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.
int p; // A
 

Offline Castellen

Re: Learning to code on the Amiga
« Reply #15 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.
 

Offline diamondgeezer

  • Newbie
  • *
  • Join Date: Jan 2004
  • Posts: 6
    • Show only replies by diamondgeezer
Re: Learning to code on the Amiga
« Reply #16 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-)
 

Offline z36ra

  • Jr. Member
  • **
  • Join Date: Mar 2003
  • Posts: 65
    • Show only replies by z36ra
    • http://www.atomiccomputers.com
Re: Learning to code on the Amiga
« Reply #17 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.

Offline lazarus

  • Newbie
  • *
  • Join Date: Apr 2004
  • Posts: 8
    • Show only replies by lazarus
Re: Learning to code on the Amiga
« Reply #18 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
 

Offline Dr_Righteous

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 1345
    • Show only replies by Dr_Righteous
Re: Learning to code on the Amiga
« Reply #19 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
- Doc

A4000D, A3640 OC-36.3MHz, custom tower, Mediator A4000D. Diamond Banshee 16M, Indivision AGA 4000, GVP HC+8.

Mac Mini 1.5GHz, that might run MorphOS someday, when the fools who own it come to the realization that 30 minutes just isn\'t enough time to play with it enough to decide whether or not you like it enough to cough up $200.

 - Someone please design SOME kind of DIY accelerator for the A4000. :D -
 

Offline drHirudo

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 539
    • Show only replies by drHirudo
    • http://hirudov.com
Re: Learning to code on the Amiga
« Reply #20 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.

Offline PhatBoiCollier

  • Full Member
  • ***
  • Join Date: Feb 2002
  • Posts: 114
    • Show only replies by PhatBoiCollier
    • http://www.tirinoarim.co.uk
Re: Learning to code on the Amiga
« Reply #21 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 docs.
There are 10 types of people in this world.
Those that understand binary and those that dont.
 

Offline Cyberus

  • Hero Member
  • *****
  • Join Date: Feb 2003
  • Posts: 5696
    • Show only replies by Cyberus
Re: Learning to code on the Amiga
« Reply #22 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?
I like Amigas
 

Offline Magic-Merl

  • Full Member
  • ***
  • Join Date: Nov 2003
  • Posts: 229
    • Show only replies by Magic-Merl
Re: Learning to code on the Amiga
« Reply #23 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.

Offline PhatBoiCollier

  • Full Member
  • ***
  • Join Date: Feb 2002
  • Posts: 114
    • Show only replies by PhatBoiCollier
    • http://www.tirinoarim.co.uk
Re: Learning to code on the Amiga
« Reply #24 on: July 12, 2004, 01:33:55 PM »
@Cyberus

Weimie (Gil) is fine thanks.  Saw this on one of the photography sites today, makes me want another puppy!
There are 10 types of people in this world.
Those that understand binary and those that dont.
 

Offline redrumloa

  • Original Omega User
  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 10126
    • Show only replies by redrumloa
Re: Learning to code on the Amiga
« Reply #25 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.
Someone has to state the obvious and that someone is me!
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show only replies by Karlos
Re: Learning to code on the Amiga
« Reply #26 on: July 12, 2004, 05:03:47 PM »
@Red

C++ is OK, but I agree C+++ is a {bleep} :-D
int p; // A
 

Offline irishmike

  • Hero Member
  • *****
  • Join Date: Jun 2004
  • Posts: 516
    • Show only replies by irishmike
    • http://www.jmikeneedham.net
Re: Learning to code on the Amiga
« Reply #27 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.

\\"When we ask for advice, we are usually looking for an accomplice.\\"
- Marquis de la Grange