17 August 2022, 22:23 | #1 |
Registered User
Join Date: Apr 2022
Location: Brno
Posts: 30
|
Start with C programming on Amiga article
I just published the article "Start with C programming on Amiga" https://link.medium.com/L4pbtrCGzsb
I don't know why I spend several days writing it... I guess I had some inner urge to write it to keep all information in one place. Maybe it will help someone. If you find any mistakes, let me know, and I'll be happy to fix them. |
17 August 2022, 23:20 | #2 |
Coder/webmaster/gamer
Join Date: Oct 2001
Location: Canberra/Australia
Posts: 2,651
|
That site seems to have some problems, it shows the text for 3-4 seconds and then the page just blanks. It might be a better idea to upload it somewhere else in a more accessible format.
|
18 August 2022, 12:42 | #3 |
A1200 040 SAM440EP 667
Join Date: Jan 2008
Location: Lisbon / Portugal
Posts: 873
|
@8bitsten: good work, keep it
@Minuous: I can see the text with no problems. |
18 August 2022, 13:41 | #4 |
Moderator
Join Date: Jan 2002
Location: Chicago, IL
Posts: 3,386
|
It’s working here too.
|
18 August 2022, 14:46 | #5 | |
Bruno
Join Date: Aug 2020
Location: Nantes / France
Posts: 111
|
8bitsten : very nice intro to VBCC system !
The diagrams are very intuitive and the information very valuable. As regards amiga.lib : Quote:
By default, VBCC uses inline calls defined in .H files and does not use stub functions in amiga.lib. (Of course, linking with amiga.lib is needed if you define the _NO_INLINEpreprocessor macro.) Last edited by Jami; 18 August 2022 at 17:12. |
|
18 August 2022, 16:58 | #6 |
Registered User
Join Date: Oct 2021
Location: England
Posts: 1,201
|
Code:
I build the program I usually immediately test it on the Amiga Forever emulator made by a company called Cloanto. Interesting read tho. |
19 August 2022, 10:26 | #7 | |
Registered User
Join Date: Apr 2022
Location: Brno
Posts: 30
|
Quote:
Have a nice day STeN |
|
19 August 2022, 19:53 | #8 |
Registered User
Join Date: Oct 2021
Location: England
Posts: 1,201
|
its a good read, when you said vbcc was cross-compile i was surprised to see your screenshot of the c64, didnt think cross-compile included the c64 at all, thought it was lucky the amiga is an option never mind the good old 8bit.
|
19 August 2022, 20:13 | #9 | |
Registered User
Join Date: Apr 2022
Location: Brno
Posts: 30
|
Quote:
|
|
20 August 2022, 11:40 | #10 | ||
Registered User
Join Date: Apr 2022
Location: Brno
Posts: 30
|
Quote:
-lamigaparameter from he vccall from the example makefile from the article (see GitHub) the linker reports the following error: Code:
Digesting symbol information: hellointuition.o: In "_main": Error 21: hellointuition.o (CODE+0x1e): Reference to undefined symbol _OpenLibrary. Error 21: hellointuition.o (CODE+0xd0): Reference to undefined symbol _OpenWindow. hellointuition.o: In "l16": Error 21: hellointuition.o (CODE+0x108): Reference to undefined symbol _Wait. hellointuition.o: In "l21": Error 21: hellointuition.o (CODE+0x142): Reference to undefined symbol _GetMsg. hellointuition.o: In "l29": Error 21: hellointuition.o (CODE+0x16e): Reference to undefined symbol _ReplyMsg. hellointuition.o: In "l18": Error 21: hellointuition.o (CODE+0x17e): Reference to undefined symbol _CloseWindow. hellointuition.o: In "l35": Error 21: hellointuition.o (CODE+0x1c4): Reference to undefined symbol _CloseLibrary. Versions I am using:
Thanks a lot! Regards, STeN |
||
20 August 2022, 22:26 | #11 | |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,510
|
C was already used quite a lot in the past. Not for the VIC-20, of course, but I remember Lazycow did most games in C with a small assembler core.
Volker's new 6502 backend for vbcc generates really good code, supports many 6502-targets, including special features like bank switching. Quote:
<proto/exec.h>instead of <clib/exec_protos.h>. This is true for most (all?) AmigaOS compilers. The headers under protomake sure that your compiler's optimal OS-call mechanism is being used. There are still reasons to link with amiga.lib, though. Support functions like DoMethod, CallHook, NewList, BeginIO, etc., do not exist in any AmigaOS shared library. |
|
21 August 2022, 11:34 | #12 |
Bruno
Join Date: Aug 2020
Location: Nantes / France
Posts: 111
|
@8bitsten : of course, I can not provide a better explanation than phx
You can look at my pull request on github : with little modifications, I have been able to compile and run your code successfully without -lamiga linking. |
26 August 2022, 09:27 | #13 |
Registered User
Join Date: Apr 2022
Location: Brno
Posts: 30
|
@phx and @Jami
Thanks a lot for your comments and pull request. I have learned again something new. I have updated the article accordingly. This forum is great! |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sprite Programming article, would like to add a screenshot or video | Photon | Coders. Asm / Hardware | 7 | 29 August 2021 00:02 |
Can you be 'too old' to start to learn programming? | markpjd | Retrogaming General Discussion | 57 | 18 April 2015 16:10 |
How to start Amiga Programming? (ASM/C) | DBAlex | Coders. General | 11 | 08 April 2010 14:25 |
CU Amiga Article Request | Lloydy246 | AMR suggestions and feedback | 3 | 09 November 2007 19:00 |
Amiga article over at bhlegend | Bloodwych | Amiga scene | 7 | 10 May 2003 15:25 |
|
|