spinix-hive/devel/readme.txt

48 lines
1.6 KiB
Plaintext
Raw Permalink Normal View History

This directory contains sample Spin programs that can be compiled by the Spin
development tools. These tools consist of spinit, spasm, splink and spc.
spinit is a Spin compiler that produces Spin assmebly (spasm) code. It is
executed as follows:
spinit hello.spn
This will generate the Spasm source file, hello.spa. The Spasm assmebler
is executed as follows:
spasm hello.spa
This will assemble the hello.spa Spasm source file, and generate the
output file hello.bin. The hello programs uses the clibsd object. An
executable file can be created by linking hello.bin with clibsd.bin using
the Spin linke, splink. This is done as follows:
splink hello.bin clibsd.bin hello
You can then run hello as a normal Spinix program.
An assembly listing can be produced by using the -l option, as follows:
spasm -l hello.spa
When running spinit and spasm, the file extensions are optional, and are
assumed to be .spn and .spa if not specified.
A Spin program can be compiled into an executable with one command by using
the spc command. The hello pragram can be built by typing
spc hello
The will run spinit, spasm and splink.
This directory contains the following sample programs:
hello - Hello World Program
fibo - A Spin version of the PropGCC fibo program
prime - A program that prints prime numbers
pong - A simple pong program developed entirely under spinix
pongsubs - Object used by pong
The pong program can be built using the script makepong.all. The pongsubs
object can be built and linked to clibsd using makepong.sub. makepong will
compile pong and link it to the combined pongsubs/clibsd object.