TempleOSTS_130315.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:45:37 +02:00
1 parent e57428affb
commit 17b71f1a2d
958 files changed
+26043 -15907

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
import U0 PrintF(U8 *fmt,...);
U0 Routine1(U8 *st)
{
PrintF("Routine1:%s\n",st);
}
+8
View File
@@ -0,0 +1,8 @@
import U0 PrintF(U8 *fmt,...);
U0 Routine2(U8 *st)
{
PrintF("Routine2:%s\n",st);
}
+28
View File
@@ -0,0 +1,28 @@
import U0 PrintF(U8 *fmt,...);
U0 Routine3(U8 *st)
{
PrintF("Routine3:%s\n",st);
}
//Any routine with var parameters
//automatically has vars argc and argv[]
//whether it is main or not.
I64 ModuleDemo(...)
{
I64 i;
if (argc>0) {
for (i=0;i<argc;i++)
PrintF("Arg %d:%08X\n",i,argv[i]);
Routine1(argv[0]);
if (argc>1) {
Routine2(argv[1]);
if (argc>2)
Routine3(argv[2]);
}
} else
PrintF("Pass string parameters for args 1 and 2.\n");
return argc;
}
@@ -0,0 +1 @@
extern I64 ModuleDemo(...);
@@ -0,0 +1,13 @@
// imports all syms from the Adam Task's hash table.
#include "::/TempleOS/Kernel/AOTAdam.HPP"
//If you just want some of the symbols:
//#include "::/TempleOS/Kernel/AOT.HPP"
#exe {Cd("::/TempleOS/Demo/OldSchool/Demo1");};
#include "MD1"
#include "MD2"
#include "MDMain"
+11
View File
@@ -0,0 +1,11 @@
1) Do a $LK,"Dir","MN:Dir"$() command
2) Right-Click on ModuleDemo.PRJ.Z and click $FG,2$COMPILE$FG$.
3) Right-Click on ModuleDemo.BIN.Z and click $FG,2$LOAD$FG$.
4) Right-Click on ModuleDemo.HPP.Z and click $FG,2$INCLUDE$FG$.
5) Type at the command-line:
$ID,2$$FG,2$>ModuleDemo("Param1","Param2");
$ID,-2$