home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d1xx
/
d110
/
pdc.lha
/
Pdc
/
examples
/
Read.ME
< prev
next >
Wrap
Text File
|
1987-10-28
|
2KB
|
52 lines
File ReadMe: Last updated by J.A. Lydiatt, 01 Oct 87.
Here are a few examples showing how to compile, assemble, and link
c code using PDC. To create executable modules, simply type "make"
after you have CD'ed to this directory. This will use the program
"make", and the supplied makefile to produce executable versions you
can try out.
A word of caution about this version of make. It seems to be case
sensitive so you can type "make Sieve" and have it compile, assemble
and link the Sieve program sucessfully. However, "make sieve" will
give you an error message, "Don't know how to make sieve". The key
is to match the name you want made with the exact spelling in makefile.
Contents:
Main.c - A simple c program written by Fred Fish to make TWTest, a
program to test out the TWStartup code supplied by Commodore
which should open a window if called from Workbench, or
perform the same as AStartup.obj if called from the CLI.
Sieve.c - Performs 10 iterations of finding all primes in the first
8190 integers. Runs in slightly over 3 seconds!
Window.asm - just an example of opening a window from assembler. Click
on the close button to finish the demo.
cp.c - a simple example to show how to use the AmigaDOS Open, Close,
Read and Write functions from PDC.
Try "cp cp x" to copy cp to a new file called x.
logic.c - just tests out a few c constructs -
o for loops
o while loops
o do ... while loops
o if ... then ... else
o switch statement.
test1.c - tests that PDC passes longs, shorts, and character data
to the ROM routine printf. Note that there is a problem
with PDC if you try to pass non-long integer constants. PDC
always passes them as a long integer anyway.
test2.c - tests whether the standard command line parameter passing
works with PDC. Try 'Test2 "I have a blank" 1 2 3'. It should
be passed through as four arguments
arg[0] - test2 the name of the program being run.
arg[1] - I have a blank
arg[2] - 1
arg[3] - 2
arg[4] - 3