SparrowOSTS_121127.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:45:28 +02:00
1 parent 0e9364ff4c
commit e57428affb
1218 files changed
+247142 -165507

No files matched your search

@@ -0,0 +1,24 @@
Cd("::/SparrowOS/Demo/OldSchool/Demo2");;
Cmp("OD1");
Cmp("OD2");
Cmp("ODMain");
Load("OD1");
Load("OD2");
Load("ODMain");
#include "ObjDemo.HPP.Z"
ObjDemo("Success");
#ifndef BinRep
#include "::/SparrowOS/Adam/BinRep.CPP.Z"
#endif
PressAKey;
BinRep("OD2");
PressAKey;
BinRep("ODMain");
PressAKey;
HashRep(Fs->hash_table,HTG_ALL,NULL,"-p-r");
+12
View File
@@ -0,0 +1,12 @@
// imports all syms from the Adam Task's hash table.
#include "::/SparrowOS/OSMain/StaticAdam.HPP.Z"
import U0 Routine3(U8 *st);
U0 Routine1(U8 *st)
{
PrintF("Routine1:%s\n",st);
Routine3("What the!!!");
}
+31
View File
@@ -0,0 +1,31 @@
// imports all syms from the Adam Task's hash table.
#include "::/SparrowOS/OSMain/StaticAdam.HPP.Z"
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");
+37
View File
@@ -0,0 +1,37 @@
// imports all syms from the Adam Task's hash table.
#include "::/SparrowOS/OSMain/StaticAdam.HPP.Z"
//If you just want part of the symbolas
//#include "::/SparrowOS/OSMain/Static.HPP.Z"
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);
+27
View File
@@ -0,0 +1,27 @@
This demonstrates that linking can be done
at $FG,2$LOAD$FG$ time. This is the SparrowOS 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,"::/SparrowOS/Adam/BinRep.CPP.Z","FI:::/SparrowOS/Adam/BinRep.CPP.Z"$ and
call $LK,"BinRep","MN:BinRep"$() to analyze the $FG,2$.BIN.Z$FG$ files.