Welcome, Guest. Please login or register.

Author Topic: Learning C with the Amiga  (Read 12412 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline mel_zoomTopic starter

  • Full Member
  • ***
  • Join Date: Jan 2007
  • Posts: 231
    • Show only replies by mel_zoom
Learning C with the Amiga
« on: January 25, 2007, 12:45:52 PM »
Hi!

Ive decided to have a go at learning C on the amiga. I do know a little bit about the language and programming in general but Ive never really written anything.

In my introduction, someone pointed me at AmiDevCPP but this is clearly windows software and if possible Id prefer to use an amiga native environment.

What options are there given a relatively bare minimum of experience?
I love my MX5!
Please pay a visit
 

Offline golem

  • Sr. Member
  • ****
  • Join Date: May 2002
  • Posts: 430
    • Show only replies by golem
Re: Learning C with the Amiga
« Reply #1 on: January 25, 2007, 12:56:43 PM »
Easiest way to get development environment is to get hold of Developer CD 2.1 that covers up to OS3.5 and comes with StormC v3 C/C++ IDE.
                                                             
A1200 desktop, Blizzard 1260, OS3.9BB2, Indivision Mk II, SCSI Jaz, Ethernet
A1200 desktop, Blizzard 1230, OS3.1, Ethernet
A500, OS1.3
 

Offline adz

  • Knight of the Sock
  • Hero Member
  • *****
  • Join Date: Aug 2003
  • Posts: 2961
    • Show only replies by adz
Re: Learning C with the Amiga
« Reply #2 on: January 25, 2007, 12:57:50 PM »
Initially, I started by studying C++ at university, I managed to pass, however, it was something I had no intention of returning to. A few years later I thought I'd have a stab at C so I started reading;

The C Programming Language (ANSI C) - B.W. Kernighan & D.M. Ritchie

After a few weeks, I realised I sucked at that too, so I've pretty much given up on them both, just can't seem to get my head around them.
 

Offline mgerics

  • Sr. Member
  • ****
  • Join Date: Jun 2002
  • Posts: 294
    • Show only replies by mgerics
Re: Learning C with the Amiga
« Reply #3 on: January 25, 2007, 01:04:29 PM »
Don't let the detractors get you down! C is awesome! Actually, I haven't coded in C for years, but want to get back to it - especially on the Amiga.
The are several packages available freely, or commercially there is SAS C, which I use. DL examples and study them to learn if you haven't got anyone around to teach you. If you really understand what computers are and how they work, learning C is easy, but you will have to spend some time on it.
The rewards are worth it.

Come on guys, point her to some useful information regarding compilers, source, etc.
 

Offline Crumb

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 1786
  • Country: 00
    • Show only replies by Crumb
    • http://cuaz.sourceforge.net
Re: Learning C with the Amiga
« Reply #4 on: January 25, 2007, 01:06:16 PM »
StormC is not a very good compiler. I used it in the past but I switched to GCC because it allows me to compile my code everywhere and it's more portable.

I would advice you to use Cubic IDE as it is maintained actually, has syntax highlighting, uses gcc to create the code etc...

You don't need OS3.5 developer CD.

NDK 3.9 will be more than enough to get the autodocs.
The only spanish amiga news web page/club: Club de Usuarios de Amiga de Zaragoza (CUAZ)
 

Offline Steady

Re: Learning C with the Amiga
« Reply #5 on: January 25, 2007, 01:23:39 PM »
I agree with Crumb.

Cubic IDE is the way to go, but it is still good to get the Developer CD 2.1 because it has the Amiga Rom Kernal Manuals in AmigaGuide format. They are OK for referencing, but if you can, you should try and at least get the actual Libraries RKM book. Although it is hard to find and the same content is on the CD, it is easier to work through the actual book. At least, that's what I found.

Good luck.
 

Offline Repo01

  • Newbie
  • *
  • Join Date: Aug 2006
  • Posts: 14
    • Show only replies by Repo01
Re: Learning C with the Amiga
« Reply #6 on: January 25, 2007, 01:30:52 PM »
 

Offline rlfrost

  • Newbie
  • *
  • Join Date: Aug 2003
  • Posts: 6
    • Show only replies by rlfrost
Re: Learning C with the Amiga
« Reply #7 on: January 25, 2007, 02:57:24 PM »
There is a book by Augie Hansen:

"A Complete Guide to Mastering the C Language"

An old book that has survived for almost 20 years.

A great guide, and a good buy these days.  I saw copies on Amazon for a buck or so.  You won't need another book for a year or so.

RLFrost
 

Offline Louis Dias

Re: Learning C with the Amiga
« Reply #8 on: January 25, 2007, 03:13:19 PM »
I downloaded GCC and the C++ version as well back in '95.  I didn't have the luxury of nice IDE's like there exists now, but I managed.

GCC is free and really good for compatibility as someone has already mentioned.

Just find in nice IDE to do your code editing and a good book like "C for Dummies".

C isn't hard or confusing until you get into compiler directives and #include, #if... stuff as your projects grow in size and complexity...

I'm curious, what other languages do you know?

EDIT:
You don't need a developer CD to do basic C programs that will run in a CLI/shell window.  Just get gcc and a text editor and that's all you need.  Tutorials are all over the internet on the basics of C programming.
 

Offline whose

  • Newbie
  • *
  • Join Date: Dec 2006
  • Posts: 13
    • Show only replies by whose
Re: Learning C with the Amiga
« Reply #9 on: January 25, 2007, 04:42:45 PM »
@Mel:

If you really just want to start learning C (nothing at specific standards), you should use StormC3 IMO. If I remember correctly you own a bare 1200 with a Blizzard1230, right?

GCC is much too heavy for such a machine and the "wins" won´t get off the "looses" (mainly compiling speed, which is a pain in the *ss using GCC on such a machine, even more if it isn´t equipped with a SCSI expansion and lots of FAST ram).

I know what I´m speaking of, because I tried it on a machine exactly like yours. Simply unusable. VBCC will give slightly more speed, but is too big for it, too. Fun begins with 68040 and fast SCSI hard drive (and LOTS of ram for GCC use, the more, the better. Face it, fans: GCC is a ram-eating monster).

StormC3 from the Developer CD2.1 runs quite smooth on such a machine like yours, gives syntax highlighting etc. and is therefore good enough to start with.

Later on you could decide to switch to another compiler package (maybe at a time when you push your machine to a higher level, e.g. Blizzard1240 with SCSI kit and 32MB ram or such) like GCC or, for pure C even better (because way faster in compile speed and is comparable to GCC regarding standard support, optimizing and compiling quality etc.) VBCC.

Greetz
 

Offline EDanaII

  • Hero Member
  • *****
  • Join Date: Dec 2006
  • Posts: 579
    • Show only replies by EDanaII
    • http://www.EdwardGDanaII.info
Re: Learning C with the Amiga
« Reply #10 on: January 25, 2007, 04:44:41 PM »
@ Mel_Zoom

I pointed you to AmiDevCPP because, of all the C compilers for the Amiga that I've tried so far, it was the easiest to use. I've tried StormC and Cubic IDE and I still have issues trying to get stuff to compile with them. To be fair, I haven't spent a lot of time on the effort, but that's the whole point. It's easier to learn when your time is actually spent doing, rather than struggling with the very tools that are supposed to be helping you.

Here's a couple more useful links:
* Amiga Utility Base: documentation on Amiga libraries.
* Amiga C Encyclopedia on AmiNet: How-to examples in C, old but useful for learning.

Ed.
Ed.
 

Offline Agafaster

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 1175
    • Show only replies by Agafaster
Re: Learning C with the Amiga
« Reply #11 on: January 25, 2007, 04:58:03 PM »
hi mel_zoom!
two bits of advice:
1. get yourself a nice personal project to sink yer teeth into - that will help to motivate.
2. get hold of anything by Herb Schildt.
3. okay three bits of advice - badger Karlos!!
increasingly innacurate 4. get a Dev kit CD, and browse. find some examples, and perhaps a copy of an SDK guide.

on OS4 I have SDK viewer, not sure if it applies well to OS3 though...

good luck, have fun!!
\\"New Bruce here will be teaching Machiavelli, Bentham, Locke, Hobbes, Sutcliffe, Bradman, Lindwall, Miller, Hassett and Benaud.\\"
\\"Those are all cricketers, Bruce !\\"
A1XE G3/800MHz Radeon 7000 512MB
A1200 030/25MHz 8MB
 

Offline Jose

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2869
    • Show only replies by Jose
Re: Learning C with the Amiga
« Reply #12 on: January 25, 2007, 05:07:55 PM »
I've done exactly the same about two years ago.
AFTER learning C, the gold reference on coding on the Amiga is the RKM Libs volume. It's oriented towards C (the most used language on the Amiga by far), and it goes from basic to very advanced. I found it's an awesome read because it goes directly to the point explaining how to use the OS and how some OS internals work, with some included examples. It's actually included in the DevCD2.1 others mentioned but nothing like a good book read so I've actually bought the book too. By the way, don't let the size of it intimidate you (almost 1000 pages:)), you don't need to read all that stuff to code on the Amiga.

As a compiler for a not very expanded Amiga I'd choose SASC. But if you want the stuff you'll learn to be usable on other platforms GCC is a better option (but with this one you'll need an 030 at least and even that will be damn slow).

Cheers
José
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline Louis Dias

Re: Learning C with the Amiga
« Reply #13 on: January 25, 2007, 06:00:39 PM »
I think you guys are asking her to walk before she has learned to crawl.

GCC is not "slow" for learning C.  She will not be waiting for 20 minutes to compile:

#include stdio.h
void main() {
printf("Hello world.");
}

Nor will it take long to compile examples using basic structures like linked-lists.

She doesn't need to know how to program OS apps before she even learns the language.

GCC and a simple text editor is all she needs and both are free.
 

Offline costabunny

  • Jr. Member
  • **
  • Join Date: Dec 2006
  • Posts: 65
    • Show only replies by costabunny
    • http://www.xiblings.co.uk
Re: Learning C with the Amiga
« Reply #14 on: January 25, 2007, 06:23:33 PM »
I agree - GCC is great, even on a basic amy (tho its been a few years for me and my c compilers).  I regularly use it on other architectures and have to admit that I am now feeling the urge to get down with C on the amiga (now where did I put my amy- oh yes still trying to get one)

:lotsacoffee:
Mac, PC, WinUAE....