TempleOSCDV4.06.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:47:19 +02:00
1 parent 6fe38d2d9d
commit b632ab9a4f
261 files changed
+6282 -5801

No files matched your search

BIN
View File
Binary file not shown.
+49 -1
View File
@@ -2,7 +2,55 @@ $WW,1$$FG,5$$TX+CX,"Change Log"$$FG$
Use $LK,"R",A="MN:R"$() to rename if I change a label.
$IV,1$----03/29/16 17:59:14----$IV,0$
$IV,1$----05/07/16 20:39:10----$IV,0$
$IV,1$----05/07/16 08:55:59----$IV,0$
* $BK,1$TempleOS version 4.06 Released$BK,0$
$IV,1$----05/03/16 19:26:45----$IV,0$
* Made $LK,"FunSegFind",A="MN:FunSegFind"$() search all hash tables when $LK,"IsDbg",A="MN:IsDbg"$.
* Added missiles to $LK,"::/Apps/X-Caliber/X-Caliber.CPP"$.
* Fixed bug in $LK,"D3Unit",A="MN:D3Unit"$().
$IV,1$----05/01/16 15:12:31----$IV,0$
* $LK,"R",A="MN:R"$("Identical","Ident");
* $LK,"R",A="MN:R"$("Previous","Prev");
* $LK,"R",A="MN:R"$("Result","Res");
* Started assembler MMX/SSE. Not done.
* Changed a couple Bible related things.
$IV,1$----04/26/16 01:18:57----$IV,0$
* $LK,"R",A="MN:R"$("MapDrv","$LK,"DrvMap",A="MN:DrvMap"$");
$IV,1$----04/25/16 13:17:49----$IV,0$
* Changed args in $LK,"CAdd",A="MN:CAdd"$(), $LK,"CSub",A="MN:CSub"$(), $LK,"CMul",A="MN:CMul"$(), $LK,"CDiv",A="MN:CDiv"$() and $LK,"CPoly",A="MN:CPoly"$().
* Changed args in $LK,"D3Add",A="MN:D3Add"$(), $LK,"D3Sub",A="MN:D3Sub"$(), $LK,"D3Mul",A="MN:D3Mul"$(), $LK,"D3Div",A="MN:D3Div"$() and $LK,"D3Cross",A="MN:D3Cross"$().
$IV,1$----04/25/16 03:42:30----$IV,0$
* $LK,"R",A="MN:R"$("TK_INT","TK_I64");
* Added $LK,"::/Demo/Templates/Game1.CPP"$.
* Added $LK,"::/Demo/Templates/Lex1.CPP"$.
* Added $LK,"::/Demo/Templates/MultiCore1.CPP"$.
* Added $LK,"::/Demo/Templates/ODE1.CPP"$.
* Added $LK,"::/Demo/Templates/Registry1.CPP"$.
* Added $LK,"::/Demo/Templates/Util1.CPP"$.
* Added $LK,"::/Demo/Templates/Util2.CPP"$.
$IV,1$----04/23/16 13:20:24----$IV,0$
* Got rid of low protected memory area that caught NULL deref.
* Got rid of 4K page tables by making $LK,"text",A="MN:text"$.vga_alias. All pages are 2Meg size.
$IV,1$----04/15/16 13:39:25----$IV,0$
* Fixed bug in $LK,"EdCodeTools",A="MN:EdCodeTools"$().
* Fixed double $FG,2$ASCII#5$FG$ cursor bug.
$IV,1$----04/01/16 14:59:49----$IV,0$
* Changed $LK,"SpriteInterpolate",A="MN:SpriteInterpolate"$() args.
* $LK,"R",A="MN:R"$("Index","Idx");
$IV,1$----03/31/16 11:20:13----$IV,0$
* Changed $LK,"::/Adam/WallPaper.CPP"$.
* Got rid of $FG,4$CTask.time_slice_start$FG$ and $FG,4$CTask.total_time$FG$.
$IV,1$----03/29/16 05:53:45----$IV,0$
* $BK,1$TempleOS version 4.05 Released$BK,0$
+1 -1
View File
@@ -1,6 +1,6 @@
$WW,1$TempleOS has a string indirection feature implemented with the same hash symbol table entry as $FG,2$#define$FG$ macros, $LK,"HTT_DEFINE_STR",A="MN:HTT_DEFINE_STR"$. Support for string lists is also provided, but it's not very efficient, though, you can make a hash table with a list using $LK,"HashDefineLstAdd",A="MN:HashDefineLstAdd"$(). See $LK,"::/Adam/DolDoc/DocInit.CPP",A="FF:::/Adam/DolDoc/DocInit.CPP,HashDefineLstAdd"$.
If you have an $FG,2$@$FG$ as the first char of a define list entry, it is an alias for the previous entry num.
If you have an $FG,2$@$FG$ as the first char of a define list entry, it is an alias for the prev entry num.
Each task can load its own Define strings. Remember, when a $LK,"Hash",A="HI:Hash"$ table is searched for a string, if it is not found, the parent task's table is searched.
+1 -1
View File
@@ -29,7 +29,7 @@ $LK,"/Kernel/PCIBIOS.CPP",A="FI:::/Kernel/PCIBIOS.CPP"$ :290 could be eliminate
* Until super simple serial ports are available, PS/2 emulated keyboard and mouse must work. The BIOS must enable these.
* The x86 IN/OUT port instructions, normally have a delay. Perhaps, VMware & Intel can enable faster x86 IN/OUT instruction timing for ATA/ATAPI PIO, so bandwidth isn't bad when doing port I/O. See $LK,"ATAGetResult",A="MN:ATAGetResult"$(). We don't want to do DMA. Perhaps, x86 CPU chips need a new TempleOS mode for fast IN/OUT instructions?
* The x86 IN/OUT port instructions, normally have a delay. Perhaps, VMware & Intel can enable faster x86 IN/OUT instruction timing for ATA/ATAPI PIO, so bandwidth isn't bad when doing port I/O. See $LK,"ATAGetRes",A="MN:ATAGetRes"$(). We don't want to do DMA. Perhaps, x86 CPU chips need a new TempleOS mode for fast IN/OUT instructions?
* Perhaps, a new interrupt descriptor table entry type or a new x86 CPU mode can be made that cause fast software interrupts, doing exactly what the CALL REL32 does, but with IDT as indirection. We don't need to change privilege levels or stacks.
+1 -1
View File
@@ -27,7 +27,7 @@ $ID,2$The cursor pos is stored as a ASCII#5 character and is not bracketed with
$ID,-2$$TR,"TB Tab"$
$ID,2$Tabs are normally not bracketed with '$FG,2$$$$FG$', but are ASCII#9.
$ID,-2$$TR,"CL Clear"$
$ID,2$Clear all previous entries except ones with hold($FG,2$+H$FG$) flags. You might want $FG,2$+H$FG$ on word wrap entries. Alternatively, you can use $LK,"DocClear",A="MN:DocClear"$().
$ID,2$Clear all prev entries except ones with hold($FG,2$+H$FG$) flags. You might want $FG,2$+H$FG$ on word wrap entries. Alternatively, you can use $LK,"DocClear",A="MN:DocClear"$().
$ID,-2$$TR,"PB Page Break"$
$ID,2$Page break.
$ID,-2$$TR,"PL Page Length"$
+1 -1
View File
@@ -35,7 +35,7 @@ $ID,2$TempleOS is 100% open src. All the src code is included in the distro. U
$ID,-2$$TR,"Where are object files? How do I link?"$
$ID,2$TempleOS does not use object files or a linker. $LK,"AOT Compile Mode",A="FF:::/Doc/Glossary.TXT,AOT Compile Mode"$ is used to directly create flat binary files, $FG,2$/Kernel.BIN.C$FG$ and $FG,2$/Compiler/Compiler.BIN.Z$FG$ with no object files and linking.$FG$ $LK,"JIT Compile Mode",A="FF:::/Doc/Glossary.TXT,JIT Compile Mode"$ place code in memory, ready to run, with no object files or linking. Linking is done when $FG,2$BIN$FG$ modules are $LK,"Load",A="MN:Load"$()ed.
$ID,-2$$TR,"What is the FPS refresh rate?"$
$ID,2$The refresh rate is $TX,"30",D="WMG_FPS"$ frames-per-second. That is how often TempleOS updates screen mem. It is not syncronized to the hardware.
$ID,2$The refresh rate is $TX,"30",D="WINMGR_FPS"$ frames-per-second. That is how often TempleOS updates screen mem. It is not syncronized to the hardware.
$ID,-2$$TR,"How does a task own the speaker?"$
$ID,2$No task or application has a lock on the speaker so apps will interfere with each other.
$ID,-2$$TR,"Why does it leak memory?"$
+7 -4
View File
@@ -62,8 +62,9 @@ $FG,2$Glbl$FG$ Global
$FG,2$Gr$FG$ Graphic
$FG,2$IDE$FG$ Integrated Drive Electronics, Integrated Development Environment
$FG,2$Id$FG$ Identification
$FG,2$Ident$FG$ Identifier, Identity
$FG,2$Ident$FG$ Identifier, Identity, Identical
$FG,2$IDT$FG$ Interrupt Descriptor Table
$FG,2$Idx$FG$ Index
$FG,2$Init$FG$ Initialize
$FG,2$Ins$FG$ Insert
$FG,2$Inst$FG$ Instruction
@@ -98,12 +99,13 @@ $FG,2$Poly$FG$ Polygon
$FG,2$Pos$FG$ Position
$FG,2$Pow$FG$ Power
$FG,2$Prec$FG$ Precedence
$FG,2$Prev$FG$ Previous
$FG,2$Pri$FG$ Primary
$FG,2$Prod$FG$ Product, Production
$FG,2$Prof$FG$ Profile, Profiler
$FG,2$Prs$FG$ Parse, Parser
$FG,2$Prt$FG$ Partition
$FG,2$FunSeg$FG$ Program Section
$FG,2$FunSeg$FG$ Program Section
$FG,2$Pt$FG$ Point
$FG,2$Ptr$FG$ Pointer
$FG,2$Que$FG$ Queue
@@ -112,6 +114,7 @@ $FG,2$Ref$FG$ Reference
$FG,2$Reg$FG$ Register, Registry, Regular
$FG,2$Rem$FG$ Remove
$FG,2$Rep$FG$ Report, Repeat
$FG,2$Res$FG$ Result
$FG,2$Rqst$FG$ Request
$FG,2$Rst$FG$ Reset
$FG,2$Rot$FG$ Rotation
@@ -233,7 +236,7 @@ $FG,5$lower_case$FG$
Local function vars and glbl vars are lower case. Class member names are also lower_case.
$FG,5$_lower_case$FG$
Function args which are outputs (passed as ptrs) have leading underscores. Also, args which have identically named local variable counterparts have leading underscores.
Function args which are outputs (passed as ptrs) have leading underscores. Also, args which have idently named local variable counterparts have leading underscores.
$FG,5$DOCf_????$FG$
Flags bit nums instead of bit values are designated with a lower case $FG,2$f$FG$.
@@ -241,7 +244,7 @@ $FG,5$DOCf_????$FG$
$FG,5$DOCG_????$FG$
Flag groups are designated with "$FG,2$G$FG$".
$FG,5$result$FG$ is reserved for local variables that hold the function return val.
$FG,5$res$FG$ is reserved for local variables that hold the function return val.
$FG,5$*$FG$ I used C++ like naming. I place $FG,2$New$FG$, $FG,2$Del$FG$, $FG,2$Init$FG$, $FG,2$Rst$FG$, ect. on the end of a function name instead of at the beginning. $FG,2$RstMusicSettings$FG$ should be $FG,2$MusicSettingsRst$FG$.
$ID,-2$$TR,"Fs"$
+1 -1
View File
@@ -2,7 +2,7 @@ $FG,5$$TX+CX,"The Grub Master Bootloader"$$FG$
$WW,1$Here are my $FG,2$grub.cfg$FG$ file entries for my TempleOS partitions. I don't have the patience to do it correctly and GRUB obfuscates. Chain loading is just the normal way an operating system like Windows boots. They do drives, zero-based, and partitions on drives, one-based. They call traditional partitioning a "msdos" partition and I presume, if there is a new way to partition drives, it has a new name.
In addition to a Windows and a Linux partition, I have a Primary TempleOS $FG,2$'D'$FG$, Backup TempleOS $FG,2$'E'$FG$ and a Transfer $FG,2$'I'$FG$ partition for transferring between Windows and TempleOS. "hd0" is 1st hard drive, zero-based numbering. "msdos1" is partition #1, traditional msdos partitioning. I keep $FG,2$'D'$FG$, $FG,2$'E'$FG$, and $FG,2$'I'$FG$ identical by frequently copying all files and I use $FG,2$'I'$FG$ to transfer files. They only need to be a couple Gig in size. Every time I copy files, use $LK,"MakeOSDrvBootInstall",A="MN:MakeOSDrvBootInstall"$() to $LK,"MakeAll",A="MN:MakeAll"$ and prepare the partition $LK,"boot sector",A="FI:::/Adam/Opt/Boot/BootHD.CPP"$ for chainloading by patching the new block address and size of $FG,2$Kernel.BIN.C$FG$.
In addition to a Windows and a Linux partition, I have a Primary TempleOS $FG,2$'D'$FG$, Backup TempleOS $FG,2$'E'$FG$ and a Transfer $FG,2$'I'$FG$ partition for transferring between Windows and TempleOS. "hd0" is 1st hard drive, zero-based numbering. "msdos1" is partition #1, traditional msdos partitioning. I keep $FG,2$'D'$FG$, $FG,2$'E'$FG$, and $FG,2$'I'$FG$ ident by frequently copying all files and I use $FG,2$'I'$FG$ to transfer files. They only need to be a couple Gig in size. Every time I copy files, use $LK,"MakeOSDrvBootInstall",A="MN:MakeOSDrvBootInstall"$() to $LK,"MakeAll",A="MN:MakeAll"$ and prepare the partition $LK,"boot sector",A="FI:::/Adam/Opt/Boot/BootHD.CPP"$ for chainloading by patching the new block address and size of $FG,2$Kernel.BIN.C$FG$.
menuentry "TempleOS D" {
insmod chain
+1 -1
View File
@@ -98,7 +98,7 @@ $FG,5$$TX+CX,"Hash Sym Tables"$$FG$
* $FG,2$adam_task->hash_table$FG$ holds the $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ syms loaded in on start-up.
* $FG,2$Fs->hash_table$FG$ holds user HolyC syms and if a sym is not found, it checks parents. When a duplicate sym is added to the table, it overshadows the previous sym. When developing software, typically you include the file at the cmd prompt, make changes and reinclude it. Old syms are overshadowed but they are still there. Periodically, kill the TASK and start fresh when mem is low. If you wish your applications to free themselves instead of staying in mem, spawn or $LK,"PopUp",A="MN:PopUp"$() a task to run the application and kill it when it's done.
* $FG,2$Fs->hash_table$FG$ holds user HolyC syms and if a sym is not found, it checks parents. When a duplicate sym is added to the table, it overshadows the prev sym. When developing software, typically you include the file at the cmd prompt, make changes and reinclude it. Old syms are overshadowed but they are still there. Periodically, kill the TASK and start fresh when mem is low. If you wish your applications to free themselves instead of staying in mem, spawn or $LK,"PopUp",A="MN:PopUp"$() a task to run the application and kill it when it's done.
* To display the contents of a hash table, use the $LK,"Who",A="MN:Who"$() routine or the varients. $LK,"HashDepthRep",A="MN:HashDepthRep"$() gives a histogram of how long the chains are, in case you wish to make hash table sizes bigger.
BIN
View File
Binary file not shown.
+75 -75
View File
@@ -1,12 +1,12 @@
$WW,1$$FG,5$$TX+CX,"HolyC"$$FG$
$WW,1$$PURPLE$$TX+CX,"HolyC"$$FG$
* See $LK,"::/Doc/CompilerOverview.TXT"$.
* See $LK,"Scoping and Linkage",A="FI:::/Doc/ScopingLinkage.TXT"$ for details on $FG,2$extern$FG$, $FG,2$import$FG$, $FG,2$_extern$FG$, $FG,2$_import$FG$, etc.
* See $LK,"Scoping and Linkage",A="FI:::/Doc/ScopingLinkage.TXT"$ for details on $GREEN$extern$FG$, $GREEN$import$FG$, $GREEN$_extern$FG$, $GREEN$_import$FG$, etc.
* Built-in types include $FG,2$I0,I8,I16,I32,I64$FG$ for signed 0-8 byte ints and $FG,2$U0,U8,U16,U32,U64$FG$ for unsigned 0-8 byte ints and $FG,2$F64$FG$ for 8 byte floats.
* Built-in types include $GREEN$I0,I8,I16,I32,I64$FG$ for signed 0-8 byte ints and $GREEN$U0,U8,U16,U32,U64$FG$ for unsigned 0-8 byte ints and $GREEN$F64$FG$ for 8 byte floats.
$FG,2$ U0 void, but ZERO size!
$GREEN$ U0 void, but ZERO size!
I8 char
U8 unsigned char
I16 short
@@ -16,16 +16,16 @@ $FG,2$ U0 void, but ZERO size!
I64 long (64-bit)
U64 unsigned long (64-bit)
F64 double$FG$
$FG,4$no F32 float.$FG$
$RED$no F32 float.$FG$
* Function with no args, or just default args can be called without parentheses.
>$FG,2$Dir("*");$FG$
>$FG,2$Dir();$FG$
>$FG,2$Dir;$FG$
>$GREEN$Dir("*");$FG$
>$GREEN$Dir();$FG$
>$GREEN$Dir;$FG$
* Default args don't have to be on the end. This code is valid:
$ID,2$$FG,2$U0 Test(I64 i=4,I64 j,I64 k=5)
$ID,2$$GREEN$U0 Test(I64 i=4,I64 j,I64 k=5)
{
Print("%X %X %X\n",i,j,k);
}
@@ -34,7 +34,7 @@ Test(,3);$FG$
$ID,-2$
* A char const all alone is sent to $LK,"PutChars",A="MN:PutChars"$(). A string with or without args is sent to $LK,"Print",A="MN:Print"$(). An empty string literal signals a variable fmt_str follows.
$ID,2$$FG,2$void DemoC(char drv,char *fmt,char *name,int age)
$ID,2$$GREEN$void DemoC(char drv,char *fmt,char *name,int age)
{
printf("Hello World!\n");
printf("%s age %d\n",name,age);
@@ -52,15 +52,15 @@ U0 DemoHolyC(U8 drv,U8 *fmt,U8 *name,I64 age)
'*';
}
$FG$$ID,-2$
* When dealing with function addresses such as for callbacks, precede the name with "$FG,2$&$FG$".
* When dealing with function addresses such as for callbacks, precede the name with "$GREEN$&$FG$".
* Type casting is postfix. To typecast int or F64, use $LK,"ToI64",A="MN:ToI64"$(), $LK,"ToBool",A="MN:ToBool"$() or $LK,"ToF64",A="MN:ToF64"$(). (TempleOS follows normal C float<-->int conversion, but sometimes you want to override. These functions are better than multiplying by "1.0" to convert to float.)
* There is no $FG,2$main()$FG$ function. Any code outside of functions gets executed upon start-up, in order.
* There is no $GREEN$main()$FG$ function. Any code outside of functions gets executed upon start-up, in order.
* There are no bit fields, but there are $LK,"bit access",A="HI:Bit"$ routines and you can access bytes or words within any int. See $LK,"I64 declaration",A="MN:I64"$. A class can be accessed as a whole are subints, if you put a type in front of the $FG,2$class$FG$ declaration.
* There are no bit fields, but there are $LK,"bit access",A="HI:Bit"$ routines and you can access bytes or words within any int. See $LK,"I64 declaration",A="MN:I64"$. A class can be accessed as a whole are subints, if you put a type in front of the $GREEN$class$FG$ declaration.
$ID,2$
$FG,2$public I64i union I64 //"I64i" is intrinsic. We are defining "I64".
$GREEN$public I64i union I64 //"I64i" is intrinsic. We are defining "I64".
{
I8i i8[8];
U8i u8[8];
@@ -73,19 +73,19 @@ $FG,2$public I64i union I64 //"I64i" is intrinsic. We are defining "I64".
I64 i=0x123456780000DEF0;
i.u16[1]=0x9ABC;
$FG$$ID,-2$
* Variable arg count functions ($FG,2$...$FG$) can access their args with built-in variables similar to '$FG,2$this$FG$' in C++. They are '$FG,2$I64 argc$FG$' and '$FG,2$I64 argv[]$FG$'.
* Variable arg count functions ($GREEN$...$FG$) can access their args with built-in variables similar to '$GREEN$this$FG$' in C++. They are '$GREEN$I64 argc$FG$' and '$GREEN$I64 argv[]$FG$'.
$ID,2$$WW,0$
$FG,2$I64 AddNums(...)
$GREEN$I64 AddNums(...)
{
I64 i,result=0;
I64 i,res=0;
for (i=0;i<argc;i++)
result+=argv[i];
return result;
res+=argv[i];
return res;
}
$FG$>$FG,2$AddNums(1,2,3);$FG$
$FG$>$GREEN$AddNums(1,2,3);$FG$
ans=6
$FG,2$
$GREEN$
public U0 GrPrint(CDC *dc,I64 x,I64 y,U8 *fmt,...)
{
@@ -101,33 +101,33 @@ public U0 GrPrint(CDC *dc,I64 x,I64 y,U8 *fmt,...)
...
$WW,1$$FG$$ID,-2$
* Allows "$FG,2$5<i<j+1<20$FG$" instead of "$FG,2$5<i && i<j+1 && j+1<20$FG$".
* Allows "$GREEN$5<i<j+1<20$FG$" instead of "$GREEN$5<i && i<j+1 && j+1<20$FG$".
$ID,2$
$FG,2$if (13<=age<20)
$GREEN$if (13<=age<20)
"Teen-ager";
$FG$$ID,-2$
* if you know a switch stmt will not exceed the lowest or highest case values. $FG,2$switch []$FG$ is a little faster because it doesn't check.
* if you know a switch stmt will not exceed the lowest or highest case values. $GREEN$switch []$FG$ is a little faster because it doesn't check.
* $FG,2$switch$FG$ stmts always use a jump table. Don't use them with cases with really big, sparse ranges.
* $GREEN$switch$FG$ stmts always use a jump table. Don't use them with cases with really big, sparse ranges.
* Allows ranges like "$FG,2$case 4...7:$FG$" in $FG,2$switch$FG$ stmts.
* Allows ranges like "$GREEN$case 4...7:$FG$" in $GREEN$switch$FG$ stmts.
* A no case number causes next higher int case in $FG,2$switch$FG$ stmts. See $LK,"::/Demo/NullCase.CPP"$.
* A no case number causes next higher int case in $GREEN$switch$FG$ stmts. See $LK,"::/Demo/NullCase.CPP"$.
$ID,2$$FG,2$I64 i;
$ID,2$$GREEN$I64 i;
for (i=0;i<20;i++)
switch (i) {
case: "Zero\n"; break; //Starts at zero
case: "One\n"; break; //One plus previous case.
case: "One\n"; break; //One plus prev case.
case: "Two\n"; break;
case: "Three\n"; break;
case 10: "Ten\n"; break;
case: "Eleven\n"; break; //One plus previous case.
case: "Eleven\n"; break; //One plus prev case.
}$FG$$ID,-2$
* $FG,2$sub_switch_start$FG$/$FG,2$sub_switch_end$FG$ allow a new type of nested-switch control flow. (Don't goto, throw exception or return out of $FG,2$sub_switch_start$FG$ front porch area.) See $LK,"::/Demo/SubSwitch.CPP"$.
* $GREEN$sub_switch_start$FG$/$GREEN$sub_switch_end$FG$ allow a new type of nested-switch control flow. (Don't goto, throw exception or return out of $GREEN$sub_switch_start$FG$ front porch area.) See $LK,"::/Demo/SubSwitch.CPP"$.
$ID,2$$FG,2$I64 i;
$ID,2$$GREEN$I64 i;
for (i=0;i<10;i++)
switch (i) {
case 0: "Zero "; break;
@@ -143,15 +143,15 @@ for (i=0;i<10;i++)
break;
}$FG$
$BG$OutPut:
>$FG,2$Zero [One] Two [Three] Four [Five]$FG$
>$GREEN$Zero [One] Two [Three] Four [Five]$FG$
$ID,-2$
* A $FG,2$nounusedwarn$FG$ stmt will suppress an unused var warning.
* A $GREEN$nounusedwarn$FG$ stmt will suppress an unused var warning.
* You can have multiple member vars of a class named "$FG,2$pad$FG$" or "$FG,2$reserved$FG$", and it won't issue warnings.
* You can have multiple member vars of a class named "$GREEN$pad$FG$" or "$GREEN$reserved$FG$", and it won't issue warnings.
* $FG,2$noreg$FG$ or $FG,2$reg$FG$ can be placed before a function local var name. You can, optionally, specify a reg after the $FG,2$reg$FG$ keyword.
* $GREEN$noreg$FG$ or $GREEN$reg$FG$ can be placed before a function local var name. You can, optionally, specify a reg after the $GREEN$reg$FG$ keyword.
$ID,2$$FG,2$U0 Main()
$ID,2$$GREEN$U0 Main()
{
//Only use $LK,"REGG_LOCAL_VARS",A="MN:REGG_LOCAL_VARS"$ or $LK,"REGG_LOCAL_NON_PTR_VARS",A="MN:REGG_LOCAL_NON_PTR_VARS"$ for reg vars or else clobbered.
I64 reg R15 i=5, noreg j=4;
@@ -168,11 +168,11 @@ $ID,2$$FG,2$U0 Main()
}
}
$FG$$ID,-2$
* $FG,2$interrupt$FG$, $FG,2$haserrcode$FG$, $FG,2$public$FG$, $FG,2$argpop$FG$ or $FG,2$noargpop$FG$ are function flags. See $LK,"::/Demo/Lectures/Mem/PageTableEntries2.CPP"$.
* $GREEN$interrupt$FG$, $GREEN$haserrcode$FG$, $GREEN$public$FG$, $GREEN$argpop$FG$ or $GREEN$noargpop$FG$ are function flags. See $LK,"::/Demo/Lectures/Mem/PageTableEntries.CPP"$.
* A single quote can encompass multiple characters. $FG,2$'ABC'$FG$ is equ to $FG,2$0x434241$FG$. $LK,"PutChars",A="MN:PutChars"$() takes multiple characters.
* A single quote can encompass multiple characters. $GREEN$'ABC'$FG$ is equ to $GREEN$0x434241$FG$. $LK,"PutChars",A="MN:PutChars"$() takes multiple characters.
$ID,2$$FG,2$asm {
$ID,2$$GREEN$asm {
HELLO_WORLD::
PUSH RBP
MOV RBP,RSP
@@ -187,82 +187,82 @@ Call(HELLO_WORLD);
PutChars('Hello ');
PutChars('World\n');
$FG$$ID,-2$
* The "$FG,2$`$FG$" operator raises a base to a power.
* The "$GREEN$`$FG$" operator raises a base to a power.
* There is no question-colon operator.
* TempleOS $LK,"operator precedence",A="FF:::/Compiler/CInit.CPP,cmp.binary_ops"$
$FG,2$`$FG$,$FG,2$>>$FG$,$FG,2$<<$FG$
$FG,2$*$FG$,$FG,2$/$FG$,$FG,2$%$FG$
$FG,2$&$FG$
$FG,2$^$FG$
$FG,2$|$FG$
$FG,2$+$FG$,$FG,2$-$FG$
$FG,2$$FG,2$<$FG$,$FG,2$>$FG$,$FG,2$<=$FG$,$FG,2$>=$FG$
$FG,2$==$FG$,$FG,2$!=$FG$
$FG,2$&&$FG$
$FG,2$$FG,2$^^$FG$
$FG,2$||$FG$$FG$
$FG,2$=$FG$,$FG,2$<<=$FG$,$FG,2$>>=$FG$,$FG,2$*=$FG$,$FG,2$/=$FG$,$FG,2$&=$FG$,$FG,2$|=$FG$,$FG,2$^=$FG$,$FG,2$+=$FG$,$FG,2$-=$FG$
$GREEN$`$FG$,$GREEN$>>$FG$,$GREEN$<<$FG$
$GREEN$*$FG$,$GREEN$/$FG$,$GREEN$%$FG$
$GREEN$&$FG$
$GREEN$^$FG$
$GREEN$|$FG$
$GREEN$+$FG$,$GREEN$-$FG$
$GREEN$$GREEN$<$FG$,$GREEN$>$FG$,$GREEN$<=$FG$,$GREEN$>=$FG$
$GREEN$==$FG$,$GREEN$!=$FG$
$GREEN$&&$FG$
$GREEN$$GREEN$^^$FG$
$GREEN$||$FG$$FG$
$GREEN$=$FG$,$GREEN$<<=$FG$,$GREEN$>>=$FG$,$GREEN$*=$FG$,$GREEN$/=$FG$,$GREEN$&=$FG$,$GREEN$|=$FG$,$GREEN$^=$FG$,$GREEN$+=$FG$,$GREEN$-=$FG$
* You can use $LK,"Option",A="MN:Option"$($LK,"OPTf_WARN_PAREN",A="MN:OPTf_WARN_PAREN"$,ON) to find unnecessary parentheses in code.
* You can use $LK,"Option",A="MN:Option"$($LK,"OPTf_WARN_DUP_TYPES",A="MN:OPTf_WARN_DUP_TYPES"$,ON) to find dup local var type stmts.
* With the $FG,2$#exe{}$FG$ feature in your src code, you can place programs that insert text into the stream of code being compiled. See $LK,"#exe {}",A="FF:::/Kernel/KEnd.CPP,#exe {"$ for an example where the date/time and compile-time prompting for cfguration data is placed into a program. $LK,"StreamPrint",A="MN:StreamPrint"$() places text into a src program stream following the conclusion of the $FG,2$#exe{}$FG$ blk.
* With the $GREEN$#exe{}$FG$ feature in your src code, you can place programs that insert text into the stream of code being compiled. See $LK,"#exe {}",A="FF:::/Kernel/KEnd.CPP,#exe {"$ for an example where the date/time and compile-time prompting for cfguration data is placed into a program. $LK,"StreamPrint",A="MN:StreamPrint"$() places text into a src program stream following the conclusion of the $GREEN$#exe{}$FG$ blk.
* No $FG,2$#define$FG$ functions exist (I'm not a fan)
* No $GREEN$#define$FG$ functions exist (I'm not a fan)
* No $FG,2$typedef$FG$, use $FG,2$class$FG$.
* No $GREEN$typedef$FG$, use $GREEN$class$FG$.
* No type-checking
* Can't use $FG,2$<>$FG$ with $FG,2$#include$FG$, use $FG,2$""$FG$.
* Can't use $GREEN$<>$FG$ with $GREEN$#include$FG$, use $GREEN$""$FG$.
* "$FG,2$$$$FG$" is an escape character. Two dollar signs signify an ordinary $$. See $LK,"DolDoc",A="FI:::/Doc/DolDocOverview.TXT"$. In $FG,2$asm$FG$ or $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ code, it also refers to the inst's address or the offset in a $FG,2$class$FG$ definition.
* "$GREEN$$$$FG$" is an escape character. Two dollar signs signify an ordinary $$. See $LK,"DolDoc",A="FI:::/Doc/DolDocOverview.TXT"$. In $GREEN$asm$FG$ or $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ code, it also refers to the inst's address or the offset in a $GREEN$class$FG$ definition.
* $FG,2$union$FG$ is more like a class, so you don't reference it with a $FG,2$union$FG$ label after you define it. Some common unions are declared in $LK,"KernelA.HPP",A="MN:U16"$ for 1,2,4 and 8 byte objects. If you place a type in front of a union declaration, that is the type when used by itself. See $LK,"::/Demo/SubIntAccess.CPP"$.
* $GREEN$union$FG$ is more like a class, so you don't reference it with a $GREEN$union$FG$ label after you define it. Some common unions are declared in $LK,"KernelA.HPP",A="MN:U16"$ for 1,2,4 and 8 byte objects. If you place a type in front of a union declaration, that is the type when used by itself. See $LK,"::/Demo/SubIntAccess.CPP"$.
* $FG,2$class$FG$ member vars can have meta data. $FG,2$fmtstr$FG$ and $FG,2$fmtdata$FG$ are two meta data types now used. All compiler structures are saved and you can access the compiler's info about classes and vars. See $LK,"::/Demo/ClassMeta.CPP"$ and $LK,"DocForm",A="MN:DocForm"$().
* $GREEN$class$FG$ member vars can have meta data. $GREEN$fmtstr$FG$ and $GREEN$fmtdata$FG$ are two meta data types now used. All compiler structures are saved and you can access the compiler's info about classes and vars. See $LK,"::/Demo/ClassMeta.CPP"$ and $LK,"DocForm",A="MN:DocForm"$().
* There is a keyword $FG,2$lastclass$FG$ you use as a dft arg. It is set to the class name of the previous arg. See $LK,"::/Demo/LastClass.CPP"$, $LK,"ClassRep",A="MN:ClassRep"$(), $LK,"DocForm",A="MN:DocForm"$() and $LK,"::/Demo/Dsk/BlkDevRep.CPP"$.
* There is a keyword $GREEN$lastclass$FG$ you use as a dft arg. It is set to the class name of the prev arg. See $LK,"::/Demo/LastClass.CPP"$, $LK,"ClassRep",A="MN:ClassRep"$(), $LK,"DocForm",A="MN:DocForm"$() and $LK,"::/Demo/Dsk/BlkDevRep.CPP"$.
* See $LK,"::/Demo/Exceptions.CPP"$. $FG,2$try{} catch{}$FG$ and $FG,2$throw$FG$ are different from C++. $FG,2$throw$FG$ is a function with an 8-byte or less char arg. The char string passed in $FG,2$throw()$FG$ can be accessed from within a $FG,2$catch{}$FG$ using the $FG,2$Fs->except_ch$FG$. Within a $FG,2$catch {}$FG$ blk, set the var $FG,2$Fs->catch_except$FG$ to $FG,2$TRUE$FG$ if you want to terminate the search for a handler. Use $LK,"PutExcept",A="MN:PutExcept"$() as a handler, if you like.
* See $LK,"::/Demo/Exceptions.CPP"$. $GREEN$try{} catch{}$FG$ and $GREEN$throw$FG$ are different from C++. $GREEN$throw$FG$ is a function with an 8-byte or less char arg. The char string passed in $GREEN$throw()$FG$ can be accessed from within a $GREEN$catch{}$FG$ using the $GREEN$Fs->except_ch$FG$. Within a $GREEN$catch {}$FG$ blk, set the var $GREEN$Fs->catch_except$FG$ to $GREEN$TRUE$FG$ if you want to terminate the search for a handler. Use $LK,"PutExcept",A="MN:PutExcept"$() as a handler, if you like.
* A function is available similar to $FG,2$sizeof$FG$ which provides the offset of a member of a class. It's called $FG,2$offset$FG$. You place the class name and member inside as in $FG,2$offset(classname.membername)$FG$. It has nothing to do with 16-bit code. Both $FG,2$sizeof$FG$ and $FG,2$offset$FG$ only accept one level of member vars. That is, you can't do $FG,2$sizeof(classname.membername.submembername)$FG$.$FG$
* A function is available similar to $GREEN$sizeof$FG$ which provides the offset of a member of a class. It's called $GREEN$offset$FG$. You place the class name and member inside as in $GREEN$offset(classname.membername)$FG$. It has nothing to do with 16-bit code. Both $GREEN$sizeof$FG$ and $GREEN$offset$FG$ only accept one level of member vars. That is, you can't do $GREEN$sizeof(classname.membername.submembername)$FG$.$FG$
* There is no $FG,2$continue$FG$ stmt. Use $FG,2$goto$FG$.
* There is no $GREEN$continue$FG$ stmt. Use $GREEN$goto$FG$.
* $FG,2$lock{}$FG$ can be used to apply asm $FG,2$LOCK$FG$ prefixes to code for safe multicore read-modify-write accesses. The code bracked with have $FG,2$LOCK$FG$ asm prefix's applied to relevant insts within. It's a little shoddy. See $LK,"::/Demo/MultiCore/Lock.CPP"$.
* $GREEN$lock{}$FG$ can be used to apply asm $GREEN$LOCK$FG$ prefixes to code for safe multicore read-modify-write accesses. The code bracked with have $GREEN$LOCK$FG$ asm prefix's applied to relevant insts within. It's a little shoddy. See $LK,"::/Demo/MultiCore/Lock.CPP"$.
* There is a function called $LK,"MSize",A="MN:MSize"$() which gives the size of an object alloced off the heap. For larger size allocations, the system rounds-up to a power of two, so $FG,2$MSize()$FG$ lets you know the real size and you can take full advantage of it.
* There is a function called $LK,"MSize",A="MN:MSize"$() which gives the size of an object alloced off the heap. For larger size allocations, the system rounds-up to a power of two, so $GREEN$MSize()$FG$ lets you know the real size and you can take full advantage of it.
* You CAN $LK,"Free",A="MN:Free"$() a $FG,2$NULL$FG$ ptr. Useful variants of $LK,"MAlloc",A="MN:MAlloc"$() can be found $LK,"Here",A="MN:CAlloc"$. Each task has a heap and you can $FG,2$MAlloc$FG$ and $FG,2$Free$FG$ off-of other task's heaps, or make an independent heap with $LK,"HeapCtrlInit",A="MN:HeapCtrlInit"$(). See $LK,"HeapLog",A="MN:HeapLog"$() for an example.
* You CAN $LK,"Free",A="MN:Free"$() a $GREEN$NULL$FG$ ptr. Useful variants of $LK,"MAlloc",A="MN:MAlloc"$() can be found $LK,"Here",A="MN:CAlloc"$. Each task has a heap and you can $GREEN$MAlloc$FG$ and $GREEN$Free$FG$ off-of other task's heaps, or make an independent heap with $LK,"HeapCtrlInit",A="MN:HeapCtrlInit"$(). See $LK,"HeapLog",A="MN:HeapLog"$() for an example.
* The stk does not grow because virtual mem is not used. I recommend allocating large local vars from the heap. You can change $LK,"MEM_DFT_STK",A="MN:MEM_DFT_STK"$ and recompile $FG,2$Kernel$FG$ or request more when doing a $LK,"Spawn",A="MN:Spawn"$(). You can use $LK,"CallStkGrow",A="MN:CallStkGrow"$(), but it's odd. See $LK,"::/Demo/StkGrow.CPP"$.
* The stk does not grow because virtual mem is not used. I recommend allocating large local vars from the heap. You can change $LK,"MEM_DFT_STK",A="MN:MEM_DFT_STK"$ and recompile $GREEN$Kernel$FG$ or request more when doing a $LK,"Spawn",A="MN:Spawn"$(). You can use $LK,"CallStkGrow",A="MN:CallStkGrow"$(), but it's odd. See $LK,"::/Demo/StkGrow.CPP"$.
* Only one base class is allowed.
* $FG,2$printf()$FG$ has new codes. See $LK,"Print(\"\") Fmt Strings",A="FI:::/Doc/Print.TXT"$.
* $GREEN$printf()$FG$ has new codes. See $LK,"Print(\"\") Fmt Strings",A="FI:::/Doc/Print.TXT"$.
* All values are extended to 64-bit when accessed. Intermediate calculations are done with 64-bit values.
$ID,2$$FG,2$U0 Main()
$ID,2$$GREEN$U0 Main()
{
I16 i1;
I32 j1;
j1=i1=0x12345678; //Resulting i1 is 0x5678 but j1 is 0x12345678
j1=i1=0x12345678; //Resing i1 is 0x5678 but j1 is 0x12345678
I64 i2=0x8000000000000000;
Print("%X\n",i2>>1); //Result is 0xC000000000000000 as expected
Print("%X\n",i2>>1); //Res is 0xC000000000000000 as expected
U64 u3=0x8000000000000000;
Print("%X\n",u3>>1); //Result is 0x4000000000000000 as expected
Print("%X\n",u3>>1); //Res is 0x4000000000000000 as expected
I32 i4=0x80000000; //const is loaded into a 64-bit reg var.
Print("%X\n",i4>>1); //Result is 0x40000000
Print("%X\n",i4>>1); //Res is 0x40000000
I32 i5=-0x80000000;
Print("%X\n",i5>>1); //Result is 0xFFFFFFFFC0000000
Print("%X\n",i5>>1); //Res is 0xFFFFFFFFC0000000
}
$ID,-2$$FG$
+5 -8
View File
@@ -1,6 +1,6 @@
$WW,1$$FG,5$$TX+CX,"Memory Overview"$$FG$
Paging is practically not used. 64-bit mode requires paging, however, so it is identity-mapped, virtual identical to physical. All tasks on all cores use the same page table map, just as though all addresses are physical addresses. 2 Meg page table entries are used, except the first 2 Meg, which uses 4K page tables entries. Nothing swaps to disk, either.
Paging is practically not used. 64-bit mode requires paging, however, so it is identity-mapped, virtual ident to physical. All tasks on all cores use the same page table map, just as though all addresses are physical addresses. 2 Meg page table entries are used. Nothing swaps to disk.
In TempleOS, the lowest 2 Gig of memory is called the $FG,2$code heap$FG$. TempleOS's compiler always uses 32-bit signed relative JMP & CALL insts because 64-bit CALLs take two insts. With signed +/- 32-bit values, code can only call a function within 2 Gig distance. Therefore, TempleOS keeps all code in the lowest 2 Gig memory addresses including what would normally be called "the kernel". Two Gig is plenty for code, don't worry.
@@ -14,10 +14,7 @@ See $LK,"MemRep",A="MN:MemRep"$() and $LK,"::/Demo/MemDemo.CPP"$.
$FG,5$$TX+CX,"Single System-wide Mem Map"$
$FG,2$ 0x0000000000- 0x00$TX,"00006FFF",D="DD_PROTECTED_LOW"$$FG$
$ID,2$Pages marked not present so NULL ptr dereference causes a fault.
$ID,-2$
$FG,2$ 0x00$TX,"00007C00",D="DD_KERNEL"$- 0x00$TX,"0003460F",D="DD_KERNEL_END"$$FG$
$FG,2$ 0x00$TX,"00007C00",D="DD_KERNEL"$- 0x00$TX,"000347DF",D="DD_KERNEL_END"$$FG$
$ID,2$Kernel module, placed here by the boot-loader, $LK,"BOOT_RAM_BASE",A="MN:BOOT_RAM_BASE"$.
$ID,-2$
$FG,2$ 0x00$TX,"00096600",D="DD_BOOT_HIGH_LOC_DVD"$- 0x00$TX,"00096FFF",D="DD_BOOT_HIGH_LOC_DVD_END"$$FG$
@@ -30,12 +27,12 @@ $FG,2$~0x000009F000- 0x000009FFFF
$ID,2$$FG$Extended BIOS data area.
$ID,-2$
$FG,2$ 0x00000A0000- 0x00000BFFFF$FG$
$ID,2$VGA graphics mem, marked as write-through cache.
$ID,2$VGA graphics mem, marked as write-through cache in $LK,"text",A="MN:text"$.vga_alias.
$ID,-2$
$FG,2$ 0x00$TX,"00100000",D="DD_SYS_FIXED_AREA_BASE"$- 0x00$TX,"001845FF",D="DD_SYS_FIXED_AREA_END"$$FG$
$FG,2$ 0x00$TX,"00100000",D="DD_SYS_FIXED_AREA_BASE"$- 0x00$TX,"001835FF",D="DD_SYS_FIXED_AREA_END"$$FG$
$ID,2$$LK,"CSysFixedArea",A="MN:CSysFixedArea"$ for page tables and misc. $TX,"128 Gig",D="DD_MEM_MAPPED_SPACE_GIG"$ of address space mapped.
$ID,-2$
$FG,2$ 0x00$TX,"00184600",D="DD_SYS_HEAP_BASE"$- 0x00$TX,"3FFE3DFF",D="DD_SYS_HEAP_LIMIT"$$FG$
$FG,2$ 0x00$TX,"00183600",D="DD_SYS_HEAP_BASE"$- 0x00$TX,"3FFE3DFF",D="DD_SYS_HEAP_LIMIT"$$FG$
$ID,2$Code Heap mem.
$ID,-2$
$FG,2$ - 0x007FFFFFFF$FG$
+1 -1
View File
@@ -6,7 +6,7 @@ Only tasks on $FG,2$core0$FG$ can have windows, but other cores can help render
Each core has an executive $FG,2$seth task$FG$ which is the father of all tasks on that core. Adam is the seth task on core 0.
You give a job to a seth task with $LK,"JobQue",A="MN:JobQue"$() and get the result with $LK,"JobResultGet",A="MN:JobResultGet"$(). You spawn a task on another core with $LK,"Spawn",A="MN:Spawn"$().
You give a job to a seth task with $LK,"JobQue",A="MN:JobQue"$() and get the res with $LK,"JobResGet",A="MN:JobResGet"$(). You spawn a task on another core with $LK,"Spawn",A="MN:Spawn"$().
Note: You must use the $FG,2$LOCK$FG$ asm prefix when changing shared structures in a multicore environment. The $LK,"LBts",A="MN:LBts"$(), $LK,"LBtr",A="MN:LBtr"$() and $LK,"LBtc",A="MN:LBtc"$() insts have $FG,2$LOCK$FG$ prefixes. The compiler has a $FG,2$lock{}$FG$ feature but it doesn't work well. See $LK,"::/Demo/MultiCore/Lock.CPP"$.
+2 -2
View File
@@ -73,7 +73,7 @@ $LK,"GrPrint",A="MN:GrPrint"$(CDC *dc,I64 x,I64 y,U8 *fmt,...) and $LK,"GrVPrint
$LK,"TextPrint",A="MN:TextPrint"$(CTask *task,I64 x,I64 y,I64 attr,U8 *fmt,...) plots to $LK,"gr.text_base",A="HI:TextBase Layer"$.
$LK,"ExePrint",A="MN:ExePrint"$(U8 *fmt,...) compiles and execute a string. Note: It returns the result of the last executed expression.
$LK,"ExePrint",A="MN:ExePrint"$(U8 *fmt,...) compiles and execute a string. Note: It returns the res of the last executed expression.
$LK,"AFPrint",A="MN:AFPrint"$(I64 mS,U8 *fmt,...) $LK,"PutChars",A="MN:PutChars"$()s one at a time with a delay.
@@ -81,7 +81,7 @@ $LK,"RawPrint",A="MN:RawPrint"$(I64 mS,U8 *fmt,...) sends direct to screen memor
$LK,"User",A="MN:User"$(U8 *fmt,...) Spawns a user and execute a string on start-up.
$LK,"PopUpPrint",A="MN:PopUpPrint"$(U8 *fmt,...) compiles and execute a string in a pop-up win. Note: It returns the result of the last executed expression.
$LK,"PopUpPrint",A="MN:PopUpPrint"$(U8 *fmt,...) compiles and execute a string in a pop-up win. Note: It returns the res of the last executed expression.
$LK,"PopUpViewPrint",A="MN:PopUpViewPrint"$(U8 *fmt,...) creates a pop-up window and views text.
$BK,1$Note:$BK,0$ Use $FG,2$Print("%s",src)$FG$ if you need an unmodified string.
+1 -1
View File
@@ -42,6 +42,6 @@ $FG,2$$ID,2$$ID,2$U0 Main()
U16 *_w=0xA0000;
*_w|=0x8000;
}
$ID,-2$$FG$The $FG,2$|=$FG$ will be coded as a $FG,2$U32 Bts$FG$ inst resulting in a $FG,2$U32$FG$ access instead of a $FG,2$U16$FG$ access. This affects some hardware operations.
$ID,-2$$FG$The $FG,2$|=$FG$ will be coded as a $FG,2$U32 Bts$FG$ inst resing in a $FG,2$U32$FG$ access instead of a $FG,2$U16$FG$ access. This affects some hardware operations.
$ID,-2$
* Compiler warning or error message line numbers will be off if you have a block of word-wrapped comments. You might press $FG,2$<CTRL-t>$FG$ before doing an editor goto-line-number command.
+1 -1
View File
@@ -2,7 +2,7 @@ $PURPLE$$TX+CX,"Scoping and Linkage"$$FG$
$WW,1$
$LK,"JIT Compile Mode",A="FF:::/Doc/Glossary.TXT,JIT Compile Mode"$ makes use of the current task's hash sym table and its parent tasks' tables. It fetches syms from parent tasks' tables if not found locally in the current task's table and it places new syms in the current task's table. Conceptually, syms are at the scope of environment vars in other operating systems.
When a sym is placed into a table, older syms with identical names will be overshadowed if they exist. Duplicates are not allowed in many cases, especially in asm blks. Dupicates are allowed, by design in other cases, so that you can repeatedly $GREEN$#include$FG$ the same file from the cmd line while developing it. Or, so you can repeatedly declare a function with a standard name, like $GREEN$DrawIt()$FG$. This case might occur when the $GREEN$adam task$FG$ is starting-up loading-in many little utilities.
When a sym is placed into a table, older syms with ident names will be overshadowed if they exist. Duplicates are not allowed in many cases, especially in asm blks. Dupicates are allowed, by design in other cases, so that you can repeatedly $GREEN$#include$FG$ the same file from the cmd line while developing it. Or, so you can repeatedly declare a function with a standard name, like $GREEN$DrawIt()$FG$. This case might occur when the $GREEN$adam task$FG$ is starting-up loading-in many little utilities.
$GREEN$extern$FG$ binds a new $LK,"HTT_FUN",A="MN:HTT_FUN"$ or $LK,"HTT_GLBL_VAR",A="MN:HTT_GLBL_VAR"$ sym to an existing sym of the same name if it exists in the sym table (just in just-in-time code). It also can be used to generate a fwd reference.
+1 -1
View File
@@ -2,6 +2,6 @@ $WW,1$A $LK,"CSprite",A="MN:CSprite"$ is an ordered list of $LK,"these",A="MN:SP
See $LK,"::/Demo/Graphics/SpritePlot.CPP"$, $LK,"::/Demo/Graphics/SpritePlot3D.CPP"$, $LK,"::/Demo/Graphics/SpritePut.CPP"$, $LK,"::/Demo/Graphics/SpriteRaw.CPP"$ and $LK,"SpriteMeshEd",A="MN:SpriteMeshEd"$().
Be aware that copying $FG,2$SP$FG$, $FG,2$IB$FG$, or $FG,2$IS$FG$ entries with the clipboard results in duplicate entries with different nums. You can manually remove dups by editing with $FG,2$<CTRL-t>$FG$ and setting to the original num.
Be aware that copying $FG,2$SP$FG$, $FG,2$IB$FG$, or $FG,2$IS$FG$ entries with the clipboard ress in duplicate entries with different nums. You can manually remove dups by editing with $FG,2$<CTRL-t>$FG$ and setting to the original num.
See $LK,"::/Adam/Gr/GrSpritePlot.CPP",A="FL:::/Adam/Gr/GrSpritePlot.CPP,1"$ for how CSprite are stored.$FG$
+2 -2
View File
@@ -12,12 +12,12 @@ $WW,1$$FG,5$$TX+CX,"Tips"$$FG$
* If you make changes to TempleOS files in your $FG,2$/Home$FG$ directory, generally you reboot to make them take effect. (You don't compile anything.) You should have two TempleOS partitions on your hard drive because a syntax error in a start-up file will make the partition unbootable. Boot to the second partition or boot to a standard TempleOS CD/DVD and use $LK,"Mount",A="MN:Mount"$() to mount your hard drive.
* I copy my files to a mirrored identical partition, periodically with $LK,"CopyTree",A="MN:CopyTree"$() commands in scripts. I do merge commands with a menu entry like this:
* I copy my files to a mirrored ident partition, periodically with $LK,"CopyTree",A="MN:CopyTree"$() commands in scripts. I do merge commands with a menu entry like this:
$FG,2$Merge(\"C:/*\",\"D:/*\",\"+r+d\");$FG$ to check my changes.
* $FG,2$<CTRL-m>$FG$ at the cmd line to access your PersonalMenu. Place macros there with $FG,2$<CTRL-l>$FG$, or icon-like sprites with $FG,2$<CTRL-r>$FG$. Use the $FG,2$Pop-Up$FG$ option on macros to $LK,"Spawn",A="MN:Spawn"$() a task to run a file. It dies when it is finished. This returns mem to the system. Be sure to press $FG,2$<CTRL-s>$FG$ to save your macro/menu area after making changes.
* You can use $FG,2$ans$FG$ in cmd line expressions. It holds the result the last cmd line operation. You can use the cmd prompt as a calculator by just entering expressions like $FG,2$1+2*3;$FG$. $FG,2$F64$FG$ results can be accessed with $FG,2$ansf$FG$.
* You can use $FG,2$ans$FG$ in cmd line expressions. It holds the res the last cmd line operation. You can use the cmd prompt as a calculator by just entering expressions like $FG,2$1+2*3;$FG$. $FG,2$F64$FG$ ress can be accessed with $FG,2$ansf$FG$.
* Use the PullDown menu at the top of the screen to learn commands, or for finding the keyboard controls to games.
+1 -1
View File
@@ -9,7 +9,7 @@ $ID,2$* Professionals doing hobby projects
$ID,-2$
Simplicity is a goal to $LK,"keep the line count down",A="FI:::/Doc/Strategy.TXT"$, so it's easy to tinker with. As it turns-out, simplicity makes it faster in some ways, too. It never switches privilege levels, never changes address maps, tends to load whole contiguous files and other, similar things which boost speed. It's only $TX,"80,590",D="DD_TEMPLEOS_LOC_OFFICIAL"$ lines of code including the kernel, the 64-bit compiler, the graphics library and all the tools. More importantly, it's designed to keep the user's line count down -- you can do a $LK,"Hello World",A="FI:::/Doc/HelloWorld.TXT"$ application in one line of code and can put graphics on the screen with a three line program!
It's a kayak, not a Titanic -- it will crash if you do something wrong. You quickly reboot, however. DOS and the 8-bit home computers of the 80's worked fine without memory protection and most computers in the world -- the embedded ones -- operate without protection. The resulting simplicity of no protections is why TempleOS has value. In facts, that's the point of TempleOS. See the $LK,"TempleOS Charter",A="FI:::/Doc/Charter.TXT"$.
It's a kayak, not a Titanic -- it will crash if you do something wrong. You quickly reboot, however. DOS and the 8-bit home computers of the 80's worked fine without memory protection and most computers in the world -- the embedded ones -- operate without protection. The resing simplicity of no protections is why TempleOS has value. In facts, that's the point of TempleOS. See the $LK,"TempleOS Charter",A="FI:::/Doc/Charter.TXT"$.
Conventional thinking is "failure is not an option" for general purpose operating systems. Since this OS is used in addition to Windows or Linux, however, failure is an option -- just use Windows if you can't do something. I cherry-pick what it will and won't do to make it maximally beautiful.
+1 -1
View File
@@ -28,7 +28,7 @@ $FG,5$Tree$FG$ The item will behave like a tree widget, with this as the root.
$FG,5$Collapsed$FG$ The tree or hidden widget will begin collapsed.
$FG,5$Define Str$FG$ will substitute a $FG,2$#define$FG$ or $LK,"DefineLoad",A="MN:DefineLoad"$() string for the tag.
$FG,5$Quote$FG$ Make the result suitable for including in a program, in quotes, especially $FG,2$fmtstr$FG$ entries in class definitions.
$FG,5$Quote$FG$ Make the res suitable for including in a program, in quotes, especially $FG,2$fmtstr$FG$ entries in class definitions.
$FG,5$X Expression$FG$ For cursor movements, the horizontal value.
$FG,5$Y Expression$FG$ For cursor movements, the vertical value.