writing a c course for atari

C and PASCAL (or any other high-level languages) in here please

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

User avatar
MadDonna
Captain Atari
Captain Atari
Posts: 478
Joined: Thu Sep 16, 2004 2:13 pm
Location: Alkmaar, The Netherlands
Contact:

writing a c course for atari

Postby MadDonna » Wed Jul 06, 2005 10:57 am

I am going to write a c course for the atari, and I want to do that with Pure C and Turbo C 2 as tool. What I miss is documentation how to build a project in those two ide's. The default.prj in turbo c and pure c is a standard one for a one module project.

Anyone some documentation?
1 Atari 520ST, 1 Atari 1040STf, 1 Atari 1040 STfm, 2 Atari 1040 STe, 2 Atari Mega 1, 1 Atari Mega ST 2, 1 Mega STe, 1 Megafile 30, 1 Megafile with an IBM 1Gb replacement, 2 Atari TT030 and 1 Falcon
Image

User avatar
Nyh
Atari God
Atari God
Posts: 1496
Joined: Tue Oct 12, 2004 2:25 pm
Location: Netherlands

Re: writing a c course for atari

Postby Nyh » Wed Jul 06, 2005 12:46 pm

MadDonna wrote:I am going to write a c course for the atari, and I want to do that with Pure C and Turbo C 2 as tool. What I miss is documentation how to build a project in those two ide's. The default.prj in turbo c and pure c is a standard one for a one module project.

Anyone some documentation?

I have got some examples for you.
As simple project with some c and assembly routines based on the standard project file:

Code: Select all

;>>>>>>> DEFAULT.PRJ for use with single module programs <<<<<<<<

HLAND.PRG           ; name of executable program is topmost window
.C [ -Y ]
.L [ ]
.S [ -Y ]
=                  ; list of modules follows...

e:\pc\lib\original\PCSTART.s          ; startup code

HLAND.C    (hland.h)            ;
print.c    (hland.h)            ; print routine
eggs.c     (hland.h)            ;
card_shw.s (hland.h, hland.mac) ; card effects
starfld.s  (hland.h, hland.mac) ; starfield
keyboard.s (hland.h)            ; keyboard handler
depack.s   (hland.h)            ; arj depacker
fscreen.s  (hland.h, hland.mac) ; fast screen routines
carddata.c (hland.h)            ; kaarten
map.c      (hland.h)            ; block info
ipc_data.c (hland.h)            ; intropic
end_data.c (hland.h)            ; game over pic
map_data.c                      ; speelveld zelf
egg_data.c                      ; sprites
ani_data.s                      ; animatie tabel
mus_data.s                      ; musix
scrndata.c                      ; screen data
blokdata.s                                 ; blok data

;PCBGILIB.LIB       ; BGI library
;PCFLTLIB.LIB       ; floating point library
PCSTDLIB.LIB       ; standard library
PCEXTLIB.LIB       ; extended library
PCTOSLIB.LIB       ; TOS library
;PCGEMLIB.LIB       ; AES and VDI library

Complex project, lots of dependencies, includes libs which are build byh other project files:

Code: Select all

arjbeta.ttp
.C[ -K -P -Y -I -I..\include -I..\compress ]
.L[ -S=32768 ]
.S[ -S -Y ]
=
lib\original\pcvstrtn.s

arjbeta.c  (..\include\arjbeta.h, ..\include\crc.h, ..\include\compress.h, scan.h, port.h, ..\include\gup.h, ..\include\gup_err.h, ..\compress\st_opti\opti.h, file_buf.h)
scan.c     (..\include\arjbeta.h, scan.h, port.h, ..\include\gup_err.h, ..\include\compress.h, ..\include\gup.h, ..\compress\st_opti\opti.h, file_buf.h)
arj_hdr.c    (arj_hdr.h, ..\include\gup.h, ..\include\compress.h, ..\compress\st_opti\opti.h, file_buf.h)
lha_hdr.c    (lha_hdr.h, ..\include\gup.h, ..\include\compress.h, ..\compress\st_opti\opti.h, file_buf.h)
gz_hdr.c    (gz_hdr.h, ..\include\gup.h, ..\include\compress.h, ..\compress\st_opti\opti.h, file_buf.h)
arj_outp.c (..\include\arjbeta.h, ..\include\compress.h, port.h, ..\include\gup.h, arj_outp.h, ..\include\gup_err.h, ..\compress\st_opti\opti.h)
file_buf.c (..\include\arjbeta.h, ..\include\compress.h, port.h, ..\include\gup.h, arj_outp.h, ..\include\gup_err.h, ..\compress\st_opti\opti.h, file_buf.h)


s_header.c (..\include\arjbeta.h, ..\include\compress.h, scan.h, port.h, ..\include\gup.h, ..\compress\st_opti\opti.h,
            arjbeta.c, scan.c, arj_hdr.c, lha_hdr.c, gz_hdr.c, arj_outp.c,
            ..\compress\crc.c, ..\compress\sld.c, ..\compress\sld_med.c,
            ..\compress\sld_smll.c, ..\compress\st_opti\st_opti.c, ..\compress\st_opti\chaoscrc.s
            , ..\compress\st_opti\sld.s, ..\compress\st_opti\sldf.s)

..\compress\compress.prj

PCTOSLIB.LIB
PCSTDLIB.LIB
PCEXTLIB.LIB

project file for compress (builds a library):

Code: Select all

compress.lib
.C[ -K -P -Y -I..\include ]
.L[ -J ]
.S[ -S -Y ]
=
decode.c   (..\include\compress.h, decode.h, ..\include\gup.h)
crc.c      (..\include\crc.h, ..\include\gup.h, ..\include\compress.h, st_opti\opti.h, ..\include\gup.h)
deflate.c  (..\include\arjbeta.h, ..\include\compress.h, ..\include\gup.h, ..\include\gup_err.h, st_opti\opti.h, evaluatr.h, encode.h, ..\include\gup.h, swapbit.h)
encode.c   (..\include\arjbeta.h, ..\include\compress.h, ..\include\gup.h, ..\include\gup_err.h, st_opti\opti.h, evaluatr.h, encode.h, ..\include\gup.h)
evaluatr.c (..\include\arjbeta.h, ..\include\compress.h, ..\include\gup.h, ..\include\gup_err.h, st_opti\opti.h, evaluatr.h, encode.h, ..\include\gup.h)
sld.c      (..\include\arjbeta.h, ..\include\compress.h, ..\include\gup.h, st_opti\opti.h, encode.h, ..\include\gup.h)
sld_indx.c (..\include\arjbeta.h, ..\include\compress.h, ..\include\gup.h, st_opti\opti.h, encode.h, ..\include\gup.h)
sld_med.c  (..\include\arjbeta.h, ..\include\compress.h, ..\include\gup.h, st_opti\opti.h, encode.h, ..\include\gup.h)
sld_smll.c (..\include\arjbeta.h, ..\include\compress.h, ..\include\gup.h, st_opti\opti.h, encode.h, ..\include\gup.h)

st_opti\st_opti.c  (..\include\arjbeta.h, ..\include\compress.h, ..\include\gup.h, st_opti\opti.h, encode.h)
st_opti\chaoscrc.s    ; fast chaos crc routs, 3kB buffer
 ;  st_opti\crc16bit.s    ; ultra fast 16 bit crc routs
st_opti\encodest.s     (st_opti\command.mac)

The options for the compiler, assembler and linker can be found in the help-menu.

Hans Wessels

User avatar
MadDonna
Captain Atari
Captain Atari
Posts: 478
Joined: Thu Sep 16, 2004 2:13 pm
Location: Alkmaar, The Netherlands
Contact:

Re: writing a c course for atari

Postby MadDonna » Wed Jul 06, 2005 1:47 pm

Nyh wrote:
MadDonna wrote:I am going to write a c course for the atari, and I want to do that with Pure C and Turbo C 2 as tool. What I miss is documentation how to build a project in those two ide's. The default.prj in turbo c and pure c is a standard one for a one module project.

Anyone some documentation?

The options for the compiler, assembler and linker can be found in the help-menu.

Hans Wessels


My german is not that well, I miss a lot of important information when reading the helpfiles.

If you or anyone else have them in English I would be gratefull.
1 Atari 520ST, 1 Atari 1040STf, 1 Atari 1040 STfm, 2 Atari 1040 STe, 2 Atari Mega 1, 1 Atari Mega ST 2, 1 Mega STe, 1 Megafile 30, 1 Megafile with an IBM 1Gb replacement, 2 Atari TT030 and 1 Falcon

Image

User avatar
MadDonna
Captain Atari
Captain Atari
Posts: 478
Joined: Thu Sep 16, 2004 2:13 pm
Location: Alkmaar, The Netherlands
Contact:

Postby MadDonna » Thu Jul 07, 2005 12:06 pm

Are there English helpfiles anyway?
1 Atari 520ST, 1 Atari 1040STf, 1 Atari 1040 STfm, 2 Atari 1040 STe, 2 Atari Mega 1, 1 Atari Mega ST 2, 1 Mega STe, 1 Megafile 30, 1 Megafile with an IBM 1Gb replacement, 2 Atari TT030 and 1 Falcon

Image

User avatar
[ProToS]
Moderator
Moderator
Posts: 2242
Joined: Fri Sep 20, 2002 2:09 am
Location: Lourdes / France
Contact:

Postby [ProToS] » Sat Jul 09, 2005 1:48 am

English helpfiles attached
You do not have the required permissions to view the files attached to this post.
SeeU
[ProToS]/Facebook

User avatar
MadDonna
Captain Atari
Captain Atari
Posts: 478
Joined: Thu Sep 16, 2004 2:13 pm
Location: Alkmaar, The Netherlands
Contact:

Postby MadDonna » Mon Jul 11, 2005 11:56 pm

Thanks!!!! :D
1 Atari 520ST, 1 Atari 1040STf, 1 Atari 1040 STfm, 2 Atari 1040 STe, 2 Atari Mega 1, 1 Atari Mega ST 2, 1 Mega STe, 1 Megafile 30, 1 Megafile with an IBM 1Gb replacement, 2 Atari TT030 and 1 Falcon

Image

User avatar
MadDonna
Captain Atari
Captain Atari
Posts: 478
Joined: Thu Sep 16, 2004 2:13 pm
Location: Alkmaar, The Netherlands
Contact:

Postby MadDonna » Thu Jul 14, 2005 12:24 pm

Eeeeh where do I have to put them, I had put them in the help directory, but no english helpfiles.
1 Atari 520ST, 1 Atari 1040STf, 1 Atari 1040 STfm, 2 Atari 1040 STe, 2 Atari Mega 1, 1 Atari Mega ST 2, 1 Mega STe, 1 Megafile 30, 1 Megafile with an IBM 1Gb replacement, 2 Atari TT030 and 1 Falcon

Image

User avatar
[ProToS]
Moderator
Moderator
Posts: 2242
Joined: Fri Sep 20, 2002 2:09 am
Location: Lourdes / France
Contact:

Postby [ProToS] » Thu Jul 14, 2005 7:53 pm

on the root of your Pure C folder
SeeU
[ProToS]/Facebook

User avatar
MadDonna
Captain Atari
Captain Atari
Posts: 478
Joined: Thu Sep 16, 2004 2:13 pm
Location: Alkmaar, The Netherlands
Contact:

Postby MadDonna » Thu Jul 21, 2005 9:43 pm

I have put it in the root of the pure c folder but still german helpfiles. What am I doing wrong?
1 Atari 520ST, 1 Atari 1040STf, 1 Atari 1040 STfm, 2 Atari 1040 STe, 2 Atari Mega 1, 1 Atari Mega ST 2, 1 Mega STe, 1 Megafile 30, 1 Megafile with an IBM 1Gb replacement, 2 Atari TT030 and 1 Falcon

Image

User avatar
MadDonna
Captain Atari
Captain Atari
Posts: 478
Joined: Thu Sep 16, 2004 2:13 pm
Location: Alkmaar, The Netherlands
Contact:

Postby MadDonna » Wed Jul 27, 2005 11:08 am

Anyone a file or something else to show me how to configure linker + compiler, how many types of switches there are?

You can see the first attempts at:

http://www.purplehorses.nl

link at the right menu, it is not much, more a general introduction, but it is a start.
1 Atari 520ST, 1 Atari 1040STf, 1 Atari 1040 STfm, 2 Atari 1040 STe, 2 Atari Mega 1, 1 Atari Mega ST 2, 1 Mega STe, 1 Megafile 30, 1 Megafile with an IBM 1Gb replacement, 2 Atari TT030 and 1 Falcon

Image

User avatar
[ProToS]
Moderator
Moderator
Posts: 2242
Joined: Fri Sep 20, 2002 2:09 am
Location: Lourdes / France
Contact:

Postby [ProToS] » Wed Aug 10, 2005 8:06 pm

sorry to be late, have you got any succes with the english help files ?

if not try to made it yourself from the german files with this software
You do not have the required permissions to view the files attached to this post.
SeeU
[ProToS]/Facebook

User avatar
MadDonna
Captain Atari
Captain Atari
Posts: 478
Joined: Thu Sep 16, 2004 2:13 pm
Location: Alkmaar, The Netherlands
Contact:

Postby MadDonna » Sun Aug 14, 2005 1:07 am

I am including some simple examples in my c course.

Code: Select all

/* place a string on te screen */

#include <osbind.h> /* include file for GEMDOS functionnames */

char *p = "\033E Goodbye cruel world \n";

int main()
{

    Cconws(p);
    Cconin();

}



A book that I am using for some samples (written by Marcel van Valen) is telling me that using the GEMDOS function Cconin() is more preferable than the standard C function getchar(), because this function (getchar() does not work correct in the DR compiler. Is that an issue in the more modern compilers too? like Pure/Turbo C?
1 Atari 520ST, 1 Atari 1040STf, 1 Atari 1040 STfm, 2 Atari 1040 STe, 2 Atari Mega 1, 1 Atari Mega ST 2, 1 Mega STe, 1 Megafile 30, 1 Megafile with an IBM 1Gb replacement, 2 Atari TT030 and 1 Falcon

Image


Social Media

     

Return to “C / PASCAL etc.”

Who is online

Users browsing this forum: No registered users and 5 guests