TempleOSTS_130315.ISO
This commit is contained in:
1 parent
e57428affb
commit
17b71f1a2d
958 files changed
+26043
-15907
No files matched your search
@@ -0,0 +1,24 @@
|
||||
Cd("::/TempleOS/Demo/OldSchool/Demo2");;
|
||||
Cmp("OD1");
|
||||
Cmp("OD2");
|
||||
Cmp("ODMain");
|
||||
Load("OD1");
|
||||
Load("OD2");
|
||||
Load("ODMain");
|
||||
#include "ObjDemo.HPP"
|
||||
|
||||
ObjDemo("Success");
|
||||
|
||||
#ifndef BinRep
|
||||
#include "::/TempleOS/Adam/BinRep"
|
||||
#endif
|
||||
|
||||
PressAKey;
|
||||
BinRep("OD2");
|
||||
|
||||
PressAKey;
|
||||
BinRep("ODMain");
|
||||
|
||||
PressAKey;
|
||||
HashRep(Fs->hash_table,HTG_ALL,NULL,"-p-r");
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,12 @@
|
||||
// imports all syms from the Adam Task's hash table.
|
||||
#include "::/TempleOS/Kernel/AOTAdam.HPP"
|
||||
|
||||
import U0 Routine3(U8 *st);
|
||||
|
||||
U0 Routine1(U8 *st)
|
||||
{
|
||||
PrintF("Routine1:%s\n",st);
|
||||
Routine3("What the!!!");
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,31 @@
|
||||
// imports all syms from the Adam Task's hash table.
|
||||
#include "::/TempleOS/Kernel/AOTAdam.HPP"
|
||||
|
||||
asm {
|
||||
USE64
|
||||
IMPORT Beep;
|
||||
_MY_BEEP::
|
||||
ENTER 0
|
||||
|
||||
PUSH FALSE
|
||||
PUSH 300
|
||||
CALL Beep
|
||||
|
||||
LEAVE
|
||||
RET
|
||||
}
|
||||
|
||||
_extern _MY_BEEP U0 MyBeep();
|
||||
|
||||
U0 Routine2(U8 *st)
|
||||
{
|
||||
PrintF("Routine2:%s\n",st);
|
||||
MyBeep();
|
||||
}
|
||||
|
||||
PutS("$$BK,1$$Woo-Hoo!$$BK,0$$\n");
|
||||
Dir;
|
||||
PutS("$$BK,1$$Woo-Hoo!$$BK,0$$\n");
|
||||
|
||||
Routine2("Cool");
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,37 @@
|
||||
// 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"
|
||||
|
||||
import U0 Routine1(U8 *st);
|
||||
import U0 Routine2(U8 *st);
|
||||
_import _MY_BEEP U0 MyBeep();
|
||||
|
||||
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 ObjDemo(...)
|
||||
{
|
||||
I64 i;
|
||||
MyBeep();
|
||||
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
|
||||
PutS("Pass string parameters for args 1 and 2.\n");
|
||||
return argc;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
//This file ties SYMIC EXPORTS
|
||||
//to functions or global vars.
|
||||
|
||||
extern I64 ObjDemo(...);
|
||||
|
||||
//Uncomment these if you wish
|
||||
//to call them at the command line.
|
||||
|
||||
//extern U0 Routine1(U8 *st);
|
||||
//extern U0 Routine2(U8 *st);
|
||||
//extern U0 Routine3(U8 *st);
|
||||
@@ -0,0 +1,27 @@
|
||||
This demonstrates that linking can be done
|
||||
at $FG,2$LOAD$FG$ time. This is the TempleOS answer
|
||||
to $FG,2$OBJ$FG$ files.
|
||||
|
||||
Right-Click $FG,2$MakeFile.CPP.Z$FG$ and click $FG,2$INCLUDE$FG$ or
|
||||
do the following:
|
||||
|
||||
1) Do a $LK,"Dir","MN:Dir"$() command
|
||||
|
||||
2) Right-Click on OD1.PRJ.Z and click $FG,2$COMPILE$FG$.
|
||||
Right-Click on OD2.PRJ.Z and click $FG,2$COMPILE$FG$.
|
||||
Right-Click on ODMain.PRJ.Z and click $FG,2$COMPILE$FG$.
|
||||
|
||||
3) In any order, do the following and ignore warnings.
|
||||
Right-Click on OD1.BIN.Z and click $FG,2$LOAD$FG$.
|
||||
Right-Click on ODMain.BIN.Z and click $FG,2$LOAD$FG$.
|
||||
Right-Click on OD2.BIN.Z and click $FG,2$LOAD$FG$.
|
||||
|
||||
4) Right-Click on ObjDemo.HPP.Z and click $FG,2$INCLUDE$FG$.
|
||||
|
||||
5) Type at the command-line:
|
||||
$ID,2$$FG,2$>ObjDemo("Param1","Param2");
|
||||
$ID,-2$
|
||||
|
||||
|
||||
$FG,2$#include$FG$ the file $LK-A,"::/TempleOS/Adam/BinRep.CPP"$ and
|
||||
call $LK,"BinRep","MN:BinRep"$() to analyze the $FG,2$.BIN.Z$FG$ files.
|
||||
Reference in new issue
Block a user