1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2024-05-31 12:41:29 +00:00

Updated Home (markdown)

David Schmenk 2017-12-14 13:00:07 -08:00
parent 08b1a65e12
commit 9318c36cb8

@ -1,4 +1,4 @@
# PLASMA Libraries
## PLASMA Libraries:
These pages are for documenting and discussing the libraries and sample code supplied with PLASMA. The language is documented on the main page and hopefully answers any language specific questions.
PLASMA has grown over a number of years and certain constructs have been developed over that time. As a result, some samples may look slightly different than others. The larger libraries, for instance, have been worked out to provide an API based on function pointers. This allows machine differences to be determined at run time and hidden from other modules. These libraries will provide a header file that exports a pointer to a function table as a structure. To call a library function, it will look something like:
@ -8,5 +8,5 @@ libAPI:someFunc()
If the function doesn't have any parameters, the `()` are still required because the function will be accessed as just a `word` without them. The syntax superficially resembles object oriented language constructs and not by accident. Note that function pointers don't get the same parameter/return values checking that regular function definitions get. The libraries APIs all return one value from every function so there isn't a danger of forgetting to override the return value count. However, the parameter counts aren't verified so you need to beware of getting them correct.
Smaller library APIs will export the individual functions and you will call them just like any other.
# PLASMA Sample Code:
## PLASMA Sample Code:
The sample code has been subject to even more evolution than the libraries. Some samples look very different than others as the language grew. Looking beyond the inconsistencies, you should find many answers on how to program PLASMA using different features of the Apple 1, II, and ///.