Changes

CPCRSlib

647 bytes added, 15:09, 11 August 2010
[[CPCWYZlib|CPCWYZlib]] is included in the downloadable package of CPCRSlib. CPCWYZlib includes a music player and SFX player coded by WYZ, which can play music created with [[WYZTracker|WYZTracker]].
 
== installation ==
 
On Ubuntu Lucid Lynx :
 
<pre>
cd cpcrslib/
z80asm -v -xcpcrslib.lib @cpcrslib.lst
sudo cp cpcrslib.lib /usr/share/z88dk/lib/clibs/
sudo cp cpcrslib.h /usr/share/z88dk/include
</pre>
 
now it should work.
 
== usage ==
 
<pre>
#include "cpcrslib.h" // CPC Library
 
int main(void) {
cpc_PrintStr("Hello World!");
while (!cpc_AnyKeyPressed()) { }
return 0;
}
</pre>
 
Compile the contents by running the compiler, pre-processor and linker in one go by typing:
 
<pre>
zcc +cpc -create-app -make-app -O3 -unsigned -o hello.bin hello.c -lcpcrslib -lndos -zorg=16384
</pre>
 
you'll have a hello.cpc file ready to be run on your CPC.
[[Category:Programming]] [[Category:C]][[Category:CrossDev]]
19
edits