TempleOSCD_140715.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:46:09 +02:00
1 parent 7ef616a20e
commit 64f679eeb9
1095 files changed
+24814 -221011

No files matched your search

+8 -5
View File
@@ -1,9 +1,8 @@
$WW,1$$FG,5$$TX+CX,"Acknowledgements"$$FG$
1) The font, $LK,"::/Kernel/Font8x8.CPP"$, is taken from $FG,4$$TX,"FreeDOS",HTML="http://www.freedos.org"$$FG$.
1) The font, $LK,"::/Kernel/Font8x8.CPP"$, is taken from $FG,4$$TX,"FreeDOS",HTML="http://www.freedos.org"$$FG$. It's public domain.
2) $LK,"::/Kernel/Dsk/ATADef.HPP"$ originally
from Linux. I later got the spec.
2) $LK,"ATA Reg and Cmd Definitions",A="MN:ATA_NOP"$ are originally from Linux. Later, I got the spec.
3) The heap algorithm, $LK,"::/Kernel/Mem1b.CPP"$, is adapted from one I saw at Ticketmaster when I worked on their VAX operating system.
@@ -13,7 +12,7 @@ from Linux. I later got the spec.
6) The random number generator is from the book, $UL,1$Numeric Recipies in C$UL,0$.
7) Tne sheep and goats in AfterEgypt are from $FG,4$$TX,"http://www.public-domain-photos.com",HTML="http://www.public-domain-photos.com"$$FG$.
7) The mountain, palm trees, sheep and goats in AfterEgypt are from $FG,4$$TX,"http://www.public-domain-photos.com",HTML="http://www.public-domain-photos.com"$$FG$.
8) The $FG,2$FAT32$FG$ file system is owned by MicroSoft.
@@ -37,7 +36,11 @@ from Linux. I later got the spec.
18) I got $FG,4$$TX,"Webster's Dictionary",HTML="http://www.templeos.org/files/DICTIONARY.TXT"$$FG$ and $FG,4$$TX,"The King James Bible",HTML="http://www.templeos.org/files/BIBLE.TXT"$$FG$ from $FG,4$$TX,"Project Gutenberg",HTML="http://promo.net/pg/"$$FG$.
In short, I wrote every one of the $TX,"120,838",D="DD_TEMPLEOS_LOC"$ lines myself, no $FG,2$GPL$FG$ code, no linkage or dependence on other code. Anyone who says otherwise is being an ass.
19) John Carmack inspired me to use "$LK,"Clamp",A="MN:Clamp"$" as a name instead of "Limit". He inspired me to use "needle" and "haystack" as names. He inspired me to simplify my Frames-Per-Second code.
20) Bill Gates inspired me to add comments to my $LK,"Help & Index",A="FI:::/Doc/HelpIndex.TXT"$.
In short, I wrote every one of the $TX,"121,463",D="DD_TEMPLEOS_LOC"$ lines myself, no $FG,2$GPL$FG$ code, no linkage or dependence on other code. Anyone who says otherwise is being an ass.
$FG,8$
* "MSDOS", "Windows", "MovieMaker" "MS Paint" and "FAT32" are trademarks of MicroSoft Corp.
* "SiteBuilder" is a trademark of Yahoo! Inc.
BIN
View File
Binary file not shown.
+243 -319
View File
@@ -1,16 +1,241 @@
$WW,1$$FG,2$Use $LK,"R",A="MN:R"$() to rename if I change a label.$FG$
$WW,1$$FG,5$$TX+CX,"Change Log"$$FG$
Use $LK,"R",A="MN:R"$() to rename if I change a label.
$IV,1$----07/16/14 00:59:22----$IV,0$
$IV,1$----07/12/14 02:06:10----$IV,0$
* Fixed bug clicking on icon.
$IV,1$----07/08/14 04:33:20----$IV,0$
* I changed $LK,"GodDoodleSprite",A="MN:GodDoodleSprite"$().
$IV,1$----06/30/14 02:32:47----$IV,0$
* Changed max FPS to 30 instead of 60.
* Got rid of min and max FPS control.
* $LK,"R",A="MN:R"$("refresh","FPS");
$IV,1$----06/20/14 12:02:44----$IV,0$
* $BK,1$TempleOS version 2.11 Released$BK,0$
$IV,1$----06/16/14 13:09:10----$IV,0$
* Added $LK,"DOCT_LST",A="MN:DOCT_LST"$, list widgets. See $LK,"::/Demo/DolDoc/Form.CPP.Z"$.
$IV,1$----06/13/14 21:27:17----$IV,0$
* $LK,"R",A="MN:R"$("BootDrv","BootRescueDrv");
* Fixed bug in "Boot Rescue Drive" feature.
$IV,1$----06/10/14 03:11:14----$IV,0$
* $BK,1$TempleOS version 2.10 Released$BK,0$
* Got rid of $FG,4$ImportHashTable$FG$().
* Got rid of $FG,4$OldSchool$FG$ demos.
* $FG,2$AOT$FG$ compilation has been removed. Use $FG,2$JIT$FG$.
$IV,1$----06/02/14 13:52:50----$IV,0$
* Improved HelpIndex.
* Improved $LK,"::/Apps/TimeOut/TimeOut.CPP.Z"$.
$IV,1$----05/26/14 16:13:11----$IV,0$
* $BK,1$TempleOS version 2.09 Released$BK,0$
* Added BLINK to $LK,"ToHtml",A="MN:ToHtml"$().
* $LK,"R",A="MN:R"$("DocHome","DocTop");
$IV,1$----05/24/14 20:46:11----$IV,0$
* Got rid of $FG,4$Day$FG$(), $FG,4$Month$FG$(), $FG,4$Year$FG$(), etc.
* $LK,"R",A="MN:R"$("WSDDisplayDefs","WSDDefsPut");
* $LK,"R",A="MN:R"$("WSDGetDef","WSDDefGet");
* $LK,"R",A="MN:R"$("WSDGetWord","WSDDefsGet");
* $LK,"R",A="MN:R"$("WSDPtAtWord","WSWordPtAt");
* $LK,"R",A="MN:R"$("WSGetHits","WSHitsGet");
$IV,1$----05/23/14 04:50:25----$IV,0$
* $LK,"R",A="MN:R"$("SqrDist","DistSqr");
* $LK,"R",A="MN:R"$("SqrNorm","NormSqr");
$IV,1$----05/16/14 15:43:17----$IV,0$
* Added $LK,"DOF_DONT_WINMGR_SYNC",A="MN:DOF_DONT_WINMGR_SYNC"$.
* Fetches comments for help index reports.
* Made src line links more accurate.
$IV,1$----05/15/14 06:45:33----$IV,0$
* Added INVERT to $LK,"ToHtml",A="MN:ToHtml"$().
$IV,1$----05/13/14 07:05:00----$IV,0$
* $BK,1$TempleOS version 2.08 Released$BK,0$
$IV,1$----05/11/14 08:22:44----$IV,0$
* Added $LK,"Zip",A="MN:Zip"$() and $LK,"Unzip",A="MN:Unzip"$().
$IV,1$----05/09/14 09:30:39----$IV,0$
* Added $LK,"PopUpEd",A="MN:PopUpEd"$().
* $LK,"R",A="MN:R"$("PopUpViewStr","PopUpViewPrint");
$IV,1$----05/07/14 19:12:42----$IV,0$
* Added classes to help index.
* $LK,"CGrGlbls",A="MN:CGrGlbls"$ gr;
* $LK,"CDolDocGlbls",A="MN:CDolDocGlbls"$ doldoc;
* $LK,"CCmpGlbls",A="MN:CCmpGlbls"$ cmp;
* $LK,"CUasmGlbls",A="MN:CUasmGlbls"$ uasm;
* $LK,"CTextGlbls",A="MN:CTextGlbls"$ text;
$IV,1$----05/05/14 23:37:52----$IV,0$
* $LK,"CGodGlbls",A="MN:CGodGlbls"$ god;
* $LK,"CMusicGlbls",A="MN:CMusicGlbls"$ music;
* $LK,"CWordStatGlbls",A="MN:CWordStatGlbls"$ ws;
* $LK,"CWordStatDictGlbls",A="MN:CWordStatDictGlbls"$ wsd;
$IV,1$----05/05/14 19:54:46----$IV,0$
* $LK,"CWallPaperGlbls",A="MN:CWallPaperGlbls"$ *wall;
* $LK,"CWinMgrTimingGlbls",A="MN:CWinMgrTimingGlbls"$ *winmgr.t;
* $LK,"CWinMgrGlbls",A="MN:CWinMgrGlbls"$ winmgr;
* $LK,"CSndGlbls",A="MN:CSndGlbls"$ snd;
* $LK,"CDevGlbls",A="MN:CDevGlbls"$ dev;
* $LK,"CDskGlbls",A="MN:CDskGlbls"$ dsk;
* $LK,"CDbgGlbls",A="MN:CDbgGlbls"$ dbg;
* $LK,"CCntsGlbls",A="MN:CCntsGlbls"$ cnts;
* $LK,"CKeyDevGlbls",A="MN:CKeyDevGlbls"$ keydev;
* $LK,"CIPStateGlbls",A="MN:CIPStateGlbls"$ ip;
* $LK,"CMouseStateGlbls",A="MN:CMouseStateGlbls"$ mouse;
* $LK,"CKbdStateGlbls",A="MN:CKbdStateGlbls"$ kbd;
$IV,1$----05/05/14 09:14:51----$IV,0$
* Added $MA-X+PU,"::/Apps/Budget",LM="Cd(\"::/Apps/Budget\");Dir;View;\n"$.
$IV,1$----05/03/14 23:31:50----$IV,0$
* Added $LK,"DOCEF_USER_DATA",A="MN:DOCEF_USER_DATA"$ $FG,2$arg=$FG$ flag.
* $LK,"R",A="MN:R"$("Backward","Bwd");
* Added $LK,"::/Apps/Budget/Budget.CPP"$.
$IV,1$----04/30/14 23:41:42----$IV,0$
* Added $LK,"CBinFile",A="MN:CBinFile"$.signature.
$IV,1$----04/29/14 15:43:22----$IV,0$
* $BK,1$TempleOS version 2.07 Released$BK,0$
$IV,1$----04/27/14 05:19:18----$IV,0$
* Improved documentation.
* Changed $LK,"CBinFile",A="MN:CBinFile"$ format.
* Locked-in 640x480 with $LK,"GrUpdateLine64",A="MN:GrUpdateLine64"$().
$IV,1$----04/23/14 22:14:43----$IV,0$
* Added $LK,"::/Demo/Lectures/NegDisp.CPP"$.
* $LK,"R",A="MN:R"$("GrLineRect4","GrBorder");
* Changed $LK,"::/Adam/Gr/GrTextBase.CPP"$.
* Fixed terminal button on wallpaper. Yikes!
$IV,1$----04/21/14 16:29:00----$IV,0$
* Got rid of $FG,4$Spaces$FG$() and $FG,4$NewLine$FG$(). Replaced $FG,4$NewLine$FG$(5) with "%h*c",5,'\n';
* Improved profiler.
* Changed $FG,4$CCPU.chained_timer_irq$FG$ to $LK,"CCPU",A="MN:CCPU"$.profiler_timer_irq.
$IV,1$----04/19/14 18:05:09----$IV,0$
* Got rid of double spacing.
* Fixed bug in page down.
* Sorted headers and externs.
$IV,1$----04/18/14 21:45:17----$IV,0$
* Improved documentation.
$IV,1$----04/16/14 15:49:13----$IV,0$
* $BK,1$TempleOS version 2.06 Released$BK,0$
$IV,1$----04/15/14 12:29:02----$IV,0$
* Got rid of lock-to-page and lock-to-center document features.
* Changed $FG,2$$$DA...$$$FG$ data type to use an arg. $FG,2$$$DA,-U64+U16,...$$$FG$ is now changed to $FG,2$$$DA,RT=I16,...$$$FG$.
* $LK,"R",A="MN:R"$("DOCEF1_","DOCEF_");
* Changed Fs->$LK,"win_inhibits",A="MN:WIF_SELF_FOCUS"$.
$IV,1$----04/13/14 16:20:11----$IV,0$
* Added $LK,"LK_DOC",A="MN:LK_DOC"$, $LK,"LK_DOC_ANCHOR",A="MN:LK_DOC_ANCHOR"$, $LK,"LK_DOC_LINE",A="MN:LK_DOC_LINE"$ and $LK,"LK_DOC_FIND",A="MN:LK_DOC_FIND"$.
* $LK,"R",A="MN:R"$("Doc","DolDoc");
* Improved documentation.
* Added $LK,"::/Demo/LastClass.CPP"$.
$IV,1$----04/13/14 00:09:48----$IV,0$
* Got rid of $FG,4$ProfBin()$FG$ and $FG,4$ProfCPU()$FG$.
* $LK,"R",A="MN:R"$("ProfAll","Prof");
* Improved documentation.
* Changed $LK,"CDoc",A="MN:CDoc"$.desc.
$IV,1$----04/11/14 16:58:56----$IV,0$
* Renamed Sprite functions and vars.
* Added $LK,"LexExpressionI64",A="MN:LexExpressionI64"$() and $LK,"LexExpressionF64",A="MN:LexExpressionF64"$(). I'm chagrinned.
$IV,1$----04/11/14 11:55:36----$IV,0$
* Added $LK,"FileNameTempTxt",A="MN:FileNameTempTxt"$().
* $FG,2$<CTRL-r>$FG$ sprite edit-as-text is now much better.
* Added $LK,"Str2ColorU16",A="MN:Str2ColorU16"$(), $LK,"Str2ColorU32",A="MN:Str2ColorU32"$(), $LK,"LexFirstRem",A="MN:LexFirstRem"$(), $LK,"Sprite2Code",A="MN:Sprite2Code"$() and $LK,"Code2Sprite",A="MN:Code2Sprite"$().
* $LK,"R",A="MN:R"$("Color2Text","Color2Str");
* $LK,"R",A="MN:R"$("Sprite2Text","SpriteElem2OneLineSummary");
* $LK,"R",A="MN:R"$("DocPrintWhole","DocPrintAtomic");
* Fixed bug in $LK,"GrRect",A="MN:GrRect"$() relating to dithering.
* Got rid of $LK,"CDoc",A="MN:CDoc"$.recalc_start.
$IV,1$----04/09/14 14:10:17----$IV,0$
* Fixed compiler bug by adding a pass to overcome an optimization problem.
* Improved $LK,"::/Apps/AfterEgypt/GodTalking.CPP"$.
* Improved $LK,"::/Demo/Graphics/Mountain.CPP"$.
* Improved $LK,"::/Demo/Graphics/Camp.CPP"$.
* Improved $LK,"::/Demo/Graphics/SunMoon.CPP"$.
* Improved $LK,"::/Demo/Games/DunGen.CPP"$.
* Improved $LK,"::/Demo/Games/FlatTops.CPP"$.
$IV,1$----04/07/14 07:46:56----$IV,0$
* $BK,1$TempleOS version 2.05 Released$BK,0$
$IV,1$----04/05/14 03:09:18----$IV,0$
* Got rid of $FG,2$Fs->answers_displayed$FG$ and set it to a fixed value of one answer.
* Improved documentation.
* $LK,"R",A="MN:R"$("MusicOrgan","Psalmody");
* Improved $LK,"AFGetChar",A="MN:AFGetChar"$() and $LK,"AFUntilChar",A="MN:AFUntilChar"$().
$IV,1$----04/03/14 05:57:06----$IV,0$
* Improved $MA-X+PU,"Tour",LM="SpawnUser(\"Cd(\\\"::/Misc/Tour\\\");;AutoFile(\\\"Tour\\\");\n\");"$.
* $LK,"R",A="MN:R"$("ipx","ip.pos.x");
* $LK,"R",A="MN:R"$("mxx","mouse.pos.x");
* $LK,"R",A="MN:R"$("mxx_prescale","mouse.prescale.x");
* $LK,"R",A="MN:R"$("A2Date","Str2Date");
* $LK,"R",A="MN:R"$("A2I64","Str2I64");
* $LK,"R",A="MN:R"$("A2F64","Str2F64");
* $LK,"R",A="MN:R"$("SPrint","StrPrint");
* $LK,"R",A="MN:R"$("MPrint","MStrPrint");
* $LK,"R",A="MN:R"$("Scan","StrScan");
$IV,1$----04/01/14 08:49:57----$IV,0$
* Added $LK,"::/Demo/Games/ElephantWalk.CPP"$.
$IV,1$----03/28/14 22:25:48----$IV,0$
* $LK,"R",A="MN:R"$("COLOR_TRANSPARENT","TRANSPARENT");
$IV,1$----03/26/14 08:40:25----$IV,0$
* $LK,"R",A="MN:R"$("_ATTR_DIR","RS_ATTR_DIR");
$IV,1$----03/24/14 15:17:14----$IV,0$
* Coined "DolDoc" as a name for the TempleOS document type.
* Added $LK,"::/Demo/DolDoc/ClickCallBack.CPP"$.
$IV,1$----03/21/14 04:02:29----$IV,0$
* $BK,1$TempleOS version 2.04 Released$BK,0$
$IV,1$----03/19/14 21:54:23----$IV,0$
* $LK,"R",A="MN:R"$("BulgeBomber","BomberGolf");
* Added $LK,"::/Demo/Dsk/SerializeTree.CPP"$.
* $LK,"R",A="MN:R"$("DirLstDel","DirTreeDel");
* Added $LK,"::/Misc/Tour/Tour7.AUT"$ which covers File Masks.
* $LK,"R",A="MN:R"$("MGetS","GetStr");
* $LK,"R",A="MN:R"$("PmtStr","GetStr");
$IV,1$----03/17/14 22:34:11----$IV,0$
* Changed $FG,2$$$MA$FG$ to use "tag$FG$" instead of "$FG,2$A=$FG$".
* Changed $LK,"DOCEF1_HAS_TERMINATOR",A="MN:DOCEF1_HAS_TERMINATOR"$ -T to -TRM.
* Changed $LK,"Dollar",A="FI:::/Doc/Dollar.TXT.Z"$ format. Some flags are not at start.
* Changed $LK,"DOCEF_HAS_TERMINATOR",A="MN:DOCEF_HAS_TERMINATOR"$ -T to -TRM.
* Changed $LK,"DolDoc",A="FI:::/Doc/DolDocOverview.TXT"$ format. Some flags are not at start.
$IV,1$----03/07/14 04:54:10----$IV,0$
* Added $LK,"::/Demo/ReverseFileExample/Reverse.CPP.Z"$.
* Added $LK,"::/Demo/ReverseFileExample/Reverse.CPP"$.
$IV,1$----03/03/14 00:18:47----$IV,0$
* $BK,1$TempleOS version 2.03 Released$BK,0$
* $LK,"R",A="MN:R"$("A2I","A2I64");
* $LK,"R",A="MN:R"$("A2I","Str2I64");
* Removed "Binary Type" from $LK,"CDocBin",A="MN:CDocBin"$. Old sprites no longer work.
$IV,1$----02/25/14 16:09:01----$IV,0$
@@ -38,16 +263,16 @@ $IV,1$----02/17/14 20:50:58----$IV,0$
* $LK,"R",A="MN:R"$("DoItOnce","DoOnce");
$IV,1$----02/12/14 14:25:59----$IV,0$
* Added BMP/GRA file save to $FG,2$CTRL-R$FG$.
* Added $FG,2$CTRL-ALT-S$FG$ for screen shot to clipboard.
* Reformed $LK,"CGrid",A="MN:CGrid"$ to be simple.
* Added BMP/GRA file save to $FG,2$<CTRL-r>$FG$.
* Added $FG,2$<CTRL-ALT-s>$FG$ for screen shot to clipboard.
* Reformed $LK,"CGridGlbls",A="MN:CGridGlbls"$ to be simple.
$IV,1$----02/10/14 09:19:59----$IV,0$
* Added $LK,"HashPublic",A="MN:HashPublic"$().
* Changed FUF_WHOLE_LABELS $FG,2$+lf$FG$/$FG,2$+lb$FG$ to $FG,2$+lb$FG$/$FG,2$+la$FG$.
* Got rid of $FG,4$FilesOrder()$FG$, replacing it with $LK,"FUF_CLUSTER_ORDER",A="MN:FUF_CLUSTER_ORDER"$.
* Added $LK,"::/Demo/Graphics/InputPointer.CPP.Z"$.
* Made $LK,"gr_dc",A="MN:gr_dc"$ the default device context for graphics routines.
* Added $LK,"::/Demo/Graphics/InputPointer.CPP"$.
* Made $LK,"gr.dc",A="MN:CGrGlbls"$ the default device context for graphics routines.
$IV,1$----01/28/14 01:44:46----$IV,0$
* In a function with an ASM{} blk, you can now JMP to a function goto label.
@@ -58,15 +283,15 @@ $IV,1$----01/27/14 09:02:20----$IV,0$
$IV,1$----01/26/14 03:27:55----$IV,0$
* Moved $FG,4$fun_class$FG$ to $LK,"CLex",A="MN:CLex"$.htc.fun.
* Got rid of K=1024 sub_fmt flag in $LK,"SPrintJoin",A="MN:SPrintJoin"$.
* Got rid of K=1024 sub_fmt flag in $LK,"StrPrintJoin",A="MN:StrPrintJoin"$.
* Changed MapFile code_heap line addresses to 32-bit.
* Got rid of $LK,"CTask",A="MN:CTask"$.user_data1-3.
* Got rid of $FG,4$ExpressionBinDel$FG$().
* Got rid of $LK,"CIntermediateCode",A="MN:CIntermediateCode"$.ic_ext_body.
* Cleaned-up $LK,"::/Compiler/ExpParser.CPP.Z"$.
* Cleaned-up $LK,"::/Compiler/ExpParser.CPP"$.
$IV,1$----01/24/14 06:40:47----$IV,0$
* $LK,"R",A="MN:R"$("DocInsSafe","DocPrintWhole");
* $LK,"R",A="MN:R"$("DocInsSafe","DocPrintAtomic");
* $LK,"R",A="MN:R"$("DocPutSPartial","DocPrintPartial");
* Made private WordStat links WHITE.
* Added "+s" to $LK,"FilesFind",A="MN:FilesFind"$().
@@ -76,16 +301,16 @@ $IV,1$----01/24/14 06:40:47----$IV,0$
* $LK,"R",A="MN:R"$("TreeSize","Size");
* $LK,"R",A="MN:R"$("FileSize","Size");
* $LK,"R",A="MN:R"$("MergeChk","Merge");
* Added $LK,"::/Demo/Graphics/Balloon.CPP.Z"$.
* Added $LK,"::/Demo/Graphics/Balloon.CPP"$.
* Added warning for 64-bit reg vars.
$IV,1$----01/13/14 14:39:34----$IV,0$
* Optimized $FG,2$if (Carry)$FG$. See $LK,"::/Demo/Carry.CPP.Z"$.
* Optimized $FG,2$if (Carry)$FG$. See $LK,"::/Demo/Carry.CPP"$.
$IV,1$----01/11/14 21:52:00----$IV,0$
* Added $LK,"BibleLine2Verse",A="MN:BibleLine2Verse"$().
* Shifted glbl vars from $LK,"::/Kernel/KStart.CPP.Z"$ to $LK,"CSysFixedArea",A="MN:CSysFixedArea"$.
* Added $LK,"OneTimePopUp",A="MN:OneTimePopUp"$() msg to $LK,"::/Apps/X-Caliber/X-Caliber.CPP.Z"$. Delete registry and reboot if you are upgrading.
* Shifted glbl vars from $LK,"::/Kernel/KStart.CPP"$ to $LK,"CSysFixedArea",A="MN:CSysFixedArea"$.
* Added $LK,"OneTimePopUp",A="MN:OneTimePopUp"$() msg to $LK,"::/Apps/X-Caliber/X-Caliber.CPP"$. Delete registry and reboot if you are upgrading.
$IV,1$----01/09/14 20:51:20----$IV,0$
* Converted $FG,2$fp_plot()$FG$ graphics routines to Bool with abort.
@@ -100,7 +325,7 @@ $IV,1$----01/07/14 11:46:38----$IV,0$
$IV,1$----01/06/14 19:22:53----$IV,0$
* Added $LK,"::/Demo/Asm/AsmAndC3.CPP"$.
* Added $LK,"::/Demo/OldSchool/SingleFileAOT/Single.CPP"$.
* Added $FG,4$::/Demo/OldSchool/SingleFileAOT/Single.CPP$FG$
* Made compiler compile ASM instructions mixed-in with HolyC.
* Improved $LK,"::/Demo/Graphics/Camp.CPP"$.
@@ -109,304 +334,3 @@ $IV,1$----01/03/14 03:39:30----$IV,0$
$IV,1$----01/01/14 13:16:59----$IV,0$
* Got rid of XSUM in $LK,"CBinFile",A="MN:CBinFile"$ header.
$IV,1$----12/30/13 22:13:59----$IV,0$
* Added $LK,"::/Apps/MusicOrgan/Examples/killed.CPP"$.
* Fixed bug in $LK,"U",A="MN:U"$()nassemble.
* Fixed compiler bug with multipling by 1.0.
* Improved $LK,"::/Apps/AfterEgypt/GodTalking.CPP"$.
* Improved $LK,"::/Demo/Graphics/Mountain.CPP"$.
$IV,1$----12/28/13 16:05:41----$IV,0$
* $BK,1$TempleOS version 1.11 Released$BK,0$
* Added $LK,"ip_throttle_step",A="MN:ip_throttle_step"$.
* Improved $LK,"::/Demo/Games/BattleLines.CPP"$.
* Improved $LK,"::/Demo/Games/BlackDiamond.CPP"$.
* I changed the $FG,2$.GRA$FG$ file format.
* $LK,"R",A="MN:R"$("Pixel","Pix");
* $LK,"R",A="MN:R"$("win_scroll","scroll");
* Added $LK,"::/Demo/SortFileExample/F64FileGen.CPP"$ and $LK,"::/Demo/SortFileExample/F64FileSort.CPP"$.
* Added $FG,2$U8 *filename$FG$ as arg to $LK,"DocNew",A="MN:DocNew"$().
* $LK,"R",A="MN:R"$("SpritePlot","Sprite");
* $LK,"R",A="MN:R"$("SpritePlotRot","Sprite");
* Got rid of $FG,4$tT$FG$() and $FG,4$tJ$FG$(), use $LK,"tS",A="MN:tS"$().
$IV,1$----12/27/13 14:09:04----$IV,0$
* $LK,"R",A="MN:R"$("PutSprite","Sprite");
* Got rid of $FG,4$TASKf_CURRENTLY_RUNNING$FG$.
* Improved $LK,"::/Demo/Games/Varoom.CPP"$.
$IV,1$----12/16/13 00:54:35----$IV,0$
* Got rid of $FG,4$TaskInitExt$FG$().
$IV,1$----12/14/13 11:25:39----$IV,0$
* $LK,"R",A="MN:R"$("sys_num_task_inits","sys_num_spawned_tasks");
* Got rid of $FG,4$Fs->user_num$FG$.
* Got rid of $FG,4$IntEOI$FG$().
* Got rid of $FG,4$DISPLAYf_HAS_CLOSE_WIN$FG$.
$IV,1$----12/12/13 05:33:07----$IV,0$
* It is now mandatory, not optional, that NULL dereference causes a page fault.
$IV,1$----12/09/13 23:46:38----$IV,0$
* Added $FG,2$Acct Drv$FG$ prompt to $LK,"MakeOSPrtBootInstall",A="MN:MakeOSPrtBootInstall"$().
* Added $FG,2$BINFILE$FG$ directive.
* $LK,"R",A="MN:R"$("UseTermDoc","DocTermNew");
* $LK,"R",A="MN:R"$("IsInDbg","IsDbg");
* Got rid of $FG,4$IDE$FG$(). It was worthless.
$IV,1$----12/08/13 17:52:33----$IV,0$
* $LK,"R",A="MN:R"$("AOTAdam.HPP","AOT.HPP");
* Got rid of $FG,4$Deterministic$FG$ option.
* Got rid of $FG,4$OPTf_REPLACE_SYMS$FG$.
* $LK,"R",A="MN:R"$("ExePutS3","ExePutS2");
$IV,1$----12/07/13 05:18:12----$IV,0$
* Added $LK,"::/Demo/Graphics/Moon.CPP"$.
* $LK,"R",A="MN:R"$("dither_probability","dither_probability_u16");
* $LK,"R",A="MN:R"$("plane_size","body_size");
* Got rid of $FG,4$DCT_COLOR8$FG$. $LK,"DCNew",A="MN:DCNew"$() has fewer args.
$IV,1$----12/03/13 03:10:20----$IV,0$
* Modified the $LK,"::/Doc/Charter.TXT"$.
* Modified $LK,"CBootStruct",A="MN:CBootStruct"$. Old RedSea partitions are invalid.
* $LK,"R",A="MN:R"$("deref_bitmap","ic_bitmap_deref");
* $LK,"R",A="MN:R"$("alpha_numeric_bitmap","chars_bitmap_alpha_numeric");
* Added $LK,"::/Doc/RedSea.TXT"$.
* Cleaned-up $LK,"::/Adam/Utils/HeapLog.CPP"$.
* "%p" is PSECT, "%P" is link to PSECT.
* $LK,"R",A="MN:R"$("p1","a1"); In /Compiler
* Added compiler optimization relating to bit shifts.
* $LK,"R",A="MN:R"$("doc_tag_types","doc_type_flags_tag");
$IV,1$----11/29/13 04:41:50----$IV,0$
* $BK,1$TempleOS version 1.10 Released$BK,0$
* Got rid of old $FG,4$PutExcept()$FG$ and $FG,4$ExceptDepth()$FG$.
* $LK,"R",A="MN:R"$("CatchAll","PutExcept");
* Changed $LK,"throw",A="MN:throw"$() to a single char string arg.
$IV,1$----11/28/13 04:15:03----$IV,0$
* Added $LK,"::/Demo/AcctExample/TAD/Archive/Comm.CPP"$.
$IV,1$----11/20/13 08:56:52----$IV,0$
* Got rid of $FG,4$WinInhibit$FG$().
* Added $LK,"GodInit",A="FF:::/Adam/God/HolySpirit.CPP,GodInit"$(), $LK,"GodWord",A="FF:::/Adam/God/HolySpirit.CPP,GodWord"$() and $LK,"GodPassage",A="FF:::/Adam/God/HolySpirit.CPP,GodPassage"$().
* $LK,"R",A="MN:R"$("WIF_ALL","WIG_TASK_DFT-WIF_FOCUS");
* Changed $FG,4$TASKf_USER$FG$ to $LK,"WIf_FOCUS",A="MN:WIf_FOCUS"$.
* Changed $FG,2$WordStat$FG$.
* Got rid of $LK,"CHashDefineStr",A="MN:CHashDefineStr"$.caller.
$IV,1$----11/18/13 12:58:17----$IV,0$
* Got rid of $FG,4$StrAdd$FG$().
* Optimized $LK,"::/Adam/Doc/DocPlain.CPP"$.
$IV,1$----11/16/13 17:16:28----$IV,0$
* Cleaned-up $LK,"SPrintJoin",A="MN:SPrintJoin"$(). Added %/Q and %/q.
* Fixed $LK,"AdamLog",A="MN:AdamLog"$(), etc.
* Cleaned-up $LK,"CDocSettings",A="MN:CDocSettings"$.
$IV,1$----11/14/13 07:21:17----$IV,0$
* $BK,1$TempleOS version 1.09 Released$BK,0$
* $LK,"R",A="MN:R"$("DefineSubCnt","DefineCnt");
* Got rid of $FG,4$DOCEF1_ALIAS$FG$.
* Cleaned-up $LK,"DocRecalc",A="MN:DocRecalc"$().
$IV,1$----11/12/13 17:14:46----$IV,0$
* Cleaned-up $LK,"LexGetChar",A="MN:LexGetChar"$().
$IV,1$----11/10/13 10:18:41----$IV,0$
* Added $LK,"::/Apps/AfterEgypt/Horeb2MP.CPP"$.
* Added $LK,"::/Doc/Demands.TXT"$.
$IV,1$----11/08/13 22:01:52----$IV,0$
* Tweeked disk code.
* Added $LK,"HPET_initial",A="MN:HPET_initial"$.
* Compiler uses smaller $FG,2$switch()$FG$ jmp tables.
$IV,1$----11/06/13 11:01:04----$IV,0$
* Improved $LK,"ATAPIWritePktWord",A="MN:ATAPIWritePktWord"$().
* Got rid of $FG,4$RawI64$FG$(), $FG,4$RawF64$FG$(), $FG,4$RawStr$FG$(), $FG,4$RawAdd$FG$().
* Got rid of $FG,2$$$HI,""$$$FG$ and $FG,2$$$HV,""$$$FG$.
* Compiler optimization on $LK,"Bt",A="MN:Bt"$().
$IV,1$----11/05/13 01:51:23----$IV,0$
* Set RedSea FileSystem sectors-per-cluster to one.
* $LK,"R",A="MN:R"$("GrScaleMatEqu","GrScaleEqu");
* $LK,"R",A="MN:R"$("GrScaleMat","GrScaleNew");
$IV,1$----11/02/13 18:34:53----$IV,0$
* $BK,1$TempleOS version 1.08 Released$BK,0$
* $LK,"R",A="MN:R"$("GrRotX","GrRotXNew");
$IV,1$----11/01/13 19:32:27----$IV,0$
* Added HolyC feature: $LK,"::/Demo/SubSwitch.CPP"$.
* Added $LK,"ZipRep",A="MN:ZipRep"$() to spot files with redundancy.
* Cleaned-up $LK,"DocInit",A="MN:DocInit"$().
$IV,1$----10/30/13 09:23:45----$IV,0$
* Added $LK,"HashLstAdd",A="MN:HashLstAdd"$() and $LK,"HashDefineLstAdd",A="MN:HashDefineLstAdd"$().
* Added $LK,"DOCf_COLOR_NAMES",A="MN:DOCf_COLOR_NAMES"$.
* Cleaned-up $LK,"::/Adam/Utils/Diff.CPP"$.
$IV,1$----10/24/13 16:36:04----$IV,0$
* Compiler optimization: Replaced $FG,2$ENTER$FG$ and $FG,2$LEAVE$FG$ with $FG,2$PUSH RBP$FG$;$FG,2$MOVE RBP,RSP$FG$;$FG,2$POP RBP$FG$.
* Broke-up large files.
$IV,1$----10/24/13 03:48:22----$IV,0$
* Added $LK,"HashTablePurge",A="MN:HashTablePurge"$().
* Added $LK,"HTF_RESOLVE",A="MN:HTF_RESOLVE"$.
* $LK,"R",A="MN:R"$("MakeOSInstallPrtBootLoader","MakeOSPrtBootInstall");
* $LK,"R",A="MN:R"$("InstallMasterBootLoader","MasterBootInstall");
$IV,1$----10/22/13 20:58:42----$IV,0$
* Changed $LK,"SET_GS_BASE",A="MN:SET_GS_BASE"$ and $LK,"CPUStructInit",A="MN:CPUStructInit"$().
$IV,1$----10/21/13 09:44:21----$IV,0$
* Added $LK,"::/Demo/DateTime.CPP"$.
$IV,1$----10/19/13 12:45:33----$IV,0$
* Got rid of $FG,4$DCT_COLOR8$FG$ check and fixed $LK,"GrRect",A="MN:GrRect"$().
$IV,1$----10/18/13 06:56:31----$IV,0$
* $BK,1$TempleOS version 1.07 Released$BK,0$
* Changed $FG,2$%D %T$FG$ -- got rid of subcodes.
* Got rid of $FG,4$LTrace$FG$() and $FG,4$PTrace$FG$().
* $LK,"R",A="MN:R"$("GetDateTime","Now");
* $LK,"R",A="MN:R"$("Date2DateStruct","Date2Struct");
$IV,1$----10/14/13 02:59:18----$IV,0$
* Fixed compiler bug -- floats in triple compare.
$IV,1$----10/13/13 23:33:51----$IV,0$
* Improved Compiler.
$IV,1$----10/10/13 00:12:20----$IV,0$
* $LK,"R",A="MN:R"$("PutChar","PutChars");
* Changed $LK,"DocEntryRun",A="MN:DocEntryRun"$().
$IV,1$----10/05/13 08:16:36----$IV,0$
* $LK,"R",A="MN:R"$("tMBeat","Beat");
* Moved directories under $FG,2$/TempleOS$FG$ directory up to root directory.
$IV,1$----10/03/13 20:25:16----$IV,0$
* Improved $LK,"Ed",A="MN:Ed"$() code.
* Added $LK,"::/Apps/MusicOrgan/JukePuppet.CPP"$.
$IV,1$----09/29/13 15:42:18----$IV,0$
* Added $LK,"BibleLines",A="MN:BibleLines"$().
$IV,1$----09/27/13 23:55:48----$IV,0$
* $BK,1$TempleOS version 1.06 Released$BK,0$
* Renumbered sprite commands -- old sprites are invalid until converted. $FG,4$::/Misc/SpriteCvt0106.CPP$FG$.
$IV,1$----09/27/13 07:03:37----$IV,0$
* Added $FG,2$haserrcode$FG$ keyword to compiler to help make interrupt handlers. See $LK,"::/Demo/Lectures/PageTableEntries2.CPP"$.
* Improved compiler's $LK,"PrsClass",A="MN:PrsClass"$().
$IV,1$----09/25/13 20:59:12----$IV,0$
* Made compiler N passes.
* Compiler change: Made compare to zero same as test.
* Fixed signed and unsigned asm opcodes. (Optimizes some cases.)
* Moved compiler to low mem.
* Added $FG,2$lastclass$FG$ as a special compiler dft arg.
* Used $FG,2$lastclass$FG$ in $LK,"ClassRep",A="MN:ClassRep"$() and $LK,"DocFormDo",A="MN:DocFormDo"$().
* Chged arg order in $LK,"ClassRep",A="MN:ClassRep"$().
* $LK,"R",A="MN:R"$("NamedFrame","Frame");
* Changed imports in binary file format.
$IV,1$----09/25/13 00:12:26----$IV,0$
* Added $LK,"::/Demo/Graphics/Elephant.CPP"$.
$IV,1$----09/14/13 22:16:43----$IV,0$
* Added $LK,"::/Demo/Carry.CPP"$.
* Got rid of $LK,"CDirEntry",A="MN:CDirEntry"$.expanded_size.
$BK,1$$FG,4$!!! Warning !!!$FG$$BK,0$ RedSea file system is different, old RedSea partitions will
not work.
$IV,1$----09/11/13 14:17:45----$IV,0$
* $LK,"R",A="MN:R"$("FUF_JUST_TXT_FILES","FUF_JUST_TXT");
* $LK,"R",A="MN:R"$("FILENAME_MASK","FILEMASK");
* $LK,"R",A="MN:R"$("Lit","Imm");
* Compiler optimization: Compare immediates.
$IV,1$----08/31/13 14:36:22----$IV,0$
* Made $LK,"tS",A="MN:tS"$ use $LK,"HPET",A="MN:HPET"$ if available.
$IV,1$----08/30/13 03:21:38----$IV,0$
* $BK,1$TempleOS version 1.05 Released$BK,0$
* $LK,"R",A="MN:R"$("GetCurTimeDate","Now");
* $LK,"R",A="MN:R"$("GetTimeStamp","GetTSC");
* $LK,"R",A="MN:R"$("GetF","Scan");
* $LK,"R",A="MN:R"$("BASE_PTR","RBP");
* $LK,"R",A="MN:R"$("STK_PTR","RSP");
* $LK,"R",A="MN:R"$("Getlags","GetRFlags");
* $LK,"R",A="MN:R"$("SetFlags","SetRFlags");
* Changed args on $LK,"FilesFindMatch",A="MN:FilesFindMatch"$().
* $LK,"R",A="MN:R"$("SearchStr","StrFind"); and change args.
* $LK,"R",A="MN:R"$("WildCardMatch","WildMatch"); and change args.
* $LK,"R",A="MN:R"$("StrStr","StrMatch"); and changed args.
* $LK,"R",A="MN:R"$("LstEntryMatch","LstMatch");
* $LK,"R",A="MN:R"$("LstEntryPt","LstSub");
* Added $LK,"RawPrint",A="MN:RawPrint"$().
* $LK,"R",A="MN:R"$("DbgI64","RawI64"); etc.
* $LK,"R",A="MN:R"$("MSPrintF","MPrint");
* $LK,"R",A="MN:R"$("PrintF","Print");
* $LK,"R",A="MN:R"$("AFDelayedPutS","AFPrint");
* Converted PutS to Print
$IV,1$----08/28/13 13:00:02----$IV,0$
* $LK,"R",A="MN:R"$("HashRep","Who");
* Converted file utils to flattened list.
* Got rid of "hidden widgets".
$IV,1$----08/27/13 19:31:01----$IV,0$
* Fixed $LK,"Randomize",A="MN:Randomize"$().
* Added $LK,"PopUpI64",A="MN:PopUpI64"$().
* Added seed to $LK,"::/Apps/ToTheFront/ToTheFront.CPP"$.
$IV,1$----08/27/13 12:13:35----$IV,0$
* Got rid of $FG,4$IOSnd$FG$().
* Got rid of $LK,"CDirEntry",A="MN:CDirEntry"$.xsum
$IV,1$----08/26/13 15:54:09----$IV,0$
* Improved $LK,"::/Demo/Games/EagleDive.CPP"$.
* Improved $LK,"::/Adam/God/HolySpirit.CPP"$.
* Songs
$IV,1$----08/20/13 11:19:56----$IV,0$
* $LK,"R",A="MN:R"$("CDirEntryDel","DirEntryDel");
$IV,1$----08/12/13 08:42:47----$IV,0$
* Added $LK,"::/Demo/Graphics/PanText.CPP"$.
* Added $LK,"gr_pan_text_x",A="MN:gr_pan_text_x"$, $LK,"gr_pan_text_y",A="MN:gr_pan_text_y"$.
* Fixed compiler bug -- Pow() operator type conversion.
$IV,1$----08/04/13 10:31:36----$IV,0$
* New Logo
$IV,1$----07/27/13 07:17:43----$IV,0$
* Fixed bug in $LK,"::/Adam/God/GodSong.CPP"$.
* Improved $LK,"GrRect3",A="MN:GrRect3"$();
$IV,1$----07/25/13 08:01:06----$IV,0$
* Fixed $LK,"ROP_XOR",A="MN:ROP_XOR"$ in $LK,"GrRect",A="MN:GrRect"$().
$IV,1$----07/24/13 22:56:09----$IV,0$
* $LK,"R",A="MN:R"$("Sprite3b","Sprite3B");
* $LK,"R",A="MN:R"$("P3I32","D3I32");
* Added $LK,"GrRectB",A="MN:GrRectB"$().
$IV,1$----07/14/13 21:14:25----$IV,0$
* Fixed bug with saved cursor location.
$IV,1$----07/12/13 11:54:11----$IV,0$
* $LK,"R",A="MN:R"$("CONSTANT","CONST");
$IV,1$----07/11/13 22:52:45----$IV,0$
* Fixed bug in $LK,"Auto",A="MN:Auto"$().
* Added score to $LK,"::/Demo/Games/Varoom.CPP"$.
$IV,1$----07/08/13 05:12:13----$IV,0$
* $LK,"R",A="MN:R"$("Expression","LexExpression");
* Cleaned-up compiler.
* Made graphics routines return I64, not Bool.
-15
View File
@@ -1,15 +0,0 @@
$WW,1$A $FG,2$Char$FG$acter is a single byte holding an ASCII code for a letter, num or sym. The $FG,2$TempleOS$FG$ term is a $FG,2$U8$FG$.
ASCII values range from 0 to 127. Values below 32 are ctrl key's. So, an ASCII #3 is a $FG,2$<CTRL-C>$FG$. TempleOS uses a few nonstandard values. In TempleOS ASCII #5 is the cursor location in a saved file, ASCII 28 is $FG,2$<SHIFT-ESC>$FG$ and ASCII #31 is a $FG,2$<SHIFT-SPACE>$FG$. See $LK,"Char Definitions",A="MN:CH_SHIFT_SPACE"$.
A $FG,2$Key$FG$ is typically specified with a scan code. TempleOS scan codes contain the key value in the lowest $FG,2$U8$FG$, and flags in the upper bytes. See $LK,"Scan Code Flags",A="MN:SCF_CTRL"$ and $LK,"Scan Codes",A="MN:SC_INS"$.
TempleOS stores scan codes in 8 bytes.
$FG,2$Byte 0$FG$ is the code with left and right keys combined.
$FG,2$Byte 1-3$FG$ are flags
$FG,2$Byte 4$FG$ is the code with left and right distinct.
$FG,2$Byte 5-7$FG$ are flags
Run the program $LK,"::/Demo/MsgLoop.CPP"$ to examine scan code.
A $FG,2$String$FG$ is a bunch of ASCII characters terminated with a zero.
+27
View File
@@ -0,0 +1,27 @@
$WW,1$$FG,5$$TX+CX,"Char Overview"$$FG$
A $FG,2$Char$FG$acter is a single byte holding an ASCII code for a letter, num or sym. The $FG,2$TempleOS$FG$ term is a $FG,2$U8$FG$.
Standard ASCII values range from 0 to 127. Values below 32 are ctrl key's. So, an ASCII #3 is a $FG,2$<CTRL-c>$FG$. TempleOS uses a few nonstandard values below 32. See $LK,"Char Definitions",A="MN:CH_SHIFT_SPACE"$.
ASCII #5 is the cursor location in a saved file.
ASCII #28 is $FG,2$<SHIFT-ESC>$FG$.
ASCII #31 is a $FG,2$<SHIFT-SPACE>$FG$.
TempleOS ASCII is 8-bit instead of 7-bit, so it also uses the range from 128-255. Press $FG,2$<CTRL-ALT-a>$FG$ to see shapes for 128-255. Technically, $FG,2$<CTRL-ALT-a>$FG$ are $LK,"screen codes",A="HI:TextBase Layer"$.
A $FG,2$Key$FG$ is typically specified with a scan code. TempleOS scan codes contain the key value in the lowest $FG,2$U8$FG$, and flags in the upper 3 bytes. See $LK,"Scan Code Flags",A="MN:SCF_CTRL"$ and $LK,"Scan Codes",A="MN:SC_INS"$.
TempleOS stores scan codes in 8 bytes.
$FG,2$Byte 0$FG$ is the code. NumPad keys, SHIFT, ALT, CTRL and GUI keys combined.
$FG,2$Byte 1-3$FG$ are $LK,"flags",A="MN:SCf_KEY_UP"$
The upper 4-bytes are copied from lower 4-bytes.
$FG,2$Byte 4$FG$ is the code. Left, Right and NumPad keys distinct.
$FG,2$Byte 5-7$FG$ are $LK,"flags",A="MN:SCf_KEY_UP"$
Run the program $LK,"::/Demo/MsgLoop.CPP"$ to examine scan code. Press $FG,2$<CTRL-SHIFT-l>$FG$ and "Insert ASCII/ScanCode".$FG$
See $LK,"Key Allocations",A="FI:::/Doc/KeyAlloc.TXT"$ and $LK,"CKbdStateGlbls",A="MN:CKbdStateGlbls"$.
A $FG,2$String$FG$ is a bunch of ASCII characters terminated with a zero.
+4 -4
View File
@@ -1,10 +1,10 @@
$FG,5$$WW,1$$TX+CX,"TempleOS Charter"$$FG$
TempleOS is God's official temple. God said to use 640x480 16 color graphics and God said to have a single audio voice. That is just like how He specified cubits in the Bible! He also said it must be perfect. God needs a temple as a special beloved place where His people, young and old, can do offerings and consult God in the oracle. Like Solomon's Temple, this is a focal point for the community. Adults can write hymns, psalms (poems of praise) and meditation essays with good support for links to the Bible. Like Cain and Abel, do offerings and learn what God likes and doesn't like.
TempleOS is God's official temple. God said to use 640x480 16 color graphics and God said to have a single audio voice. That is like how He specified cubits in the Bible! He also said it must be perfect. God needs a temple as a special beloved place where His people, young and old, can do offerings and consult God in the oracle. Like Solomon's Temple, this is a focal point for the community. Adults can write hymns, psalms (poems of praise) and meditation essays with good support for links to the Bible. Like Cain and Abel, do offerings and learn what God likes and doesn't like.
* TempleOS will be limited to 100,000 lines of code, not including applications and demos. This will ensure it stays out of trouble going a thousand years into the future. It will not stray much from my vision as long as this is kept. Other, less important, characteristics can be changed but as long as the 100,000 line limit is kept, it will stay true.
* TempleOS is, forever, limited to 100,000 lines of code, not including applications and demos. This will ensure it stays out of trouble a thousand years into the future. It will not stray much from my vision. Other, less important, characteristics can be changed but if the 100,000 line limit is kept, it will stay true.
* It must be kept perfect. $FG,4$$BK,1$Backward compatibility is NOT guaranteed.$FG$$BK,0$ You are safest working with $FG,2$JIT$FG$ compilation instead of $FG,2$AOT$FG$ binaries because members to classes can be added and reorder, args with defaults can be added to existing functions, changes to $FG,2$#define$FG$ values can be made, all without breaking compatibility.
* It must be kept perfect. $FG,4$$BK,1$Backward compatibility is NOT guaranteed.$FG$$BK,0$
* TempleOS is $FG,2$ring-0-only$FG$, running everything in kernel mode including applications. You have full access to memory, I/O ports, instructions, etc. at all times, because that's fun. It is simpler and faster, too.
@@ -14,7 +14,7 @@ TempleOS is God's official temple. God said to use 640x480 16 color graphics an
* TempleOS will never have networking, so malware is less of an issue.
* TempleOS will always have one video mode, $FG,2$640x480$FG$ by 16 colors, unless that mode becomes unavailable on computers in the future.
* TempleOS will always have one video mode, $FG,2$640x480$FG$ by 16 colors, unless that mode becomes unavailable on computers in the future. God said this was a covenant, like circumcision.
* TempleOS will always just have PC Speaker sound.
-32
View File
@@ -1,32 +0,0 @@
$WW,1$The cmd line feeds into the $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ compiler as you type. A statement outside a function executes immediately. Remember to add a semicolon.$WW,1$
Look-up the function headers with $FG,2$WordStat$FG$ by hitting $FG,2$<CTRL-SHIFT-F1>$FG$ after typing the first few letters.
$LK,"Click Here",A="MN:Dir"$ to see the directory cmd header. It accepts default args from $FG,2$C++$FG$.
$FG,4$Dir("*.TXT.Z");$FG$
If you don't have args, you don't need parenthesis.
$FG,4$Dir;$FG$
There is a current directory, but not a path. To run a program, you typically $FG,2$#include $FG$it. There are several shortcuts for $FG,2$#include$FG$ing files. Right-click or hit enter on a directory listing or press $FG,2$F5$FG$ while editing.
$FG,4$Ed("NewFile.CPP.Z");$FG$
Most filenames end in "$FG,2$.Z$FG$" because they are stored compressed.
Drives are specified with a letter. The boot drive is specified with a '$FG,2$:$FG$'.
$FG,4$Drv('B'); $FG,2$B$FG$ drive
The drive can be specified in a $LK,"Cd",A="MN:Cd"$() command as in:
$FG,4$Cd("B:/Temp"); $FG,2$B$FG$ drive
$FG,4$Cd("::/Demo");$FG$ Boot drive
$FG,4$$FG,4$Cd("HOME/MusicOrgan"); $FG,2$HOME$FG$ is a dir
You can place macros in your personal menu for $LK,"Cd",A="MN:Cd"$() commands. $FG,2$<CTRL-M>$FG$ to access your menu.
$MA-X+PU,"Take Tour",LM="SpawnUser(\"Cd(\\\"::/Misc/Tour\\\");;AutoFile(\\\"Tour\\\");\n\");"$
+40
View File
@@ -0,0 +1,40 @@
$WW,1$$FG,5$$TX+CX,"Command Line Overview"$$FG$
The cmd line feeds into the $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ compiler as you type. A statement outside a function executes immediately. Remember to add a semicolon.$WW,1$
Look-up the function headers with $FG,2$WordStat$FG$ by hitting $FG,2$<CTRL-SHIFT-F1>$FG$ after typing the first few letters.
$LK,"Click Here",A="MN:Dir"$ to see the directory cmd header. It accepts default args from C++.
>$FG,2$Dir("*.TXT.Z");$FG$
If you don't have args, you don't need parenthesis.
>$FG,2$Dir;$FG$
Directories are referenced with $FG,2$/$FG$ not $FG,2$\$FG$. There is a current directory, but not a path. To run a program, you typically $FG,2$#include $FG$it. There are several shortcuts for $FG,2$#include$FG$ing files. Right-click or hit $FG,2$<ENTER>$FG$ on a directory listing or press $FG,2$<F5>$FG$ while editing.
>$FG,2$Ed("NewFile.CPP.Z");$FG$ Invokes the editor. See $LK,"Doc Link Type",A="MN:LK_FILE"$.
Most filenames end in $FG,2$.Z$FG$ because they are stored compressed.
Drives are specified with a letter. The boot drive is specified with a '$FG,2$:$FG$'.
>$FG,2$Drv('B');$FG$ B drive
The drive can be specified in a $LK,"Cd",A="MN:Cd"$() command as in:
>$FG,2$Cd("B:/Temp");$FG$ B drive
>$FG,2$Cd("::/Demo");$FG$ Boot drive
>$FG,2$Cd("HOME/Psalmody");$FG$ HOME is your $LK,"acct dir",A="FF:::/Doc/GuideLines.TXT,ACCT FILES"$.
If a file is not found, $FG,2$.Z$FG$ is added or removed and a search is done, again. If a file is still not found, all parent directories are searched.
You can place macros in your $LK,"PersonalMenu",A="FI:HOME/PersonalMenu.TXT"$ for $LK,"Cd",A="MN:Cd"$() commands. $FG,2$<CTRL-m>$FG$ to access your menu.
>$FG,2$Grep("needle","/Demo/*.CPP.Z;*.TXT.Z;");$FG$ See $LK,"File Utils",A="FI:::/Doc/FileUtils.TXT"$.
$LK,"Cmd Line Routines",A="HI:Cmd Line (Typically)"$
$MA-X+PU,"Take Tour",LM="SpawnUser(\"Cd(\\\"::/Misc/Tour\\\");;AutoFile(\\\"Tour\\\");\n\");"$
@@ -1,4 +1,6 @@
$WW,1$The compiler looks-ahead a token most of the time, so you might throw an extra semicolon after the directive if it's not taking affect right away.
$WW,1$$FG,5$$TX+CX,"Compiler Directives"$$FG$
The compiler looks-ahead a token most of the time, so you might throw an extra semicolon after the directive if it's not taking affect right away.
$FG,2$#include ""$FG$ There is no angle bracket <> form of this directive.
$FG,2$#exe {}$FG$ Will execute code at compile-time and can be used to insert code into the stream being compiled using $LK,"StreamPrint",A="MN:StreamPrint"$().
@@ -15,7 +17,7 @@ $FG,2$#help_index$FG$, $FG,2$#help_file$FG$ See $LK,"Help System",A="FI:::/Doc/H
See $LK,"Scoping and Linkages",A="FI:::/Doc/ImportExports.TXT"$, $LK,"preprocessor",A="FF:::/Compiler/Lex.CPP,KW_DEFINE"$ and $LK,"Compiler Options",A="FI:::/Doc/Options.TXT"$.
$FG,5$Assembler Directives$FG$
$FG,5$$TX+CX,"Assembler Directives"$$FG$
See $LK,"::/Compiler/OpCodes.TXT"$ for opcodes. They're not standard. Some invalid instructions are not flagged and some valid instructions are not implemented. 16-bit asm support is limited.
+13 -13
View File
@@ -1,24 +1,24 @@
$WW,1$$FG,5$$TX+CX,"Clearing-up Confusions"$$FG$
* I, Terry A. Davis, wrote every one of the $TX,"120,838",D="DD_TEMPLEOS_LOC"$ lines of TempleOS over the past $TX,"10.6",D="DD_TEMPLEOS_AGE"$ years (full-time). It runs on bare hardware with no layering, libraries, tools, modules or anything from other sources. It's 100% independent and stands alone. It has no networking and certainly doesn't call home. Every line of TempleOS src code is including in all distro's, from the kernel to the compiler to the boot loaders.
* I, $FG,2$Terry A. Davis$FG$, wrote every one of the $TX,"121,847",D="DD_TEMPLEOS_LOC"$ lines of TempleOS over the past $TX,"10.9",D="DD_TEMPLEOS_AGE"$ years (full-time). It runs on bare hardware with no layering, libraries, tools, modules or anything from other sources. It's 100% independent and stands alone. It has no networking and certainly doesn't call home. Every line of TempleOS src code is including in all distro's, from the kernel to the compiler to the boot loaders.
* TempleOS does not execute code not written by me and any time except for a few BIOS calles for cfguration.
* TempleOS does not execute code not written by me and any time except for a few $FG,2$BIOS$FG$ calls for configuration.
* TempleOS is 100% independent -- it does not access the files of your primary operating system. It will work as the only operating system on your computer.
* TempleOS is 100% written from scratch. There is no Linux or GNU or any other code in TempleOS. Yes, I wrote the compiler from scratch. (I probably need to repeat this a few times.)
* TempleOS is 100% written from scratch. There is no $FG,2$Linux$FG$ or $FG,2$GNU$FG$ or any other code in TempleOS. Yes, I wrote the compiler from scratch. (I probably need to repeat that a few times.)
* TempleOS is an operating system, not a browser. The cmd line has active links. They link to local files.
* TempleOS compiles, not "interprets", and uses no "byte code" anywhere. I use the word "script" sometimes for stuff, but it's actually compiled.
* TempleOS compiles, not $FG,2$interprets$FG$, and uses no $FG,2$byte code$FG$ anywhere. I use the word $FG,2$script$FG$ sometimes for stuff, but it's actually compiled.
* I am an evolutionist. "$FG,2$Adam$FG$" is a better term for the father of all tasks than "$FG,2$root$FG$" was!
* I am an evolutionist. $FG,2$Adam$FG$ is a better term for the father of all tasks than $FG,2$root$FG$ was!
* $LK,"Bt",A="MN:Bt"$() is "bit test", like the x86 instruction, not "bit torrent".
* $LK,"Bt",A="MN:Bt"$() is $FG,2$bit test$FG$, like the $FG,2$x86$FG$ instruction, not $FG,2$bit torrent$FG$.
* $LK,"Fs",A="MN:Fs"$ is a segment reg, not "file system". (It is kept pointing to the current task's record.) There is no memory segmentation -- FS and GS are used as general purpose regs, more or less.
* $LK,"Fs",A="MN:Fs"$ is a segment reg, not $FG,2$file system$FG$. (It is kept pointing to the current task's record.) There is no memory segmentation -- FS and GS are used as general purpose regs, more or less.
* TempleOS uses a dialect of C/C++ called $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$. It is not PASCAL. I altered the syntax making parenthesis optional on function calls with no paramaters.
* TempleOS uses a dialect of C/C++ called $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$. It is not $FG,2$PASCAL$FG$. I altered the syntax making parenthesis optional on function calls with no paramaters.
* $LK,"Sleep",A="MN:Sleep"$() makes a program pause. It is not hybernation for a laptop.
@@ -26,21 +26,21 @@ $WW,1$$FG,5$$TX+CX,"Clearing-up Confusions"$$FG$
* I use the term $LK,"JIT Compile Mode",A="FF:::/Doc/Glossary.TXT,JIT Compile Mode"$. This means it is compiled and executable code placed into mem, ready to be called.
* Files with names ending in "Z" are compressed, not encrypted. $LK,"Copy",A="MN:Copy"$() or rename them with $LK,"Move",A="MN:Move"$() to store them uncompressed.
* Files with names ending in $FG,2$.Z$FG$ are compressed, not encrypted. $LK,"Copy",A="MN:Copy"$() or rename them with $LK,"Move",A="MN:Move"$() to store them uncompressed.
* TempleOS is open src and every bit of the src code is included in the distro. Use $LK,"MakeOSPrtBootInstall",A="MN:MakeOSPrtBootInstall"$() to compile the kernel and compiler.
* TempleOS does not use object files or a linker. You can link $FG,4$.BIN.Z$FG$ modules at $LK,"Load",A="MN:Load"$() time, though.
* TempleOS does not use object files or a linker.
* The swap rate is high because tasks stay in the queue and poll conditions and swap-out voluntarily. Swaps also occur at $TX,"1000 ",D="JIFFY_FREQ"$Hz due to the timer interrupt. See $LK,"JIFFY_FREQ",A="MN:JIFFY_FREQ"$.
* The swap rate is high because tasks stay in the queue and poll conditions and swap-out voluntarily. Swaps also occur at $FG,2$$TX,"1000 Hz",D="DD_JIFFY_HZ"$$FG$ due to the timer interrupt. See $LK,"JIFFY_FREQ",A="MN:JIFFY_FREQ"$.
* Refresh rate is how often TempleOS updates screen mem. It is not syncronized to the hardware rate, having nothing to do with it.
* Refresh rate is how often TempleOS updates screen mem. It is not syncronized to the hardware rate. It has nothing to do with it.
* No application has a lock on the speaker so apps can interfere with each other and TempleOS makes speaker noise during disk access on purpose.
* During boot, TempleOS reads-in all text files and collects statistic on them. It makes a sparse matrix containing the frequency each word was followed by each other word. This makes it able to predict the next word while you type. This feature is called $FG,2$WordStat$FG$.
* There are no mem leaks. TempleOS allocates mem as more items are displayed on the screen. TempleOS allocates mem for code as it is compiled at the cmd line. If you $FG,2$#include$FG$ a file twice, it allocates more mem for it. If you have a 50,000 line program with each line taking twenty bytes on a machine with 1 Gig, you could $FG,2$#include$FG$ it a thousand times if it had no data or graphics and no other use of mem. Code entered at the cmd line gets allocated and persists. I don't want to hear any bullshit about leaks unless you actually run-out. If it bothers you, hit $FG,2$<CTRL-ALT-X>$FG$ and $FG,2$<CTRL-ALT-E>, $FG$periodically$FG$. Use the pop-up flag on macros in your menu to spawn new tasks, run applications and free the applications when they are finished and everything will be fine. Small mem chunks stick to the task when they are freed until it is killed. The only way to get in trouble involves allocating multiple Meg chunks and freeing them. These can only be reused if the same size gets allocated again. Use $LK,"HeapLog",A="MN:HeapLog"$() and $LK,"HeapLogRep",A="MN:HeapLogRep"$() to see who allocated mem and didn't free it.
* There are no mem leaks. TempleOS allocates mem as more items are displayed on the screen. TempleOS allocates mem for code as it is compiled at the cmd line. If you $FG,2$#include$FG$ a file twice, it allocates more mem for it. If you have a 50,000 line program with each line taking twenty bytes on a machine with 1 Gig, you could $FG,2$#include$FG$ it a thousand times if it had no data or graphics and no other use of mem. Code entered at the cmd line gets allocated and persists. I don't want to hear any bullshit about leaks unless you actually run-out. If it bothers you, hit $FG,2$<CTRL-ALT-x>$FG$ and $FG,2$<CTRL-ALT-e>, $FG$periodically$FG$. Use the pop-up flag on macros in your menu to spawn new tasks, run applications and free the applications when they are finished and everything will be fine. Small mem chunks stick to the task when they are freed until it is killed. The only way to get in trouble involves allocating multiple Meg chunks and freeing them. These can only be reused if the same size gets allocated again. Use $LK,"HeapLog",A="MN:HeapLog"$() and $LK,"HeapLogRep",A="MN:HeapLogRep"$() to see who allocated mem and didn't free it.
* The editor periodically takes a snap-shot for $FG,2$UNDO$FG$ and this looks like a memory leak.
+1 -1
View File
@@ -1 +1 @@
$WW,1$To create a TempleOS graphic ctrl, you define callback functions and insert a $LK,"CCtrl",A="MN:CCtrl"$ structure in the $LK,"CTask",A="MN:CTask"$ queue. See $LK,"::/Demo/Graphics/SliderCtrl.CPP"$, $LK,"::/Demo/Graphics/ScrollBars.CPP"$ and $LK,"TermButtonNew",A="FF:::/Adam/WallPaper.CPP,TermButtonNew"$. There is a managed-code ctrl generator, if you press $FG,2$<CTRL-SHIFT-L>$FG$.
$WW,1$To create a TempleOS graphic ctrl, you define callback functions and insert a $LK,"CCtrl",A="MN:CCtrl"$ structure in the $LK,"CTask",A="MN:CTask"$ queue. See $LK,"::/Demo/Graphics/SliderCtrl.CPP"$, $LK,"::/Demo/Graphics/ScrollBars.CPP"$ and $LK,"TermButtonNew",A="FF:::/Adam/WallPaper.CPP,TermButtonNew"$. There is a template-code ctrl generator, if you press $FG,2$<CTRL-SHIFT-L>$FG$.
+2 -2
View File
@@ -1,6 +1,6 @@
$WW,1$* You can adjust the mouse movement rate by setting global vars in your start-up file. See $LK,"mouse scale",A="FF:HOME/Adam3aLocalize.CPP,mxx_scale"$.
$WW,1$* You can adjust the mouse movement rate by setting global vars in your start-up file. See $LK,"mouse scale",A="FF:HOME/Adam3aLocalize.CPP,mouse.scale"$.
* You can set your local time zone by setting the $FG,4$local_time_offset$FG$ global var in a start-up file. It's units are $LK,"CDATE_FREQ",A="MN:CDATE_FREQ"$. See $LK,"local time",A="FF:HOME/Adam3aLocalize.CPP,local_time"$.
* You can set your local time zone by setting the $RED$local_time_offset$FG$ global var in a start-up file. It's units are $LK,"CDATE_FREQ",A="MN:CDATE_FREQ"$. See $LK,"local time",A="FF:HOME/Adam3aLocalize.CPP,local_time"$.
* Get rid of this msg $LK,"here",A="FF:HOME/DoOnce.CPP,Customize.TXT"$.
+1 -1
View File
@@ -1,6 +1,6 @@
$WW,1$$FG,5$$TX+CX,"Cut Corners"$
$FG$
There are a few places where I cut corners in the interest of not junking-up code. This is part of the TempleOS mentality. I try not to let, often stupid, legacy compatibility issues enter and junk-up TempleOS.
There are a few places where I cut corners in the interest of not junking-up code. This is part of the TempleOS mentality. I try not to let stupid legacy compatibility issues enter and junk-up TempleOS.
* I made my type-casting operator post-fix because it makes the compiler way cleaner.
+1
View File
@@ -0,0 +1 @@
$WW,1$Dates are 32-bit signed integers representing the number of days since the birth of Christ. Negative values represent B.C.E. dates.
+12 -8
View File
@@ -1,10 +1,14 @@
$WW,1$* You can enter the debugger with $LK,"Dbg",A="MN:Dbg"$() or $FG,2$<CTRL-ALT-D>$FG$. You might enter the debugger through a fault. Enter $LK,"G",A="MN:G"$() or $LK,"G2",A="MN:G2"$() to continue execution. Place a call to $LK,"Dbg",A="MN:Dbg"$() in your code at fatal error points to enter the debugger. If you see a stk dump, record the label+offset and unassemble, $LK,"U",A="MN:U"$(). $LK,"U",A="MN:U"$($LK,"_RIP",A="MN:_RIP"$);
$WW,1$$FG,5$$TX+CX,"Debugging Overview"$$FG$
* You can enter the debugger with $LK,"Dbg",A="MN:Dbg"$() or $FG,2$<CTRL-ALT-d>$FG$. You might enter the debugger through a fault. Enter $LK,"G",A="MN:G"$() or $LK,"G2",A="MN:G2"$() to continue execution. Place a call to $LK,"Dbg",A="MN:Dbg"$() in your code at fatal error points to enter the debugger. If you see a stk dump, record the label+offset and unassemble, $LK,"U",A="MN:U"$(). $LK,"U",A="MN:U"$($LK,"_RIP",A="MN:_RIP"$);
* $LK,"U",A="MN:U"$(&FunName+offset) to unassemble mem or $LK,"Uf",A="MN:Uf"$("FunName") to unassemble a function. $LK,"U",A="MN:U"$($LK,"_RIP",A="MN:_RIP"$-16);
* While debugging, you specify addresses of assembly routines with just the label, as in $FG,2$_MALLOC+0x20$FG$. You specify $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ function names with $FG,2$&$FG$ before functions as in $FG,2$&Print+0x10$FG$.
* I use $LK,"progress1",A="MN:progress1"$-$LK,"progress4",A="MN:progress4"$ for debugging because they show on the wallpaper. They're just global integer vars.
* While debugging, you specify addresses of assembly routines with just the label, as in $FG,2$_MALLOC+0x20$FG$. You specify $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ function names with $FG,2$&$FG$ before functions as in $FG,2$&Print+0x10$FG$.
* You can use $LK,"AdamLog",A="MN:AdamLog"$() to send text to the Adam task window. It works like $LK,"Print",A="MN:Print"$(). I never use this. Instead I use $LK,"RawPrint",A="MN:RawPrint"$().
* You can use $LK,"AdamLog",A="MN:AdamLog"$() to send text to the Adam task window. It works like $LK,"Print",A="MN:Print"$(). I never use that. Instead, I use $LK,"RawPrint",A="MN:RawPrint"$().
* $LK,"D",A="MN:D"$(), $LK,"DocD",A="MN:DocD"$(), $LK,"RawD",A="MN:RawD"$() to do 16 column hex dump mem with numbering from zero. With $LK,"DocD",A="MN:DocD"$ the values are updated continually and you can alter mem by editing.
@@ -14,11 +18,11 @@ $WW,1$* You can enter the debugger with $LK,"Dbg",A="MN:Dbg"$() or $FG,2$<CTRL-A
* $LK,"Dr",A="MN:Dr"$() dumps regs. You can display and modify regs in the debugger with var-like labels, $FG,4$_RAX$FG$, $FG,4$_RBX$FG$, etc.
* $LK,"U",A="MN:U"$(&FunName+offset) to unassemble mem or $LK,"Uf",A="MN:Uf"$("FunName") to unassemble a function. $LK,"U",A="MN:U"$($LK,"_RIP",A="MN:_RIP"$-16);
* $LK,"ClassRep",A="MN:ClassRep"$() and the dynamic version $LK,"ClassRepD",A="MN:ClassRepD"$() can be used to dump structures.
* $LK,"ProfBin",A="MN:ProfBin"$(),$LK,"ProfAll",A="MN:ProfAll"$() and $LK,"ProfRep",A="MN:ProfRep"$() provide code profiling. See $LK,"::/Demo/AutoFile/AFProfile.AUT"$ (This is an $LK,"AutoFile",A="FF:::/Doc/Glossary.TXT,AutoFile"$.)
* $LK,"Prof",A="MN:Prof"$() and $LK,"ProfRep",A="MN:ProfRep"$() provide code profiling. See $LK,"::/Demo/AutoFile/AFProfile.AUT"$ (This is an $LK,"AutoFile",A="FF:::/Doc/Glossary.TXT,AutoFile"$.)
* Use $LK,"RawPutChar",A="MN:RawPutChar"$() and $LK,"RawPrint",A="MN:RawPrint"$() to print debug info bypassing the window framework. You pass these routines a count in milliseconds for how long it should be displayed. You can use $LK,"Raw",A="MN:Raw"$($FG,2$TRUE$FG$) to make all output bypass the window framework. The WinMgr runs on core0 and will overwrite raw text from other cores when it updates the screen.
* Use $LK,"RawPrint",A="MN:RawPrint"$() to print debug info bypassing the window framework. You pass these routines a count in milliseconds for how long it should be displayed. You can use $LK,"Raw",A="MN:Raw"$($FG,2$TRUE$FG$) to make all output bypass the window framework. The WinMgr runs on core0 and will overwrite raw text from other cores when it updates the screen.
* Use $LK,"SysDbg",A="MN:SysDbg"$() to set a flag which you can read with $LK,"IsSysDbg",A="MN:IsSysDbg"$() when you wish to trigger some debug activity. It's just a handy simple flag, nothing fancy.
@@ -33,6 +37,6 @@ $ID,-2$
* There is a heap check utility which can find leaks. Use $LK,"HeapLog",A="MN:HeapLog"$(), and $LK,"HeapLogRep",A="MN:HeapLogRep"$(). It's a really simple program which intercepts $LK,"MAlloc",A="MN:MAlloc"$() and $LK,"Free",A="MN:Free"$(). You can customize the code to find other heap issues.
* You can define functions for $FG,2$<CTRL-ALT-letter>$FG$ keys, but they must operate in a interrupt environment or in the window mgr when in ques kbd msgs. You can do $LK,"Raw",A="MN:Raw"$() output. Search for $LK,"fp_ctrl_alt_let_cbs",A="MN:fp_ctrl_alt_let_cbs"$[] and look at the code. They take scancode as an arg.
* You can define handler functions for $FG,2$<CTRL-ALT-letter>$FG$ keys with $LK,"SetCtrlAltLetCB",A="MN:SetCtrlAltLetCB"$(). They operate either in a interrupt environment or in the window mgr when it queues kbd msgs. You can do $LK,"Raw",A="MN:Raw"$() output. $FG,2$<CTRL-ALT-letter>$FG$ handlers take a scan_code as an arg.
* If you recompile $FG,2$Kernel$FG,2$$FG$ with $LK,"MakeOSPrtBootInstall",A="MN:MakeOSPrtBootInstall"$(), you can set the $FG,4$MemInit$FG$, option to initialize memory to a value at boot, the $FG,4$HeapInit$FG$ option to cause mem allocated off the heap to be initialized or $FG,4$VarInit$FG$ option so both global and local vars will be initialized to a value. Pick a non-zero value to discover uninitialized var bugs. You can set $LK,"sys_var_init_flag",A="MN:sys_var_init_flag"$, and $LK,"sys_heap_init_flag",A="MN:sys_heap_init_flag"$ directly after booting.
+2
View File
@@ -0,0 +1,2 @@
$WW,1$Use $FG,2$%p$FG$ to print a pointer with PSect+Offset or use $FG,2$%P$FG$ to print a link to a PSect+Offset.
+4 -2
View File
@@ -1,5 +1,7 @@
$WW,1$To allow different languages and customization, TempleOS uses strings to identify actual strings to be displayed. This is basically a level of indirection. Support for lsts of strings is also provided, but it's not especially efficient.
$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"$.
Each task can load it's own Define strings. If a string is not found, the parent task's table is searched.
Each task can load it's 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.
The $LK,"DolDoc",A="FI:::/Doc/DolDocOverview.TXT"$ framework supports text that changes based on entries in the task's symbol table. Set a text entry with a $FG,2$D=$FG$ arg, as in $FG,2$$$TX,"",D="DD_MYSTRING"$$$FG$. See $LK,"::/Demo/DolDoc/DefineStr.CPP"$, $LK,"::/Adam/DocDefines.CPP"$ and $LK,"::/Doc/MemOverview.TXT"$.
See $LK,"::/Demo/Define.CPP"$.
+22 -18
View File
@@ -1,40 +1,42 @@
$WW,1$$FG,5$$TX+CX,"Demands"$$FG$
When God is manifest to the World and He claims this operating system, publically, here's what I want:
When God publically claims this operating system as His temple, here's what I want:
* VMware to again support PC Speaker and provide emulation if no PC Speaker is present.
* Windows and Linux will support $LK,"RedSea",A="FI:::/Doc/RedSea.TXT"$ file system so I can get rid of 2,000 lines of redundant, blemished code -- FAT32 and ISO9660. God's temple must be perfect. I view redundant code that performs the same function as imperfect. More than one filesystem type is bad, not good!
* Windows and Linux to support $LK,"RedSea",A="FI:::/Doc/RedSea.TXT"$ file system so I can get rid of 2,000 lines of redundant, blemished code -- FAT32 and ISO9660. God's temple must be perfect. Redundant code for multiple file systems is imperfect. For this operating system, we want low line count. More than one file system type is bad, just as more than one driver for the same type of device is bad.
$LK,"::/Kernel/Dsk/FileSysRedSea.CPP"$
$LK,"::/Kernel/Dsk/FileSysFAT.CPP"$ :1004
$LK,"::/Kernel/Dsk/FileSysISO1.CPP"$ :306
$LK,"::/Kernel/Dsk/FileSysFAT.CPP"$ :965
$LK,"::/Kernel/Dsk/FileSysISO1.CPP"$ :284
$LK,"::/Adam/Boot/DskCDDVD.CPP"$ :536
* No secure boot. TempleOS is a additional operating system that must be used along-side Windows or Linux, not as a replacement. It must dual boot.
* Microsoft must cancel SecureBoot because it makes dual booting impossible. TempleOS is an additional operating system that must be used along-side Windows or Linux, not as a replacement. It must dual boot.
* Mandate to PC hardware manufacturers: ATA/ATAPI PIO must work.
* PC hardware manufacturers: ATA/ATAPI PIO must work. In fact, put them at standard IDE port addresses. Hard disk should be primary master. CDROM/DVD should be secondary master. See what you can do to make flash memory sticks with ATA/ATAPI.
* PS2 emulated Keyboard and Mouse must work. The BIOS must enable these.
* PS/2 emulated keyboard and mouse must work. The BIOS must enable these.
* VMware should allow ATAPI to connect real CD/DVD hardware.
* VMware must allow ATAPI interface to real CD/DVD hardware.
* Perhaps, VMware can enable faster than standard x86 IN/OUT instruction timing for ATA/ATAPI PIO, so the bandwidth isn't as bad.
* Perhaps, VMware+Intel can enable faster-than-standard x86 IN/OUT instruction timing for ATA/ATAPI PIO, so bandwidth isn't bad.
* VMware and others should list TempleOS as one of the official 64-bit operating systems.
* Computers should have a RESET switch and a fast boot option, skipping diagnostics.
* Windows and Linux should support TempleOS $FG,2$.GRA$FG$ graphics files. These are just right-side-up $FG,2$.BMP$FG$ files with 8-bit pixs 4-bits of color and transparency, with no palette. Compression is an$FG$ LZW compression. $LK,"DCSave",A="MN:DCSave"$(), $LK,"GRAWrite",A="MN:GRAWrite"$(), $LK,"DCLoad",A="MN:DCLoad"$(), and $LK,"GRARead",A="MN:GRARead"$(). $LK,"::/Kernel/Compress.CPP"$
* VMware and others should list TempleOS as an official 64-bit operating systems.
* Windows and Linux must support TempleOS $FG,2$.GRA$FG$ graphics files. These are just right-side-up $FG,2$.BMP$FG$ files with 8-bits-per-pixels 4-bits of color and transparency, with no palette. Compression is an$FG$ LZW compression. $LK,"DCSave",A="MN:DCSave"$(), $LK,"GRAWrite",A="MN:GRAWrite"$(), $LK,"DCLoad",A="MN:DCLoad"$(), and $LK,"GRARead",A="MN:GRARead"$(). $LK,"::/Kernel/Compress.CPP"$
----
In other words, all hardware and BIOSes must support TempleOS, dual booted with Windows or Linux. Hypervisors must support it fully.
In other words, all hardware and BIOSes must support TempleOS as a native and as a virtual system, dual booted with Windows or Linux.
It would be neat if TempleOS were burned into BIOS ROMs in the factory, or maybe Intel CPU chips, in factory! My hope is that it will be finished and largely unchanging for centuries. I need a good dictionary, first. Maybe, we leave the dictionary out.
I do not intend to ever support UEFI. That monstrocity uses elf and various propriatary graphics formats.
It would be nice if TempleOS were burned into BIOS ROMs in the factory, or Intel CPU chips! Then, the oracle code would be guaranteed trustworthy. My hope is that it will be finalized, mostly unchanging for centuries.
I need a good dictionary and need to fix spellcheck. Maybe, we leave the dictionary out.
I do not intend to ever support UEFI. That uses elf and various propriatary graphics formats. It requires additional lines of code and offers nothing!
@@ -68,11 +70,11 @@ God said 640x480 16 color.
God said single audio voice. (Waveforms okay)
God said lots of arcane stuff, like no child windows.
God said lots of misc stuff, like no child windows.
I said there is a 100,000 line-of-code limit.
We have 82,000 lines of code, currently, and can expand up to 100,000, but code comments count. I am opening-this-up to letting other people contribute. We'll have some kind of organization.
We have $TX,"81,303",D="DD_TEMPLEOS_LOC_OFFICIAL"$ lines of code, currently, and can expand up to 100,000, but code comments count. I am opening-this-up to letting other people contribute. We'll have some kind of organization.
When you have a 100,000 line of code limit, you do not get mellow-dramatic code. The vision is a C64, not a manned mission NASA mainframe. If you prance around adding rare-case code, that subtracts from other potential features. So, long as you know that every line of code added, subtracts a feature, we'll be okay.
@@ -81,6 +83,8 @@ The 640x480 16 color limit is certainly astounding. God said it was for kid off
Today, God said dull causes craftiness. I think what God means is... on a C64, you saw fantasticly crafty creativity because you were not burdened with high-demand photo-realism graphics and sound. Otherwise, you spend all your energy just burdened with getting something presentable. Now, you will achieve "presentable" easily and advance to embelishing and getting creative.
God said 640x480 16 color was a covenant, like circumcision.
The 100,000 line of code limit should ensure God's temple stays on-course for a thousand years. Also, it must be kept perfect. With these, it will not go astray. I could hand it over to NASA (for example) and, so long as they kept the 100,000 line of code limit, it would be in good hands. For the future, I expect low driver-line-count hardware to be created and utilized when all (mostly) computers have advanced to contain it. All computer are 64-bit, now, for example, if you catch my drift.
+31 -30
View File
@@ -2,12 +2,13 @@ $FG,5$$TX+CX,"TempleOS Demo Index"$$FG$
$WW,1$These are arranged in increasing order of difficulty, more or less. This can be used as a tutorial if you start at the beginning and work your way fwd.
$FG,2$<SPACE BAR>$FG$ to edit a file and $FG,2$F5$FG$ to run it.
$FG,2$<SPACE>$FG$ to edit a file and $FG,2$F5$FG$ to run it.
$WW,0$$TR,"Games: Beginner"$
$ID,2$$LK,"::/Demo/Graphics/DotNet.CPP"$
$LK,"::/Demo/Graphics/InputPointer.CPP.Z"$
$LK,"::/Demo/Graphics/Moon.CPP"$
$ID,2$$LK,"::/Demo/Graphics/NetOfDots.CPP"$
$LK,"::/Demo/Graphics/InputPointer.CPP"$
$LK,"::/Demo/Graphics/SunMoon.CPP"$
$LK,"::/Demo/Games/ElephantWalk.CPP"$
$LK,"::/Demo/Graphics/LowPassFilter.CPP"$
$LK,"::/Demo/Graphics/MathAudioDemo.CPP"$
$LK,"::/Demo/Graphics/Lines.CPP"$
@@ -25,14 +26,13 @@ $LK,"::/Demo/Graphics/WinZBuf.CPP"$
$LK,"::/Demo/Graphics/Elephant.CPP"$
$LK,"::/Demo/Graphics/Mountain.CPP"$
$LK,"::/Demo/Games/Coach.CPP"$
$LK,"::/Demo/Graphics/WallPaperFish.CPP"$
$LK,"::/Demo/Graphics/WallPaperFish.CPP"$ //Press SHIFT-F5 to Adam Include
$LK,"::/Demo/Games/Digits.CPP"$
$LK,"::/Demo/Progress.CPP"$ //has some ASM, just ignore
$LK,"::/Demo/Graphics/Dither.CPP"$
$LK,"::/Demo/Graphics/Symmetry.CPP"$
$LK,"::/Demo/Graphics/Blot.CPP"$
$LK,"::/Demo/Graphics/CaptureScreen.CPP"$
$LK,"::/Demo/Graphics/EdCSprite.CPP"$
$LK,"::/Demo/Graphics/EdSprite.CPP"$
$LK,"::/Demo/PullDownMenu.CPP"$
$MA-X+PU,"::/Demo/Games/Stadium",LM="Cd(\"::/Demo/Games/Stadium\");Dir;View;\n"$
$LK,"::/Demo/Graphics/Palette.CPP"$
@@ -41,7 +41,7 @@ $LK,"::/Demo/Games/Halogen.CPP"$
$LK,"::/Demo/Games/TheDead.CPP"$
$LK,"::/Demo/Games/RainDrops.CPP"$
$LK,"::/Demo/Snd/MorseCode.CPP"$
$LK,"::/Demo/Graphics/PixCollision.CPP"$
$LK,"::/Demo/Graphics/Collision.CPP"$
$LK,"::/Demo/Games/BlackDiamond.CPP"$
$LK,"::/Demo/Games/Wenceslas.CPP"$
$ID,-2$$TR,"Games: Intermediate"$
@@ -51,8 +51,7 @@ $LK,"::/Demo/Graphics/3DPoly.CPP"$
$LK,"::/Demo/Graphics/BSpline.CPP"$
$LK,"::/Demo/Graphics/Extents.CPP"$
$LK,"::/Demo/Graphics/SpritePlot3D.CPP"$
$LK,"::/Demo/Graphics/Balloon.CPP.Z"$
$LK,"::/Demo/Graphics/Logo.CPP"$
$LK,"::/Demo/Graphics/Balloon.CPP"$
$LK,"::/Demo/Graphics/RotateTank.CPP"$
$LK,"::/Demo/ScreenCodes.CPP"$
$LK,"::/Demo/Graphics/PanText.CPP"$
@@ -62,7 +61,7 @@ $LK,"::/Demo/Graphics/FontEd.CPP"$
$LK,"::/Demo/ExtendedChars.CPP"$
$LK,"::/Demo/TimeIns.CPP"$
$LK,"::/Demo/Snd/WaterFowl.CPP"$
$MA-X+PU,"::/Apps/MusicOrgan/Examples",LM="Cd(\"::/Apps/MusicOrgan/Examples\");Dir;View;\n"$
$MA-X+PU,"::/Apps/Psalmody/Examples",LM="Cd(\"::/Apps/Psalmody/Examples\");Dir;View;\n"$
$LK,"::/Demo/MultiCore/MPPrint.CPP"$
$LK,"::/Demo/Graphics/PredatorPrey.CPP"$
$LK,"::/Demo/Graphics/Cartesian.CPP"$
@@ -75,6 +74,7 @@ $LK,"::/Demo/MultiCore/MPAdd.CPP"$
$LK,"::/Demo/MultiCore/Lock.CPP"$
$LK,"::/Demo/MultiCore/Clouds.CPP"$
$LK,"::/Demo/Graphics/SliderCtrl.CPP"$
$LK,"::/Demo/Graphics/WallPaperCtrl.CPP"$ //Press SHIFT-F5 to Adam Include
$LK,"::/Demo/Graphics/ScrollBars.CPP"$
$LK,"::/Demo/RegistryDemo.CPP"$
$LK,"::/Demo/Games/BugBird.CPP"$
@@ -94,7 +94,7 @@ $MA-X+PU,"::/Apps/AfterEgypt",LM="Cd(\"::/Apps/AfterEgypt\");Dir;View;\n"$
$LK,"::/Demo/Games/Varoom.CPP"$
$LK,"::/Demo/Graphics/Shading.CPP"$
$LK,"::/Demo/Graphics/Transform.CPP"$
$LK,"::/Demo/Games/BulgeBomber.CPP"$
$LK,"::/Demo/Games/BomberGolf.CPP"$
$LK,"::/Demo/Graphics/Shadow.CPP"$
$LK,"::/Demo/Graphics/Pick3D.CPP"$
$MA-X+PU,"::/Apps/ToTheFront",LM="Cd(\"::/Apps/ToTheFront\");Dir;View;\n"$
@@ -113,13 +113,13 @@ $LK,"::/Demo/Games/CastleFrankenstein.CPP"$
$LK,"::/Demo/Games/EagleDive.CPP"$
$MA-X+PU,"::/Apps/Strut",LM="Cd(\"::/Apps/Strut\");Dir;View;\n"$
$MA-X+PU,"::/Apps/Span",LM="Cd(\"::/Apps/Span\");Dir;View;\n"$
$MA-X+PU,"::/Apps/MusicOrgan",LM="Cd(\"::/Apps/MusicOrgan\");Dir;View;\n"$
$MA-X+PU,"::/Apps/Psalmody",LM="Cd(\"::/Apps/Psalmody\");Dir;View;\n"$
$ID,-2$$TR,"Non-Game"$
$ID,2$$LK,"::/Misc/MakeDistro.CPP"$
$LK,"::/Demo/DbgDemo.CPP"$
$LK,"::/Demo/SubSwitch.CPP"$
$LK,"::/Demo/DateTime.CPP"$
$LK,"::/Demo/ReverseFileExample/Reverse.CPP.Z"$.
$LK,"::/Demo/ReverseFileExample/Reverse.CPP"$.
$LK,"::/Demo/SortFileExample/F64FileGen.CPP"$
$LK,"::/Demo/SortFileExample/F64FileSort.CPP"$
$LK,"::/Demo/PhoneNumWords.CPP"$
@@ -140,33 +140,35 @@ $LK,"::/Demo/WebLogExample/WebLogScramble.CPP"$
$MA-X+PU,"::/Apps/TimeClock",LM="Cd(\"::/Apps/TimeClock\");Dir;View;\n"$
$MA-X+PU,"::/Apps/Logic",LM="Cd(\"::/Apps/Logic\");Dir;View;\n"$
$MA-X+PU,"::/Demo/Lectures",LM="Cd(\"::/Demo/Lectures\");Dir;View;\n"$
$MA-X+PU,"::/Apps/Budget",LM="Cd(\"::/Apps/Budget\");Dir;View;\n"$
$ID,-2$$TR,"TempleOS Specific"$
$ID,2$$MA-X+PU,"::/Demo/OldSchool",LM="Cd(\"::/Demo/OldSchool\");Dir;View;\n"$
$MA-X+PU,"::/Demo/AutoFile",LM="Cd(\"::/Demo/AutoFile\");Dir;View;\n"$
$ID,2$$MA-X+PU,"::/Demo/AutoFile",LM="Cd(\"::/Demo/AutoFile\");Dir;View;\n"$
$LK,"::/Demo/Print.CPP"$
$LK,"::/Demo/SubIntAccess.CPP"$
$LK,"::/Demo/ParenWarn.CPP"$
$LK,"::/Demo/CompileDemo.CPP"$
$LK,"::/Demo/Prompt.CPP"$
$LK,"::/Demo/ClassMeta.CPP"$
$LK,"::/Demo/Doc/Form.CPP"$
$LK,"::/Demo/Doc/MenuButton.CPP"$
$LK,"::/Demo/Doc/MenuSprite.CPP"$
$LK,"::/Demo/Doc/TreeDemo.CPP"$
$LK,"::/Demo/LastClass.CPP"$
$LK,"::/Demo/DolDoc/Form.CPP"$
$LK,"::/Demo/DolDoc/MenuButton.CPP"$
$LK,"::/Demo/DolDoc/MenuSprite.CPP"$
$LK,"::/Demo/DolDoc/ClickCallBack.CPP"$
$LK,"::/Demo/DolDoc/TreeDemo.CPP"$
$LK,"::/Demo/Exceptions.CPP"$
$LK,"::/Demo/Dsk/SerializeTree.CPP"$
$LK,"::/Demo/StkGrow.CPP"$
$LK,"::/Demo/Doc/TextDemo.CPP"$
$LK,"::/Demo/Doc/CursorMove.CPP"$
$LK,"::/Demo/Doc/DemoDoc.TXT"$
$LK,"::/Demo/DolDoc/TextDemo.CPP"$
$LK,"::/Demo/DolDoc/CursorMove.CPP"$
$LK,"::/Demo/DolDoc/DemoDoc.TXT"$
$LK,"::/Demo/Spy.CPP"$
$LK,"::/Demo/Doc/FileRead.CPP"$
$LK,"::/Demo/Doc/Data.CPP"$
$LK,"::/Demo/Doc/DefineStr.CPP"$
$LK,"::/Demo/Doc/CallBack.CPP"$
$LK,"::/Demo/DolDoc/FileRead.CPP"$
$LK,"::/Demo/DolDoc/Data.CPP"$
$LK,"::/Demo/DolDoc/DefineStr.CPP"$
$LK,"::/Demo/DolDoc/CallBack.CPP"$
$LK,"::/Demo/Define.CPP"$
$LK,"EdRenumAsm",A="MN:EdRenumAsm"$
$LK,"::/Demo/Doc/UnusedDefine.CPP"$
$LK,"::/Demo/DolDoc/UnusedDefine.CPP"$
$LK,"::/Demo/Asm/AsmHelloWorld.CPP"$
$LK,"::/Demo/Asm/BuzzFizz.CPP"$
$LK,"::/Demo/Asm/PutDec.CPP"$
@@ -178,5 +180,4 @@ $LK,"::/Demo/Asm/AsmAndC3.CPP"$
$LK,"::/Demo/GlblVars.CPP"$
$LK,"::/Misc/OSTestSuite.CPP"$
$MA-X+PU,"::/Adam",LM="Cd(\"::/Adam\");Dir;View;\n"$
$ID,-2$
-5
View File
@@ -1,5 +0,0 @@
$WW,1$A TempleOS document is a $LK,"Circular Queue",A="HI:Data Types/Circular Queue"$ of cmds and graphics. See $LK,"Dollar Cmds",A="FI:::/Doc/Dollar.TXT"$ and $LK,"ST_DOC_CMDS",A="MN:ST_DOC_CMDS"$. See $LK,"CDocEntry",A="MN:CDocEntry"$ for the entry structure. See $LK,"TipOfDay",A="MN:TipOfDay"$() for a nice example.
There is one document format for the editor/ viewer/ browser/ cmd line.
There is one $LK,"CDoc",A="MN:CDoc"$ for the border, and a pair for double buffering. See $LK,"::/Demo/Spy.CPP"$.
+5
View File
@@ -0,0 +1,5 @@
$WW,1$A $LK,"DolDoc",A="FI:::/Doc/DolDocOverview.TXT"$ in memory is a $LK,"Circular Queue",A="HI:Data Types/Circular Queue"$ of cmds and graphics. See $LK,"CDocEntry",A="MN:CDocEntry"$ for the entry structure. See $LK,"TipOfDay",A="MN:TipOfDay"$() for a nice example.
$LK,"DolDoc",A="FI:::/Doc/DolDocOverview.TXT"$'s are used for the editor, viewer, browser, and cmd line.
There is one $LK,"CDoc",A="MN:CDoc"$ for the task's border: $FG,2$Fs->border_doc$FG$. There is a pair for the task's client area: $FG,2$Fs->put_doc$FG$ and $FG,2$Fs->display_doc$FG$. You can, optionally, do double buffering, otherwise $FG,2$Fs->put_doc$FG$ is the same as $FG,2$Fs->display_doc$FG$. See $LK,"::/Demo/Spy.CPP"$.
+272
View File
@@ -0,0 +1,272 @@
$WW,1$$FG,5$$TX+CX,"DolDoc Overview"$$FG$
DolDoc is a propriatary TempleOS document type supported by $LK,"DolDoc Routines",A="HI:DolDoc"$. In a document, commands are bracketed with '$FG,2$$$$FG$'s. Use $FG,2$<CTRL-l>$FG$ to experiment inserting a command. Then, use $FG,2$<CTRL-t>$FG$ to toggle to plain text to see it.
Here is the grammar:
<DolDocCmd> := $FG,2$$$$FG$<$LK,"TwoLetterCmd",A="FF:::/Adam/DolDoc/DocInit.CPP,ST_DOC_CMDS"$>[<FlagList>][$FG,2$,$FG$<ArgList>]$FG,2$$$$FG$ | $FG,2$$$$FG$$LK,"ColorName",A="MN:ST_COLORS"$$FG,2$$$$FG$
<FlagList> := $FG,2$+$FG$|$FG,2$-$FG$ <$LK,"FlagCode",A="FF:::/Adam/DolDoc/DocInit.CPP,ST_DOC_FLAGS"$>[$FG$<FlagList>]
<ArgList> := <$LK,"ArgCode",A="FF:::/Adam/DolDoc/DocInit.CPP,ST_DOC_FLAGS"$>$FG,2$=$FG$<ArgExpression>$FG,2$,$FG$<ArgList> | <$LK,"ArgCode",A="FF:::/Adam/DolDoc/DocInit.CPP,ST_DOC_FLAGS"$>$FG,2$=$FG$<ArgExpression>
The format of DolDoc cmds is a two character code, +/-flags, a comma and args separated by commas. Some commands have mandatory args. Optional args are indicated with <$LK,"ArgCode",A="FF:::/Adam/DolDoc/DocInit.CPP,ST_DOC_FLAGS"$>$FG,2$=$FG$. A $LK,"ColorName",A="MN:ST_COLORS"$ bracked by dollars, will change the foreground color.
See $LK,"::/Doc/Widget.TXT"$ and $LK,"::/Demo/DolDoc/DemoDoc.TXT"$.
<$LK,"TwoLetterCmd",A="FF:::/Adam/DolDoc/DocInit.CPP,ST_DOC_CMDS"$> See $LK,"Type Defines",A="MN:DOCT_TEXT"$ and $LK,"PrsDollarCmd",A="MN:PrsDollarCmd"$().
$TR,"TX Text"$
$ID,2$Normally, text is not bracketed with '$FG,2$$$$FG$', but if you wish to specify flag attr, such as centering text, you can bracket them with '$FG,2$$$$FG$' and enter flags such as "$FG,2$+CX$FG$". You can't edit them normally if they are bracketed by '$FG,2$$$$FG$' unless you toggle to plain text mode with $FG,2$<CTRL-t>$FG$.
$ID,-2$$TR,"CR Hard Carriage Return (New Line)"$
$ID,2$New lines are normally not bracketed with '$FG,2$$$$FG$'.
$ID,-2$$TR,"SR Soft Carriage Return (New Line)"$
$ID,2$Word wrap uses temporary soft new lines. Users never place soft new lines.
$ID,-2$$TR,"CU Cursor pos"$
$ID,2$The cursor pos is stored as a ASCII#5 character and is not bracketed with '$FG,2$$$$FG$'. Users normally do not enter cursor pos.
$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$$TR,"PB Page Break"$
$ID,2$Page break.
$ID,-2$$TR,"DA Data"$
$ID,2$Used for forms that prompt for data. Use $FG,2$<CTRL-l>$FG$ as a resource editor to help you generate the text you need in your "$FG,2$fmtstr$FG$" cmd in a $FG,2$class$FG$. If you add it directly with $LK,"DocPrint",A="MN:DocPrint"$(), you'll need to fill-in the data addr. See $LK,"DocFormDo",A="MN:DocFormDo"$() and $LK,"::/Demo/DolDoc/Form.CPP"$.
The default data-type for the $FG,2$$$DA...$$$FG$ command is $FG,2$I64$FG$. You can change it to $FG,2$I8$FG$, $FG,2$U8$FG$, $FG,2$I16$FG$, $FG,2$U16$FG$, $FG,2$I32$FG$, $FG,2$U32$FG$, $FG,2$I64$FG$, $FG,2$U64$FG$, or $FG,2$F64$FG$. See $LK,"DocDataFmt",A="MN:DocDataFmt"$() and $LK,"DocDataScan",A="MN:DocDataScan"$().
The $LK,"CDocEntry",A="MN:CDocEntry"$.aux_str arg $FG,2$A=""$FG$ is used for the format string.
If there is a ':', the space after the first ':' in the format string marks the first valid cursor pos. See $LK,"Data Tag Width",A="FA:::/Adam/DolDoc/DocPlain.CPP,DataTagWidth"$.
$ID,-2$$TR,"PL Page Length"$
$ID,2$Page length.
$ID,-2$$TR,"LM Left Margin"$
$ID,2$Left margin.
$ID,-2$$TR,"RM Right Margin"$
$ID,2$Right margin.
$ID,-2$$TR,"HD Header"$
$ID,2$Top margin.
$ID,-2$$TR,"FO Footer"$
$ID,2$Bottom margin.
$ID,-2$$TR,"ID Indent +/- num"$
$ID,2$Changes the indentation deeper if positive, or shallower if negative. It effects the behavior of trees.
$FG,2$$$ID,2$$$FG$ indents 2 columns.
$ID,-2$$TR,"Text Colors"$
$ID,2$You place an expression(usually a color define--see $LK,"color defines",A="MN:BLACK"$) to indicate which of the 16 colors to use. If you enter no num, color returns to the default.
$FG,2$FD$FG$ Default Foreground Color
$FG,2$BD$FG$ Default Background Color
$FG,2$FG$FG$ Foreground Color
$FG,2$BG$FG$ Background Color
$FG,2$$$FD,BLUE$$$FG$ will set the default foreground color to BLUE.
$ID,-2$$TR,"PT User Prompt"$
$ID,2$Start of a user prompt.
$ID,-2$$TR,"WW Word Wrap"$
$ID,2$Include a $FG,2$1$FG$ or $FG,2$0$FG$.
$FG,2$$$WW,1$$$FG$ turns word-wrap on.
$ID,-2$$TR,"UL Underline"$
$ID,2$Include a $FG,2$1$FG$ or $FG,2$0$FG$.
$FG,2$$$UL,1$$$FG$ turns underline on.
$ID,-2$$TR,"IV Invert"$
$ID,2$Include a $FG,2$1$FG$ or $FG,2$0$FG$.
$FG,2$$$IV,1$$$FG$ turns invert on.$FG$
$ID,-2$$TR,"BK Blink"$
$ID,2$Include a $FG,2$1$FG$ or $FG,2$0$FG$.
$FG,2$$$BK,1$$$FG$ turns blink on.
$ID,-2$$TR,"SX Shift X pos"$
$ID,2$Include a num from $FG,2$-7$FG$ to $FG,2$7$FG$. Only foreground is shifted. Positive right.
$FG,2$$$SX,3$$$FG$ shifts characters 3 pixels right.
$ID,-2$$TR,"SY Shift Y pos"$
$ID,2$Include a num from $FG,2$-7$FG$ to $FG,2$7$FG$. Only foreground is shifted. Positive down.
$FG,2$$$SY,3$$$FG$ shifts characters 3 pixels down.$FG$
$ID,-2$$TR,"CM Cursor Movement"$
$ID,2$This has two expressions, one for X offset and one for Y. You can remove one or the other with $FG,2$-LE$FG$ or $FG,2$-RE$FG$.
The expressions are relative to the current cursor location, unless you make them relative to:
$FG,2$+LX$FG$ left
$FG,2$+CX$FG$ center
$FG,2$+RX$FG$ right
$FG,2$+MRX$FG$ margin relative
$FG,2$+TY$FG$ top
$FG,2$+CY$FG$ center
$FG,2$+BY$FG$ bottom
$FG,2$+PRY$FG$ page relative
See $LK,"::/Demo/DolDoc/CursorMove.CPP"$.
$ID,-2$$TR,"AN Anchor"$
$ID,2$The $LK,"CDocEntry",A="MN:CDocEntry"$.aux_str arg $FG,2$A=""$FG$ is used for the anchor. I don't use these very often, but they're good sometimes.
$ID,-2$$TR,"LK Link"$
$ID,2$The $LK,"CDocEntry",A="MN:CDocEntry"$.aux_str arg $FG,2$A=""$FG$ is used for the link text. With no aux the tag becomes the link text, as in example 3.
See $LK,"Link Types",A="MN:LK_FILE"$.
Examples: <CTRL-t> to see
1)$LK,"File link to HelpIndex.TXT",A="::/Doc/HelpIndex.TXT"$
2)$LK,"File link to HelpIndex.TXT with link type file",A="FI:::/Doc/HelpIndex.TXT"$
3)File link with same tag str. $LK,"::/Doc/HelpIndex.TXT"$
4)$LK,"File find link searching for 'Admin'",A="FF:::/Doc/HelpIndex.TXT,Admin"$
5)$LK,"File find link searching for 5th 'CTRL'",A="FF:::/Kernel/Adam1a.HPP,CTRL:5"$
6)$LK,"Manual page link",A="MN:Print"$
7)$LK,"File line num link",A="FL:::/Kernel/Adam1a.HPP,200"$
8)$LK,"File anchor link -- <CTRL-t> to see anchor after you click",A="FA:::/Compiler/CmpInit.CPP,IC_INIT_TABLE"$
9)$LK,"Bible Link",A="BF:Acts,2:3"$ The chapter:verse actually just does a text search.
10) $LK,"Help Index Link",A="HI:Doc"$.
11) $LK,"Address Link",A="AD:0x10000"$.
12) For in-memory document address links, see $LK,"SpriteEdText",A="MN:SpriteEdText"$().
$ID,-2$$TR,"BT Button"$
$ID,2$See $LK,"::/Demo/DolDoc/MenuButton.CPP"$.
$ID,-2$$TR,"CB Check Box"$
$ID,2$Used for forms. Use $FG,2$<CTRL-l>$FG$ as a resource editor to help you generate the text you need in your "$FG,2$fmtstr$FG$" cmd in a $FG,2$class$FG$. If you add it directly with $LK,"DocPrint",A="MN:DocPrint"$(), you'll need to fill-in the data addr. See $LK,"DocFormDo",A="MN:DocFormDo"$(), $LK,"CEdFindText",A="MN:CEdFindText"$ and $LK,"::/Demo/DolDoc/Form.CPP"$.
The default data-type for the $FG,2$$$CB...$$$FG$ command is $FG,2$I8$FG$ which is $FG,2$Bool$FG$. You can change it to $FG,2$I8$FG$, $FG,2$U8$FG$, $FG,2$I16$FG$, $FG,2$U16$FG$, $FG,2$I32$FG$, $FG,2$U32$FG$, $FG,2$I64$FG$, or $FG,2$U64$FG$. See $LK,"DocDataFmt",A="MN:DocDataFmt"$() and $LK,"DocDataScan",A="MN:DocDataScan"$().
$ID,-2$$TR,"MA Macro"$
$ID,2$A left macro arg, $FG,2$LM=""$FG$, will send text when the left mouse is clicked.
A left auto string, $FG,2$+LA$FG$, flag will cause text to be sent to $LK,"AutoStr",A="MN:AutoStr"$() instead of $LK,"Auto",A="MN:Auto"$(). An AutoStr runs code. Literal text is in quotes and messages are sent with $LK,"Msg",A="MN:Msg"$(). See $MA-X+PU,LM="Dir(\"::/Demo/AutoFile\");View;"$.
Macro's are usually in your $LK,"HOME/PersonalMenu.TXT"$ and have the '$FG,2$+X$FG$' flag set by $LK,"default",A="MN:DocInit"$. Adding '$FG,2$-X$FG$' prevents the usual $FG,2$<ESC>$FG$ from being sent (which exits the PersonalMenu screen). Note: When you click a macro on the cmd line, it will go to the bottom and execute unless you cancel the $FG,2$<ESC>$FG$ with a '$FG,2$-X$FG$'.
$ID,-2$$TR,"MU Menu Value"$
$ID,2$A left expression arg, $FG,2$LE=<Exp>$FG$, will return a number when clicked with the left mouse.
See $LK,"PopUpRangeI64",A="MN:PopUpRangeI64"$().
$ID,-2$$TR,"HX Hex Edit"$
$ID,2$See $LK,"DocD",A="MN:DocD"$().
$ID,-2$$TR,"TR Tree Widget"$
$ID,2$A tree widget is a branch in a collapsable tree. The domain of the branch extends from the first +indent until enough -indents bring it back to where it started. Tree's begin collapsed unless a $FG,2$-C$FG$ flag is present.
You might want to use $LK,"DocPrintAtomic",A="MN:DocPrintAtomic"$().
See $LK,"::/Demo/DolDoc/TreeDemo.CPP"$.
$ID,-2$$TR,"LS List Widget"$
$ID,2$Used for forms that prompt for data. You must specify a define list, $FG,2$D=""$FG$. Use $FG,2$<CTRL-l>$FG$ as a resource editor to help you generate the text you need in your "$FG,2$fmtstr$FG$" cmd in a $FG,2$class$FG$. If you add it directly with $LK,"DocPrint",A="MN:DocPrint"$(), you'll need to fill-in the data addr. See $LK,"DocFormDo",A="MN:DocFormDo"$() and $LK,"::/Demo/DolDoc/Form.CPP"$.
The default data-type for the $FG,2$$$LS...$$$FG$ command is $FG,2$I64$FG$. You can change it to $FG,2$I8$FG$, $FG,2$U8$FG$, $FG,2$I16$FG$, $FG,2$U16$FG$, $FG,2$I32$FG$, $FG,2$U32$FG$, $FG,2$I64$FG$, or $FG,2$U64$FG$. See $LK,"DocDataFmt",A="MN:DocDataFmt"$() and $LK,"DocDataScan",A="MN:DocDataScan"$().
$ID,-2$$TR,"SP Sprite"$
$ID,2$Insert a sprite into text with $FG,2$<CTRL-r>$FG$. The cursor location at the time you press $FG,2$<CTRL-r>$FG$ is critical because the sprite will be offset from that location. This is important when adding images to programs. Numbers for sprites are automatically chosen because copying to and from the clipboard requires this. You can insert another sprite with the same image by hitting $FG,2$<CTRL-t>$FG$ and manually adding a $FG,2$$$SP...$$$FG$ entry with the same $FG,2$BI=$FG$ num.
You can add a text tag to the $FG,2$$$SP...$$$FG$ cmd by manually adding text into the $FG,2$$$SP...$$$FG$ cmd, as in $FG,2$$$SP,"pic 2",BI=2$$$FG$. If you enter a tag of the form $FG,2$"<1>"$FG$ then the number in the tag will be updated to match the $FG,2$BI=$FG$ number.
$ID,-2$$TR,"IB Insert Binary"$
$ID,2$Tells the compiler to insert a pointer to some binary data stored after the end of text in the document. There is just one type of binary data in DOC's at this point -- sprites -- created with $FG,2$<CTRL-r>$FG$. They have a number associated with them. This number is automatically chosen, because copying to the clip-board and back requires renuming. To use a $FG,2$$$IB...$$$FG$ cmd, toggle to plain text ($FG,2$<CTRL-t>$FG$) after inserting a sprite and check the number in the $FG,2$$$SP...$$$FG$ cmd. Create a $FG,2$$$IB...$$$FG$ cmd with the same $FG,2$BI=$FG$ number and the sprite will be inserted into the compiled stream like a string const.
You can, optionally, include tag text to be displayed for the $FG,2$$$IB...$$$FG$ cmd. If you set the tag to "<1>", then the editor will automatically update the tag if the $FG,2$BI=$FG$ number changes.
The reason for the $FG,2$$$IB...$$$FG$ cmd is to pass a arg to $LK,"Sprite",A="MN:Sprite"$() and $LK,"Sprite3",A="MN:Sprite3"$(). See $LK,"::/Demo/Graphics/SpritePlot.CPP"$.
$ID,-2$$TR,"IS Insert Binary Size"$
$ID,2$Inserts a number into the compiled stream describing the size of binary data associated with a bin number. I never use this.
$ID,-2$$TR,"SO Song"$
$ID,2$See $LK,"Play",A="MN:Play"$(). $LK,"CDocEntry",A="MN:CDocEntry"$.aux_str $FG,2$A=""$FG$ stores the song note text.
$ID,-2$$TR,"HL Highlighting"$
$ID,2$Include a $FG,2$1$FG$ or $FG,2$0$FG$.
$FG,2$$$HL,1$$$FG$ will turn syntax highlighting on.
$ID,-2$$TR,"HC html"$
$ID,2$The $LK,"ToHtml",A="MN:ToHtml"$() or $LK,"Doc2Html",A="MN:Doc2Html"$() routines will generate a html version of a document. You can cause html code to be injected with $FG,2$HC$FG$. Use the $FG,2$+HTML$FG$ flag to inject a html link.
$ID,-2$$TR,"ER Error"$
$ID,2$When errors are detected in DolDoc cmds, an $FG,2$ER$FG$ entry is generated.
$ID,-2$
<$LK,"FlagCode",A="FF:::/Adam/DolDoc/DocInit.CPP,ST_DOC_FLAGS"$> See $LK,"Flag Defines",A="MN:DOCEf_LEFT_CB"$ and $LK,"DocInit",A="MN:DocInit"$().
$TR,"+H Hold"$
$ID,2$Causes not to delete this cmd when cleared with $FG,2$CL$FG$ or when the doc->max_entries is exceeded. Word wrap is a good to hold. There is no way to delete these entries, at this point.
$ID,-2$$TR,"+L Link"$
$ID,2$Make a cmd behave as a link. Perhaps, use this on a $FG,2$$$SP...$$$FG$ cmd.
$ID,-2$$TR,"+TR Tree"$
$ID,2$Make a cmd behave as a tree branch. Usually, this is placed on a $FG,2$TX$FG$ entry. The tree extends from the start until another tree entry or when indentation has been expanded and reduced back to the starting value.
A $FG,2$+C$FG$ flag on a tree will start it collapsed.
$ID,-2$$TR,"+LS List"$
$ID,2$Make a cmd behave as a list widget. See above. Usually, this is placed on a $FG,2$TX$FG$ entry.
$ID,-2$$TR,"+PU PopUp"$
$ID,2$A PopUp flag on a $FG,2$MA$FG$ will cause the cmds to run in a new task, a pop-up window.
$ID,-2$$TR,"+C Collapsed"$
$ID,2$A collapsed flag on a $FG,2$TR$FG$ entry will cause it to start collapsed. A $FG,2$-C$FG$ flag will make it start open.
$ID,-2$$TR,"+X <ESC> (Exit)"$
$ID,2$The exit flag will cause a $FG,2$$$MA...$$$FG$ macro to send an $FG,2$<ESC>$FG$ before running to exit the PersonalMenu screen and return to the cmd prompt. Actually, the default $FG,2$$$MA...$$$FG$ has an exit flag set so you add a $FG,2$-X$FG$ to turn-off $FG,2$ESC$FG$, for a $FG,2$+PU$FG$ pop-up macro. If an entry is already at the cmd prompt, the $FG,2$+X$FG$ will movement to the bottom of the window.
$ID,-2$$TR,"+Q <SHIFT-ESC> (Abort Quit)"$
$ID,2$A quit flag is similar to a $FG,2$+X$FG$ except a $FG,2$<SHIFT-ESC>$FG$ instead of an $FG,2$<ESC>$FG$ to exit.
$ID,-2$$TR,"+Z Zero"$
$ID,2$A zero flag on a $FG,2$HX$FG$ entry will cause the offset from zero. A $FG,2$-X$FG$ will show the actual memory addr. By default, $FG,2$HX$FG$ has the zero flag set.
$ID,-2$$TR,"+RD Refresh Data"$
$ID,2$The Refresh Data flag on a $FG,2$DA$FG$ or a $FG,2$CB$FG$ makes the value updated continuously.
$ID,-2$$TR,"+LC Left CallBack"$
$ID,2$See $LK,"::/Demo/DolDoc/ClickCallBack.CPP"$.
$ID,-2$$TR,"+RC Right CallBack"$
$ID,2$See $LK,"::/Demo/DolDoc/ClickCallBack.CPP"$.
$ID,-2$
<$LK,"ArgCode",A="FF:::/Adam/DolDoc/DocInit.CPP,ST_DOC_FLAGS"$> See $LK,"Arg Defines",A="MN:DOCEf_TAG"$.
$TR,"T=\"\" Tag Str"$
$ID,2$Some cmds have a tag by default. See $LK,"TX+T",A="FF:::/Adam/DolDoc/DocInit.CPP,TX+T"$. You can code $FG,2$T="tag_text"$FG$ as just $FG,2$"tag_text"$FG$ with no $FG,2$T=$FG$.
$ID,-2$$TR,"A=\"\" Auxilliary Str"$
$ID,2$Some cmds need auxilliary strings. $FG,2$A="str"$FG$ means an $LK,"CDocEntry",A="MN:CDocEntry"$.aux_str is present. aux_str is used for song note text, link text, anchor text, and $FG,2$$$DA...$$$FG$ format string text.
$ID,-2$$TR,"D=\"\" Define Str"$
$ID,2$A $FG,2$D=""$FG$ means either a $LK,"define",A="HI:Define"$ str indirection is present on a text widget, or a define list is present on a list widget.
For indirection, the tag will be regenerated by substituting the value of a system $FG,2$#define$FG$ or $LK,"DefineLoad",A="MN:DefineLoad"$() string. See $LK,"::/Demo/DolDoc/DefineStr.CPP"$, $LK,"::/Adam/DocDefines.CPP"$ and $LK,"::/Doc/MemOverview.TXT"$.
For $FG,2$LS$FG$ widgets, see $LK,"::/Demo/DolDoc/Form.CPP.Z"$.
$ID,-2$$TR,"HTML=\"\""$
$ID,2$The $LK,"ToHtml",A="MN:ToHtml"$() or $LK,"Doc2Html",A="MN:Doc2Html"$() routines will generate a html version of a document. You can cause html link on an item with $FG,2$HTML=""$FG$.
$ID,-2$$TR,"LE=<Exp> Left Expression"$
$ID,2$Left expression. $FG,2$CM$FG$ has this by default for X offset and you can leave-off the $FG,2$LE=$FG$, just putting the $FG,2$<Exp>$FG$.
See $LK,"::/Demo/DolDoc/MenuButton.CPP"$.
$ID,-2$$TR,"LM=\"\" Left Macro Str"$
$ID,2$Left macro string.
$ID,-2$$TR,"RE=<Exp> Right Expression"$
$ID,2$Right expression. $FG,2$CM$FG$ has this by default for Y offset and you can leave-off the $FG,2$RE=$FG$, just putting the $FG,2$<Exp>$FG$.
See $LK,"::/Demo/DolDoc/MenuButton.CPP"$.
$ID,-2$$TR,"RM=\"\" Right Macro Str"$
$ID,2$Right macro string.
$ID,-2$$TR,"BI=<Exp> Bin Number"$
$ID,2$Binary data item number.
$ID,-2$$TR,"BP=\"\" Bin Ptr"$
$ID,2$The BinPtrLink flags lets you specify a filename and bin num to import a bin$FG$.
$FG,2$$$SP,"<tag>",BI=1,BP="filename,1"$$$FG$ will import bin num "1" from filename.
$FG,2$$$SP,"<1>",BI=1,BP="::/Demo/Graphics/Mountain.CPP.Z,Mountain"$$$FG$ will import bin with tag name "Mountain" from "::/Demo/Graphics/Mountain.CPP.Z".
$ID,-2$$TR,"RT=<raw_data_type>"$
$ID,2$The default data-type for the $FG,2$$$DA...$$$FG$ command is $FG,2$I64$FG$. The default for the $FG,2$$$CB...$$$FG$ command is $FG,2$I8$FG$ which is $FG,2$Bool$FG$.
You can change it to $FG,2$I8$FG$, $FG,2$U8$FG$, $FG,2$I16$FG$, $FG,2$U16$FG$, $FG,2$I32$FG$, $FG,2$U32$FG$, $FG,2$I64$FG$, $FG,2$U64$FG$, or $FG,2$F64$FG$. See $LK,"DocDataFmt",A="MN:DocDataFmt"$() and $LK,"DocDataScan",A="MN:DocDataScan"$().
$ID,-2$$TR,"SX=<Exp> Shift X"$
$ID,2$Shift tag text $FG,2$+$FG$/$FG,2$- 7$FG$ X pixels off the grid.
$ID,-2$$TR,"SY=<Exp> Shift Y"$
$ID,2$Shift tag text $FG,2$+$FG$/$FG,2$- 7$FG$ Y pixels off the grid.
$ID,-2$$TR,"SCX=<Exp> Scroll X"$
$ID,2$Scroll text in a marquee of so many columns.
$ID,-2$$TR,"U=<Exp> User Data"$
$ID,2$User Data.
See $LK,"::/Demo/DolDoc/MenuButton.CPP"$.
$ID,-2$
$FG,5$EXAMPLES:
$FG$<CTRL-t> to see how the following were done.
$UL,1$Underlined$UL,0$ $IV,1$Inverted$IV,0$ $BK,1$Blinking$BK,0$ $SY,-3$super$SY,0$ $SY,0$$SY,3$sub$SY,0$
$TX,"This is a big long scrolling msg.",SCX=10$
$FG,5$Cursor Movements:$FG$
$CM+LX,LE=3,RE=3$Cursor moved 3 rows down and to 3rd column from left.
$CM+RX,LE=-40,RE=3$Note mandatory comma after flags
The following may be changed to modes instead of attr with flags.
$TX+CX,"This is centered"$
$TX+RX,"This is right justified"$
-151
View File
@@ -1,151 +0,0 @@
$WW,1$$FG,5$$TX+CX,"Dollar Sign Cmds"$$FG$
TempleOS has a propriatary rich-text document type. Commands are bracketed with '$$'. Use $FG,2$<CTRL-L>$FG$ to experiment with them. Use $FG,2$<CTRL-T>$FG$ to toggle between plain text and rich text.
The format of '$$' cmds includes a two character code, +/-flags, a comma and args separated by commas. Some commands have mandatory args. Optional args are indicated with $FG,2$flagname=$FG$. A $LK,"color define",A="MN:BLACK"$ bracked by '$$'s, will change the foreground color.
See $LK,"::/Doc/Widget.TXT"$ and $LK,"::/Demo/Doc/DemoDoc.TXT"$.
See $LK,"Doc Type Defines",A="MN:DOCT_TEXT"$ and $LK,"Doc Type Codes",A="FF:::/Adam/Doc/DocInit.CPP,ST_DOC_CMDS"$
$TR,"TX Text"$
$ID,2$Normally, text is not bracketed with "$$", but if you wish to specify flag attr to center text, you can bracket them with "$$" and enter flags such as "$FG,4$+CX$FG$". You can't edit them normally if they are bracketed by "$$" unless you toggle to plain text mode with <CTRL-T>.
$ID,-2$$TR,"CR Hard Carriage Return (New Line)"$
$ID,2$New lines are normally specified without being bracketed with "$$".
$ID,-2$$TR,"SR Soft Carriage Return (New Line)"$
$ID,2$Word wrap uses soft new lines which are not saved. You never place soft new lines by yourself.
$ID,-2$$TR,"TB Tab"$
$ID,2$Tabs are normally not bracketed with "$$", but are stored as ASCII#9.
$ID,-2$$TR,"CU Cursor pos"$
$ID,2$The cursor pos is usually stored as a ASCII#5 character and is not bracketed with "$$". You do not normally enter cursor pos cmds yourself.
$ID,-2$$TR,"ID Indent +/- num"$
$ID,2$This changes the indention deeper if positive, or shallower if negative. It effects the behavior of trees.
$ID,-2$$TR,"DA Data"$
$ID,2$This is primarily used for forms that prompt for data. Use $FG,2$<CTRL-L>$FG$ as a resource editor-type thing to generate the text you need in your "$FG,2$fmtstr$FG$" cmd in a $FG,2$class$FG$. If you add it directly with $LK,"DocPrint",A="MN:DocPrint"$(), you'll need to fill-in the data addr. See $LK,"DocFormDo",A="MN:DocFormDo"$() and $LK,"::/Demo/Doc/Form.CPP"$.
If there is a ':', the space after the first ':' in the format string marks the first valid cursor pos. See $LK,"Data Tag Width",A="FA:::/Adam/Doc/DocPlain.CPP,DataTagWidth"$.
$ID,-2$$TR,"Text Colors"$
$ID,2$You place an expression(usually a color define--see $LK,"color defines",A="MN:BLACK"$) to indicate which of the 16 colors to use. If you enter no num, color returns to the default.
$FG,5$FD$FG$ Default Foreground Color
$FG,5$BD$FG$ Default Background Color
$FG,5$FG$FG$ Foreground Color
$FG,5$BG$FG$ Background Color
$ID,-2$$TR,"CL clear"$
$ID,2$Clear all previous entries except ones with hold($FG,4$+H$FG$) flags. You might want $FG,4$+H$FG$ on word wrap entries. Alternatively, you can use $LK,"DocClear",A="MN:DocClear"$().
$ID,-2$$TR,"PT User Prompt"$
$ID,2$Start of a user prompt.
$ID,-2$$TR,"WW Word Wrap"$
$ID,2$Include a 1 or 0.
$ID,-2$$TR,"HL Highlighting"$
$ID,2$Include a 1 or 0.
$ID,-2$$TR,"UL Underline"$
$ID,2$Include a 1 or 0.
$ID,-2$$TR,"IV Invert"$
$ID,2$Include a 1 or 0.
$ID,-2$$TR,"BK Blink"$
$ID,2$Include a 1 or 0.
$ID,-2$$TR,"SX Shift X pos"$
$ID,2$* Include a num from -7 to 7.
* Only foreground is shifted.
* Positive right.
$ID,-2$$TR,"SY Shift Y pos"$
$ID,2$* Include a num from -7 to 7.
* Only foreground is shifted.
* Positive down.
$ID,-2$$TR,"CM Cursor Movement"$
$ID,2$See $LK,"::/Demo/Doc/CursorMove.CPP"$.
$ID,-2$$TR,"AN Anchor"$
$ID,2$
$ID,-2$$TR,"LK Link"$
$ID,2$By default, links have a separate tag text from link text, but with no $FG,4$A=$FG$ entry you can make the link displayed as in example 3.
$LK,"Link Types",A="MN:LK_FILE"$
Examples: <CTRL-T> to see
1)$LK,"File link to HelpIndex.TXT",A="::/Doc/HelpIndex.TXT"$
2)$LK,"File link to HelpIndex.TXT with link type file",A="FI:::/Doc/HelpIndex.TXT"$
3)File link without different tag str.$LK,"::/Doc/HelpIndex.TXT"$
4)$LK,"File find link searching for 'Admin'",A="FF:::/Doc/HelpIndex.TXT,Admin"$
5)$LK,"File find link searching for 5th 'CTRL'",A="FF:::/Kernel/Adam1a.HPP,CTRL:5"$
6)$LK,"Manual page link",A="MN:Print"$
7)$LK,"File line num link",A="FL:::/Kernel/Adam1a.HPP,200"$
8)$LK,"File anchor link -- <CTRL-T> to see anchor after you click",A="FA:::/Compiler/CmpInit.CPP,IC_INIT_TABLE"$
9)$LK,"Bible Link",A="BF:Acts,2:3"$ The chapter:verse actually just does a text search.
10) $LK,"Help Index Link",A="HI:Doc"$.
11) $LK,"Address Link",A="AD:0x10000"$.
$ID,-2$$TR,"BT Button"$
$ID,2$See $LK,"::/Demo/Doc/MenuButton.CPP"$.
$ID,-2$$TR,"CB Check Box"$
$ID,2$
$ID,-2$$TR,"MA Macro"$
$ID,2$Macro's are usually placed into menu/help areas and they have the '$FG,4$+X$FG$' flag set by default. Adding '$FG,4$-X$FG$' prevents the usual $FG,2$<ESC>$FG$ from being sent (which exits the macro screen). Note that when you output a macro to the cmd line, when the user clicks on it, it will go to the bottom and execute it unless you cancel the $FG,2$<ESC>$FG$ with a '$FG,4$-X$FG$'.
$ID,-2$$TR,"MU Menu Value"$
$ID,2$See $LK,"PopUpRangeI64",A="MN:PopUpRangeI64"$().
$ID,-2$$TR,"HX Hex Edit"$
$ID,2$See $LK,"DocD",A="MN:DocD"$().
$ID,-2$$TR,"TR Tree Widget"$
$ID,2$A tree widget is a branch in a collapsable tree. The domain of the branch extends from the first +indent until enough -indents bring it back to where it started. Tree's begin collapsed unless a $FG,4$-C$FG$ flag is present.
$ID,-2$$TR,"SP Sprite"$
$ID,2$Insert a sprite into text with $FG,2$<CTRL-R>$FG$. The cursor location at the time you press $FG,2$<CTRL-R>$FG$ is critical because the sprite will be offset from that location. This is important when adding images to programs. Numbers for sprites are automatically chosen because copying to and from the clipboard requires this. You can insert another sprite with the same image by hitting $FG,2$<CTRL-T>$FG$ and manually adding a $FG,4$$$SP$$$FG$ entry with the same $FG,4$BI=$FG$ num. You can cause the $FG,4$$$SP$$$FG$ cmd to appear with some text associated with it by manually adding text into the $FG,4$$$SP$$$FG$ cmd, as in $FG,4$$$SP,"pic 2",BI=2$$$FG$.
$ID,-2$$TR,"IB Insert Binary"$
$ID,2$This cmd tells the compiler to insert a pointer to some binary data stored after the end of text in the document. There is one type of binary data in DOC's at this point -- sprites -- created with $FG,2$<CTRL-R>$FG$. They have a number associated with them. This number is automatically chosen, because copying to the clip-board and back requires renuming. To use a $FG,4$$$IB$$$FG$ cmd, toggle to plain text ($FG,2$<CTRL-T>$FG$) after inserting a sprite and check the number in the $FG,4$$$SP$$$FG$ cmd. Create a $FG,4$$$IB$$$FG$ cmd with the same $FG,4$BI=$FG$ number and the sprite will be inserted into the compiled stream like a string const. You can, optionally, include tag text to be displayed for the $FG,4$$$IB$$$FG$ cmd.
The reason for the $FG,4$$$IB$$$FG$ cmd is to pass a arg to $LK,"Sprite",A="MN:Sprite"$() and $LK,"Sprite3",A="MN:Sprite3"$(). See $LK,"::/Demo/Graphics/SpritePlot.CPP"$.
$ID,-2$$TR,"IS Insert Binary Size"$
$ID,2$See $FG,4$$$IB$$$FG$. This cmd inserts a number into the compiled stream describing the size of binary data associated with a number.
$ID,-2$$TR,"HC html"$
$ID,2$The $LK,"ToHtml",A="MN:ToHtml"$() or $LK,"Doc2Html",A="MN:Doc2Html"$() routines will generate a html version of a document. You can cause html code to be injected with $FG,5$HC$FG$. Use the $FG,4$+HTML$FG$ flag to inject a html link.
$ID,-2$$TR,"ER Error"$
$ID,2$When errors are detected in dollar cmds, an $FG,5$ER$FG$ entry is generated to hold the garbage so it is not lost.
$ID,-2$
See $LK,"Doc Flag Defines",A="MN:DOCEf1_TAG"$ and $LK,"Doc Flag Codes",A="FF:::/Adam/Doc/DocInit.CPP,ST_DOC_FLAGS"$
See $LK,"dft_flags",A="FF:::/Adam/Doc/DocPlain.CPP,doc_dft_flags1"$.
$TR,"FLAGS"$
$ID,2$$TR,"+H Hold"$
$ID,2$Tells it to not delete it when cleared with $FG,5$CL$FG$ or when the doc->max_entries is exceeded. Word wrap is a good one to hold.
$ID,-2$$TR,"A=\"\" Auxilliary Str"$
$ID,2$Some cmds need other strs. A $FG,4$A=""$FG$ means an auxiliary str is present.
$ID,-2$$TR,"D=\"\" Define Str"$
$ID,2$A $FG,4$D=""$FG$ means a define str is present. The tag will be regenerated by substituting the value of a system $FG,2$#define$FG$ or $LK,"DefineLoad",A="MN:DefineLoad"$() string. See $LK,"::/Demo/Doc/DefineStr.CPP"$.
$ID,-2$$TR,"+TR Tree"$
$ID,2$* Make a tree branch. Usually, this is placed on a text($FG,5$TX$FG$) entry. The tree extends from the start until another tree entry or when indentation has been expanded and reduced back to the starting value.
* A $FG,4$+C$FG$ flag on a tree will start it collapsed.
$ID,-2$$TR,"+PU PopUp"$
$ID,2$A PopUp flag on a macro ($FG,5$MA$FG$) will cause the cmds to run in a new task, a pop-up window.
$ID,-2$$TR,"+C Collapsed"$
$ID,2$A collapsed flag on a tree $FG,5$TR$FG$ entry will cause it to start collapsed. A $FG,4$-C$FG$ flag will make it start open.
$ID,-2$$TR,"+X <ESC> (Exit)"$
$ID,2$* A exit flag will cause a macro to send an $FG,2$<ESC>$FG$ before running(to exit the personal menu screen and return to the cmd prompt). Actually, the default has an exit flag set so you might add a $FG,4$-X$FG$ to turn-off $FG,2$ESC$FG$.
* If an entry is already at the cmd prompt, the $FG,4$+X$FG$ will cause a movement to the bottom of the window.
$ID,-2$$TR,"+Q <SHIFT-ESC> (Abort Quit)"$
$ID,2$A quit flag is similar to a $FG,4$+X$FG$ except a $FG,2$<SHIFT-ESC>$FG$ instead of an $FG,2$<ESC>$FG$ to exit.
$ID,-2$$TR,"+Z Zero"$
$ID,2$A zero flag on a hex edit($FG,5$HX$FG$) entry will cause the offset from zero. A $FG,4$-X$FG$ will show the actual memory addr. By default, $FG,5$HX$FG$ has the zero flag set.
$ID,-2$$TR,"HTML=\"\""$
$ID,2$The $LK,"ToHtml",A="MN:ToHtml"$() or $LK,"Doc2Html",A="MN:Doc2Html"$() routines will generate a html version of a document. You can cause html link on an item with $FG,4$HTML=""$FG$.
$ID,-2$$TR,"BP=\"\""$
$ID,2$The Bin Ptr Link flags lets you specify a filename and bin num to import a bin$FG$. $FG,4$$$SP,"<tag>",BI=1,BP="filename,1"$$$FG$ will import bin num "1" from filename.
$ID,-2$$TR,"+RD Refresh Data"$
$ID,2$The Refresh Data flag on a $FG,5$DA$FG$ or a $FG,5$CB$FG$ makes the value updated continuously.
$ID,-2$$ID,-2$
$FG,5$EXAMPLES:
$FG$<CTRL-T> to see how the following were done.
$UL,1$Underlined$UL,0$ $IV,1$Inverted$IV,0$ $BK,1$Blinking$BK,0$ $SY,-3$super$SY,0$ $SY,0$$SY,3$sub$SY,0$
$TX,"This is a big long scrolling msg.",SCX=10$
$FG,5$Cursor Movements:$FG$
$CM+LX,LE=3,RE=3$Cursor moved 3 rows down and to 3rd column from left.
$CM+RX,LE=-40,RE=3$Note mandatory comma after flags
The following may be changed to modes instead of attr with flags.
$TX+CX,"This is centered"$
$TX+RX,"This is right justified"$
+9 -9
View File
@@ -1,4 +1,4 @@
$WW,1$$FG,5$$TX+CX,"TempleOS' Features"$$FG$
$WW,1$$FG,5$$TX+CX,"TempleOS' Features"$$FG$
* Oracle in program, $FG,2$AfterEgypt$FG$, for $LK,"tongues",A="FI:::/Adam/God/HSNotes.TXT"$.
@@ -16,17 +16,17 @@ $WW,1$$FG,5$$TX+CX,"TempleOS' Features"$$FG$
* Keyboard & Mouse support.
* Hard drives, support for $FG,2$FAT32$FG$ and $LK,"RedSea",A="FI:::/Doc/RedSea.TXT"$ file systems with file compression.
* ATA PIO Hard drives, support for $FG,2$FAT32$FG$ and $LK,"RedSea",A="FI:::/Doc/RedSea.TXT"$ file systems with file compression.
* $FG,2$CD/DVD$FG$ support with $FG,2$ISO9660$FG$ file system. Can make bootable $FG,2$ISO9660$FG$ ISO files so you can roll-your-own distro's.
* ATAPI PIO $FG,2$CD/DVD$FG$ support with $FG,2$ISO9660$FG$ file system. Can make bootable $FG,2$ISO9660$FG$ ISO files so you can roll-your-own distro's.
* $LK,"Partitioning",A="MN:PrtDsk"$ tool, installer, $FG,2$boot loaders$FG$ for CD-ROM and hard disk.
* $FG,2$Editor/Browser$FG$ for a new $LK,"Document Format",A="FI:::/Doc/Dollar.TXT"$. Source files and the command line window can have graphics, links, icons, trees, colors, super/sub scripts, margins. Everything is seamless through-out the tool chain. No need for separate resource files.
* $FG,2$Editor/Browser$FG$ for a new $LK,"Document Format",A="FI:::/Doc/DolDocOverview.TXT"$. Source files and the command line window can have graphics, links, icons, trees, colors, super/sub scripts, margins. Everything is seamless through-out the tool chain. No need for separate resource files.
* 8-bit $FG,2$ASCII$FG$, not just 7-bit. Supported in entire tool chain. $FG,2$<CTRL-ALT-A>$FG$
* 8-bit $FG,2$ASCII$FG$, not just 7-bit. Supported in entire tool chain. $FG,2$<CTRL-ALT-a>$FG$
* $FG,2$Graphics in source code$FG$, no resource files, $FG,2$graphic resource editor$FG$. $FG,2$<CTRL-R>$FG$
* $FG,2$Graphics in source code$FG$, no resource files, $FG,2$graphic resource editor$FG$. $FG,2$<CTRL-r>$FG$
* $FG,2$64-bit pointers$FG$. All memory, even more than 4 Gig, can be directly accessed by all tasks on all cores at all times.
@@ -38,11 +38,11 @@ $WW,1$$FG,5$$TX+CX,"TempleOS' Features"$$FG$
* Auto-completion, jump-to-source tool called $FG,2$WordStat$FG$ with Dictionary.
* Window Manager. Pan screen with $FG,2$<CTRL-LeftDrag>$FG$. Zoom screen on mouse cursor with $FG,2$<CTRL-ALT-Z>$FG$/$FG,2$<CTRL-ALT-SHIFT-Z>$FG$.
* Window Manager. Pan screen with $FG,2$<CTRL-LeftDrag>$FG$. Zoom screen on mouse cursor with $FG,2$<CTRL-ALT-z>$FG$/$FG,2$<CTRL-ALT-SHIFT-Z>$FG$.
* File Manager, $FG,2$<CTRL-D>$FG$.
* File Manager, $FG,2$<CTRL-d>$FG$.
* Code $LK,"profiler",A="MN:ProfAll"$, $LK,"merge",A="MN:Merge"$, $LK,"diff",A="MN:Diff"$ utils.
* Code $LK,"profiler",A="MN:Prof"$, $LK,"merge",A="MN:Merge"$, $LK,"diff",A="MN:Diff"$ utils.
* $FG,2$PC Speaker$FG$ support with many hymns.
+10 -10
View File
@@ -1,33 +1,33 @@
$WW,1$$FG,5$$TX+CX,"File Manager"$$FG$
$FG,2$SHIFT CURSOR$FG$
$FG,2$<SHIFT CURSOR>$FG$
$ID,2$Select files.
$ID,-2$
$FG,2$CTRL-Y or DELETE KEY$FG$
$FG,2$<CTRL-y> or <DELETE>$FG$
$ID,2$Delete file or tree.
$ID,-2$
$FG,2$CTRL-C or CTRL-INS$FG$
$FG,2$<CTRL-c> or <CTRL-INS>$FG$
$ID,2$Copy selected files to clipboard.
$ID,-2$
$FG,2$CTRL-V or SHIFT-INS$FG$
$FG,2$<CTRL-v> or <SHIFT-INS>$FG$
$ID,2$Paste clipboard.
$ID,-2$
$FG,2$LEFT-CLICK,drag-drop$FG$
$ID,2$Move a file or tree to a directory.
$ID,-2$
$FG,2$LEFT-CLICK,same file or <SPACE BAR>$FG$
$FG,2$LEFT-CLICK,same file or <SPACE>$FG$
$ID,2$Edit file.
$ID,-2$
$FG,2$SHIFT-SPACE KEY$FG$
$FG,2$<SHIFT-SPACE>$FG$
$ID,2$Edit Plain Text File.
$ID,-2$
$FG,2$RIGHT-CLICK or <ENTER>$FG$
$ID,2$Bring-up menu.
$ID,-2$
$FG,2$F5$FG$
$FG,2$<F5>$FG$
$ID,2$#include file.
$ID,-2$
$FG,2$SHIFT-F5$FG$
$FG,2$<SHIFT-F5>$FG$
$ID,2$Adam #include file.
$ID,-2$
$FG,2$'r'$FG$
@@ -43,10 +43,10 @@ $FG,2$'f'$FG$
$ID,2$Format drive.
$ID,-2$
$FG,2$'M'$FG$
$ID,2$Make CD/DVD ISO file. This creates a file image of the directory the cursor is on. The name of the ISO file is $LK,"sys_dft_iso_name",A="MN:sys_dft_iso_name"$ and can be redefined in your start-up scripts. You may wish to place it on a different drive.
$ID,2$Make CD/DVD ISO file. This creates a file image of the directory the cursor is on. The name of the ISO file is $LK,"dsk.dft_iso_filename",A="MN:CDskGlbls"$ and can be redefined in your start-up scripts. You may wish to place it on a different drive.
$ID,-2$
$FG,2$'B'$FG$
$ID,2$Burn CD/DVD ISO file. This burns a CD/DVD using the image file, $LK,"sys_dft_iso_name",A="MN:sys_dft_iso_name"$ to the drive the cursor is on.
$ID,2$Burn CD/DVD ISO file. This burns a CD/DVD using the image file, $LK,"dsk.dft_iso_filename",A="MN:CDskGlbls"$ to the drive the cursor is on.
$ID,-2$
$FG,5$Instructions on Using CD/DVD's$FG$
+26
View File
@@ -0,0 +1,26 @@
$WW,1$$FG,5$$TX+CX,"File Utils"$$FG$
File util $LK,"FilesFind",A="MN:FilesFind"$() wildcard mask consists of a single base dir with multiple file masks separated by $FG,2$';'$FG$. The $FG,2$'*'$FG$ and $FG,2$'?'$FG$ wildcard chars are accepted. A $FG,2$'~'$FG$ indicates an exclusion mask.
$FG,2$"/Kernel/*"$FG$ BaseDir: $FG,2$/Kernel$FG$ Mask: $FG,2$*$FG$
$FG,2$"/Demo/*.BMP*;*.GRA*"$FG$ BaseDir: $FG,2$/Demo$FG$ Mask: $FG,2$*.BMP*$FG$ | $FG,2$*.GRA*$FG$
$FG,2$"/*.TXT*;~*Bible*"$FG$ BaseDir: $FG,2$Root$FG$ Mask: $FG,2$*.TXT*$FG$ but not $FG,2$*Bible*$FG$
See $LK,"FilesFindMatch",A="MN:FilesFindMatch"$().
Flags are either text or integer values.
$LK,"FUF_RECURSE",A="MN:FUF_RECURSE"$ $FG,2$+r$FG$ Recurse
$LK,"FUF_SINGLE",A="MN:FUF_SINGLE"$ $FG,2$+s$FG$ Single File (Optimization for one file in mask.)
$LK,"FUF_FLATTEN_TREE",A="MN:FUF_FLATTEN_TREE"$ $FG,2$+f$FG$ use with '$FG,2$+F$FG$'. Just use $FG,2$+F$FG$, probably.
$LK,"FUF_JUST_DIRS",A="MN:FUF_JUST_DIRS"$ $FG,2$+D$FG$ just directories
$LK,"FUF_JUST_FILES",A="MN:FUF_JUST_FILES"$ $FG,2$+F$FG$ just files (Flattens trees)
$LK,"FUF_CLUSTER_ORDER",A="MN:FUF_CLUSTER_ORDER"$ $FG,2$+O$FG$ sort by cluster (move head one direction)
$LK,"FUF_JUST_TXT",A="MN:FUF_JUST_TXT"$ $FG,2$+T$FG$ just text files : $LK,"FILEMASK_TXT",A="MN:FILEMASK_TXT"$
$LK,"FUF_JUST_SRC",A="MN:FUF_JUST_SRC"$ $FG,2$+S$FG$ just src files : $LK,"FILEMASK_SRC",A="MN:FILEMASK_SRC"$
$LK,"FUF_JUST_AOT",A="MN:FUF_JUST_AOT"$ $FG,2$+A$FG$ just aot files : $LK,"FILEMASK_AOT",A="MN:FILEMASK_AOT"$
$LK,"FUF_JUST_JIT",A="MN:FUF_JUST_JIT"$ $FG,2$+J$FG$ just jit files : $LK,"FILEMASK_JIT",A="MN:FILEMASK_JIT"$
$LK,"FUF_JUST_GRA",A="MN:FUF_JUST_GRA"$ $FG,2$+G$FG$ just graphic files : $LK,"FILEMASK_GRA",A="MN:FILEMASK_GRA"$
See $LK,"ST_FILE_UTIL_FLAGS",A="MN:ST_FILE_UTIL_FLAGS"$ when used in calling program taking text flags.
+1 -1
View File
@@ -1 +1 @@
$WW,1$If you require separate global vars for multiple instances of a routine, you can use $FG,4$Frame$FG$s. See $LK,"SpriteMesh",A="MN:SpriteMesh"$(), $LK,"::/Demo/Graphics/Pick3D.CPP"$ or $LK,"Noise",A="MN:Noise"$().
$WW,1$If you require separate global vars for multiple instances of a routine, you can use $FG,4$Frame$FG$s. See $LK,"SpriteMeshEd",A="MN:SpriteMeshEd"$(), $LK,"::/Demo/Graphics/Pick3D.CPP"$ or $LK,"Noise",A="MN:Noise"$().
+167 -175
View File
@@ -1,180 +1,186 @@
$WW,1$$TR,"Abbreviations"$
$ID,2$$FG,5$Abs$FG$ Absolute
$FG,5$Acct$FG$ Account
$FG,5$Addr$FG$ Address
$FG,5$AOT$FG$ Ahead-of-Time
$FG,5$AP$FG$ Application Processor (CPU# > 0)
$FG,5$Arg$FG$ Argument
$FG,5$Attr$FG$ Attribute
$FG,5$Aux$FG$ Auxilliary
$FG,5$Blk$FG$ Block
$FG,5$BSP$FG$ Boot-strap Processor (CPU#0)
$FG,5$Buf$FG$ Buffer
$FG,5$CB$FG$ Call-Back or Code Block
$FG,5$Cfg$FG$ Config
$FG,5$Chg$FG$ Change
$FG,5$Chk$FG$ Check
$FG,5$Const$FG$ Consant
$FG,5$Cmd$FG$ Command
$FG,5$Cmp$FG$ Compiler
$FG,5$Cnt$FG$ Count
$FG,5$Ctrl$FG$ Control. The ctrl key is indicated with "$FG,2$^$FG$" in documentation.
$FG,5$Cur$FG$ Current
$FG,5$Cvt$FG$ Convert
$FG,5$Dbg$FG$ Debug
$FG,5$Dbl$FG$ Double
$FG,5$DC$FG$ Device Context
$FG,5$Del$FG$ Delete
$FG,5$Desc$FG$ Descriptor or Description
$FG,5$Dev$FG$ Device
$FG,5$Dft$FG$ Default
$FG,5$Dir$FG$ Directory, Direction
$FG,5$Doc$FG$ Document
$FG,5$Drv$FG$ Drive
$FG,5$Dsk$FG$ Disk
$FG,5$Dst$FG$ Destination
$FG,5$Ed$FG$ Edit, Editor
$FG,5$Elem$FG$ Element
$FG,5$Evt$FG$ Event
$FG,5$Exe$FG$ Execute
$FG,5$Ext$FG$ Extern or Extended
$FG,5$Feat$FG$ Feature
$FG,5$$FG,5$Fmt$FG$ Format
$FG,5$Fwd$FG$ Forward
$FG,5$fp_$FG$ Function ptr
$FG,5$Fun$FG$ Function
$FG,5$Gen$FG$ Generate
$FG,5$Glbl$FG$ Global
$FG,5$Gr$FG$ Graphic
$FG,5$IDE$FG$ Integrated Drive Electronics, Integrated Development Environment
$FG,5$Ident$FG$ Identifier, Identity
$FG,5$IDT$FG$ Interrupt Descriptor Table
$FG,5$Init$FG$ Initialize
$FG,5$Ins$FG$ Insert
$FG,5$Int$FG$ Interrupt
$FG,5$ip_$FG$ Input Pointer. See $LK,"InputPointer.CPP",A="FI:::/Kernel/KbdMouse/InputPointer.CPP"$.
$FG,5$Irq$FG$ Interrupt (Request)
$FG,5$JIT$FG$ Just-in-Time
$FG,5$Kbd$FG$ Keyboard
$FG,5$KD$FG$ Keyboard Device
$FG,5$Len$FG$ Length
$FG,5$Let$FG$ Letter
$FG,5$Lex$FG$ Lexical Analyser
$FG,5$Loc$FG$ Location, Lines of Code
$FG,5$Log$FG$ Logarithm or Logical
$FG,5$Lst$FG$ List
$FG,5$Man$FG$ Manual
$FG,5$Mem$FG$ Memory
$FG,5$Mgd$FG$ Managed
$FG,5$Mgr$FG$ Manager
$FG,5$Mon$FG$ Month
$FG,5$MP$FG$ MultiProcessor
$FG,5$Msg$FG$ Message
$FG,5$Num$FG$ Number
$FG,5$Obj$FG$ Object
$FG,5$Occ$FG$ Occurrence
$FG,5$CMathODE$FG$ Ordinary Differential Equation
$FG,5$Paren$FG$ Parenthesis
$FG,5$Pix$FG$ Pixel
$FG,5$$FG,5$Pkg$FG$ Package
$FG,5$Pmt$FG$ Prompt
$FG,5$Poly$FG$ Polygon
$FG,5$Pos$FG$ Position
$FG,5$Prec$FG$ Precedence
$FG,5$Prod$FG$ Product or Production
$FG,5$Pri$FG$ Primary
$FG,5$Prt$FG$ Partition
$FG,5$Pt$FG$ Point
$FG,5$Ptr$FG$ Pointer
$FG,5$Que$FG$ Queue
$FG,5$Reg$FG$ Register, Registry or Regular
$FG,5$Rem$FG$ Remove
$FG,5$Rep$FG$ Report
$FG,5$Rqst$FG$ Request
$FG,5$Rst$FG$ Reset
$FG,5$Rot$FG$ Rotation
$FG,5$Rx$FG$ Receive
$FG,5$Sec$FG$ Second or Secondary
$FG,5$$FG,5$Sect$FG$ Sector
$FG,5$Seq$FG$ Sequence
$FG,5$Snd$FG$ Sound
$FG,5$Src$FG$ Source
$FG,5$Srv$FG$ Servant
$FG,5$Stat$FG$ Status or Statistic
$FG,5$Std$FG$ Standard
$FG,5$Stk$FG$ Stack
$FG,5$Str$FG$ String
$FG,5$Sym$FG$ Symbol
$FG,5$Sys$FG$ System
$FG,5$Term$FG$ Terminal
$FG,5$Tri$FG$ Triangle
$FG,5$Tx$FG$ Transmit
$FG,5$Val$FG$ Value
$FG,5$Var$FG$ Variable
$FG,5$Vect$FG$ Vector
$FG,5$Vol$FG$ Volume
$FG,5$Win$FG$ Window
$FG,5$Wiz$FG$ Wizard
$FG,5$WS$FG$ WordStat
$FG,5$WSD$FG$ WordStat Dictionary
$WW,1$$FG,5$$TX+CX,"Glossery"$$FG$
$TR,"Abbreviations"$
$ID,2$$FG,2$Abs$FG$ Absolute
$FG,2$Acct$FG$ Account
$FG,2$Addr$FG$ Address
$FG,2$AOT$FG$ Ahead-of-Time
$FG,2$AP$FG$ Application Processor(CPU#>0)
$FG,2$Arg$FG$ Argument
$FG,2$Asm$FG$ Assemble or Assembly
$FG,2$Attr$FG$ Attribute
$FG,2$Aux$FG$ Auxilliary
$FG,2$BG$FG$ Backround
$FG,2$Bin$FG$ Binary
$FG,2$Blk$FG$ Block
$FG,2$BSP$FG$ Boot-strap Processor(CPU#0)
$FG,2$Buf$FG$ Buffer
$FG,2$Bwd$FG$ Backward
$FG,2$CB$FG$ Call-Back, Code Block
$FG,2$Cfg$FG$ Config
$FG,2$Chg$FG$ Change
$FG,2$Chk$FG$ Check
$FG,2$Const$FG$ Consant
$FG,2$Cmd$FG$ Command
$FG,2$Cmp$FG$ Compiler
$FG,2$Cnt$FG$ Count
$FG,2$Ctrl$FG$ Control. The ctrl key is indicated with "$FG,2$^$FG$" in documentation.
$FG,2$Cur$FG$ Current
$FG,2$Cvt$FG$ Convert
$FG,2$Dbg$FG$ Debug
$FG,2$Dbl$FG$ Double
$FG,2$DC$FG$ Device Context
$FG,2$Del$FG$ Delete
$FG,2$Desc$FG$ Descriptor, Description
$FG,2$Dev$FG$ Device
$FG,2$Dft$FG$ Default
$FG,2$Dir$FG$ Directory, Direction
$FG,2$Doc$FG$ Document
$FG,2$Drv$FG$ Drive
$FG,2$Dsk$FG$ Disk
$FG,2$Dst$FG$ Destination
$FG,2$Ed$FG$ Edit, Editor
$FG,2$Elem$FG$ Element
$FG,2$Evt$FG$ Event
$FG,2$Exe$FG$ Execute
$FG,2$Ext$FG$ Extern, Extended
$FG,2$Feat$FG$ Feature
$FG,2$FG$FG$ Foreground
$FG,2$Fmt$FG$ Format
$FG,2$Fwd$FG$ Forward
$FG,2$FPS$FG$ Frames per Second, First Person Shooter
$FG,2$fp_$FG$ Function ptr
$FG,2$Fun$FG$ Function
$FG,2$Gen$FG$ Generate
$FG,2$Glbl$FG$ Global
$FG,2$Gr$FG$ Graphic
$FG,2$IDE$FG$ Integrated Drive Electronics, Integrated Development Environment
$FG,2$Ident$FG$ Identifier, Identity
$FG,2$IDT$FG$ Interrupt Descriptor Table
$FG,2$Init$FG$ Initialize
$FG,2$Ins$FG$ Insert
$FG,2$Int$FG$ Interrupt
$FG,2$ip_$FG$ Input Pointer. See $LK,"InputPointer.CPP",A="FI:::/Kernel/KbdMouse/InputPointer.CPP"$.
$FG,2$Irq$FG$ Interrupt (Request)
$FG,2$JIT$FG$ Just-in-Time
$FG,2$Kbd$FG$ Keyboard
$FG,2$KD$FG$ Keyboard Device
$FG,2$Len$FG$ Length
$FG,2$Let$FG$ Letter
$FG,2$Lex$FG$ Lexical Analyser
$FG,2$Loc$FG$ Location, Lines of Code
$FG,2$Log$FG$ Logarithm, Logical
$FG,2$Lst$FG$ List
$FG,2$Man$FG$ Manual
$FG,2$Mem$FG$ Memory
$FG,2$Mgd$FG$ Managed
$FG,2$Mgr$FG$ Manager
$FG,2$Mon$FG$ Month
$FG,2$MP$FG$ MultiProcessor
$FG,2$Msg$FG$ Message
$FG,2$Num$FG$ Number
$FG,2$Obj$FG$ Object
$FG,2$Occ$FG$ Occurrence
$FG,2$ODE$FG$ Ordinary Differential Equation
$FG,2$Paren$FG$ Parenthesis
$FG,2$Pix$FG$ Pixel
$FG,2$$FG,2$Pkg$FG$ Package
$FG,2$Poly$FG$ Polygon
$FG,2$Pos$FG$ Position
$FG,2$Prec$FG$ Precedence
$FG,2$Pri$FG$ Primary
$FG,2$Prod$FG$ Product, Production
$FG,2$Prof$FG$ Profile, Profiler
$FG,2$Prt$FG$ Partition
$FG,2$PSect$FG$ Program Section
$FG,2$Pt$FG$ Point
$FG,2$Ptr$FG$ Pointer
$FG,2$Que$FG$ Queue
$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$Rqst$FG$ Request
$FG,2$Rst$FG$ Reset
$FG,2$Rot$FG$ Rotation
$FG,2$Rx$FG$ Receive
$FG,2$Sched$FG$ Sceduler
$FG,2$Sec$FG$ Second, Secondary
$FG,2$$FG,2$Sect$FG$ Sector
$FG,2$Seq$FG$ Sequence
$FG,2$Snd$FG$ Sound
$FG,2$Src$FG$ Source
$FG,2$Srv$FG$ Servant
$FG,2$Stat$FG$ Status, Statistic
$FG,2$Std$FG$ Standard
$FG,2$Stk$FG$ Stack
$FG,2$Str$FG$ String
$FG,2$Sym$FG$ Symbol
$FG,2$Sys$FG$ System
$FG,2$Term$FG$ Terminal
$FG,2$Tri$FG$ Triangle
$FG,2$Tx$FG$ Transmit
$FG,2$Uasm$FG$ Unassemble
$FG,2$Val$FG$ Value
$FG,2$Var$FG$ Variable
$FG,2$Vect$FG$ Vector
$FG,2$Vol$FG$ Volume
$FG,2$Win$FG$ Window
$FG,2$Wiz$FG$ Wizard
$FG,2$WS$FG$ WordStat
$FG,2$WSD$FG$ WordStat Dictionary
$ID,-2$$TR,"Task/Process/Thread"$
$ID,2$There is no distinction between "task", "process" or "thread." The $FG,2$Fs$FG$ segment reg is kept pointing to the current task's $LK,"CTask",A="MN:CTask"$. There is only one window per task.
$ID,2$There is no distinction between $FG,2$task$FG$, $FG,2$process$FG$ or $FG,2$thread$FG$. The $FG,2$Fs$FG$ segment reg is kept pointing to the current task's $LK,"CTask",A="MN:CTask"$. There is only one window per task, and only $FG,2$core#0$FG$ tasks can have windows. Each task has a code and data heap so memory is returned when it dies. Each task has a $LK,"hash",A="HI:Hash"$ symbol table.
$ID,-2$$TR,"Adam Task"$
$ID,2$This is Adam, as in Adam and Eve, the parent of all tasks. This task is created at start-up and appears in the small window at the top beneath the user windows. On it's heap are all memory objects which are system wide. When created, it runs the file $LK,"::/Kernel/Adam1.CPP"$ Normally, Adam1.CPP.Z ends by $FG,2$#include$FG$ $LK,"::/Adam/Adam2.CPP"$ where the remainder of the operating system is "$FG,2$#include$FG$d". When start-up is finished, the adam task enters a server mode where it accepts requests from other tasks. The $LK,"Adam",A="MN:Adam"$("") routine will cause the adam task to compile and run text src code. "$FG,2$#include$FG$" statements can be sent to the $LK,"Adam",A="MN:Adam"$("") routine, creating system-wide code and data which don't disappear when any particular task ends. (The Adam task is immortal.)
$ID,2$This is Adam, as in Adam and Eve, the parent of all tasks and immortal. This task is created at start-up and appears in the small window at the top beneath the user windows. On it's heap are all memory objects which you don't want destroyed by a task's death. When created, Adam runs the file $LK,"::/Kernel/Adam1.CPP"$ Normally, $FG,2$Adam1.CPP.Z$FG$ ends by $FG,2$#include$FG$ $LK,"::/Adam/Adam2.CPP"$ where the remainder of the operating system is $FG,2$#include$FG$d. When start-up is finished, the adam task enters a server mode where it accepts requests from other tasks. The $LK,"Adam",A="MN:Adam"$("") routine will make Adam compile and run text src code. $FG,2$#include$FG$ statements can be sent to $LK,"Adam",A="MN:Adam"$(""), creating system-wide code and data which don't disappear when any particular task ends.
$ID,-2$$TR,"Seth Task"$
$ID,2$This is Seth, as in Adam and Eve's child. Each CPU core has a special task which is immortal and which is special. The Adam task on CPU#0 is also it's Seth task.
$ID,2$$FG,2$Seth$FG$ is Adam and Eve's child. Each CPU core has a special task which is immortal and which is special. The Adam task on $FG,2$CPU#0$FG$ is also it's $FG,2$Seth$FG$ task.
$ID,-2$$TR,"Code and Data Heaps"$
$ID,2$TempleOS uses the asm $FG,2$CALL$FG$ instruction exclusively and it's limited to calling routines +/-2 Gig from the current code location. To prevent out-of-range issues, I decided to separate code and data, placing all code within the lowest 2 Gig of memory. The compiler and $LK,"Load",A="MN:Load"$()er allocate memory from the code heap to store code and glbl vars, unless the compiler option $LK,"OPTf_GLBLS_ON_DATA_HEAP",A="MN:OPTf_GLBLS_ON_DATA_HEAP"$ is used. When programs call $LK,"MAlloc",A="MN:MAlloc"$() is comes from the data heap, which in not limited in size, except by how much physical RAM memory you have. You can allocate from any heap you like, or even make independent heaps.
$ID,-2$$TR,"Parent/Child Task"$
$ID,2$Often a task will $LK,"Spawn",A="MN:Spawn"$() or $LK,"PopUp",A="MN:PopUp"$() a task as a helper. The helper is known as a Child Task, though you can $FG,2$Spawn$FG$ a task and assign it a different parent... like $FG,2$Adam$FG$. Links are kept as to who spawned what so when one task is $LK,"Kill",A="MN:Kill"$()ed the helper tasks disappear, too. You can get a report on current system tasks with $LK,"TaskRep",A="MN:TaskRep"$(). There is just one possible window per task, so child tasks are needed.
$ID,2$TempleOS uses the asm $FG,2$CALL$FG$ instruction, exclusively, and that instruction is limited to calling routines $FG,2$+/-2 Gig$FG$ from the current code location. To prevent out-of-range issues, I decided to separate code and data, placing all code within the lowest $FG,2$2 Gig$FG$ of memory, addresses $FG,2$00000000$FG$-$FG,2$7FFFFFFF$FG$. The compiler and $LK,"Load",A="MN:Load"$()er allocate memory from the code heap to store code and glbl vars, unless the compiler option $LK,"OPTf_GLBLS_ON_DATA_HEAP",A="MN:OPTf_GLBLS_ON_DATA_HEAP"$ is used. When programs call $LK,"MAlloc",A="MN:MAlloc"$() is from the data heap, which in not limited in size, except by physical RAM memory. You can allocate from any heap in any task at any time on any core, even making $LK,"independent",A="MN:MemBlksIndependentAlloc"$ heaps.
$ID,-2$$TR,"Parent, Child and PopUp Tasks"$
$ID,2$Often a task will $LK,"Spawn",A="MN:Spawn"$() or $LK,"PopUp",A="MN:PopUp"$() a task as a helper. The helper is known as a child Task, though you can $LK,"Spawn",A="MN:Spawn"$ a task and assign it a different parent... like $FG,2$Adam$FG$. Links are kept as to who's who's child, so when one task is $LK,"Kill",A="MN:Kill"$()ed the child helper tasks die, too. You can get a report of current system tasks with $LK,"TaskRep",A="MN:TaskRep"$(). There is just one window per task, so child tasks are needed for pop-ups.
$ID,-2$$TR,"HolyC"$
$ID,2$$LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ is more than $FG,2$C$FG$ and less than $FG,2$C++$FG$. It has the default args of $FG,2$C++$FG$ and uses $FG,2$class$FG$ in place of $FG,2$struct$FG$. It uses $FG,2$U0,U8,U16,U32,I64$FG$ and $FG,2$I0,I8,I16,I32,I64$FG$ for signed and unsigned integers. It has different $LK,"operator precedence",A="FF:::/Doc/HolyC.TXT,operator precedence"$. It has $FG,2$PASCAL$FG$-like function calls with no parens, but requires an "$FG,2$&$FG,2$$FG$" when referring to function addresses.
$ID,2$$LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ is more than $FG,2$C$FG$ and less than $FG,2$C++$FG$. It has the default args of $FG,2$C++$FG$ and uses $FG,2$class$FG$ in place of $FG,2$struct$FG$. It uses $FG,2$U0,U8,U16,U32,I64$FG$ and $FG,2$I0,I8,I16,I32,I64$FG$ for signed and unsigned integers. It has different $LK,"operator precedence",A="FF:::/Doc/HolyC.TXT,operator precedence"$. It has $FG,2$PASCAL$FG$-like function calls with no parens, but requires an $FG,2$&$FG,2$$FG$ when referring to function addresses.
$ID,-2$$TR,"AOT Compile Mode"$
$ID,2$This term to refers to conventional compilation mode. It is not the preferred mode for this operating system and is discouraged. $FG,2$.PRJ$FG$ files are compiled to $FG,2$.BIN$FG$ files, skipping $FG,2$.OBJ$FG$ files. After compiling, you do a $LK,"Load",A="MN:Load"$() cmd which is available by right-clicking on a link (like from $LK,"Dir",A="MN:Dir"$()). There is no $FG,2$main()$FG$ routine. Instead, statements outside functions are automatically executed upon loading. There is no way to unload except by killing the task. To invoke $FG,2$AOT Compiled Mode$FG$, use the $LK,"Cmp",A="MN:Cmp"$() routine or right-click on a link. The $FG,2$Kernel$FG$ modules and compiler are made in $FG,2$AOT$FG$ compiled mode and stored in $FG,2$Kernel.BIN.C$FG$ and $FG,2$Compiler.BIN.Z$FG$, respectively.
$ID,2$$FG,2$Ahead-of-Time$FG$ compiling is conventional compilation mode. Do not use $FG,2$AOT$FG$, use $FG,2$JIT$FG$ compiling.
See $LK,"::/Demo/Games/EagleDive.CPP"$ for an example of an $FG,2$AOT$FG$ module.
In $FG,2$AOT$FG$ mode, $FG,2$.PRJ$FG$ files are compiled to $FG,2$.BIN$FG$ files, skipping $FG,2$.OBJ$FG$ files. After compiling, $FG,2$.BIN$FG$ files are $LK,"Load",A="MN:Load"$()ed.
There is no $FG,2$main()$FG$ routine. Instead, statements outside functions are automatically executed upon loading. There is no way to unload except by killing the task. To invoke $FG,2$AOT Compiled Mode$FG$, $LK,"Cmp",A="MN:Cmp"$() is used. The $FG,2$Kernel$FG$ module and compiler are made in $FG,2$AOT$FG$ compiled mode. See $LK,"MakeOSPrtBootInstall",A="MN:MakeOSPrtBootInstall"$() which calls $LK,"MakeAll",A="MN:MakeAll"$() where $FG,2$Kernel.BIN.C$FG$ and $FG,2$Compiler.BIN.Z$FG$ are created.
$ID,-2$$TR,"JIT Compile Mode"$
$ID,2$In just-in-time mode, the compiler allocates objects, code and data, from the heap, incrementally. This mode is used during cmd line operations. When you $FG,2$#include$FG$ a file, it is compiled function by function and objects are placed all over in mem. The $LK,"ExeFile",A="MN:ExeFile"$() routine is the same as $FG,2$#include$FG$ but can be placed in programs. $LK,"ExePrint",A="MN:ExePrint"$() routine will compile and run a string.
$ID,2$In $FG,2$just-in-time$FG$ mode, the compiler places code and data in memory allocated from the heap, incrementally, making them immediately ready for in-place execution. This mode is used during cmd line operations. When you $FG,2$#include$FG$ a file, it is compiled function by function and code ends-up all over in the memory, at least in the first 2Gig of memory. The $LK,"ExeFile",A="MN:ExeFile"$() routine is the same as $FG,2$#include$FG$ but can be used in programs. $LK,"ExePrint",A="MN:ExePrint"$() routine will compile and run a string.
$ID,-2$$TR,"Compiler Intermediate Code"$
$ID,2$The compiler generates instructions one step before making actual assembly (machine) language instructions. This code is reverse polish in nature and can be viewed with $LK,"OTrace",A="MN:OTrace"$(). The compiler does not "interpret" code, except in the process of optimization. The assembly language can be viewed when it is compiled with the $LK,"CTrace",A="MN:CTrace"$() routine, or afterward with $LK,"U",A="MN:U"$().
$ID,2$The compiler generates instructions one step before making actual assembly (machine) language instructions. This code is reverse polish stack machine in nature and can be viewed with $LK,"OTrace",A="MN:OTrace"$(). The compiler does not $FG,2$interpret$FG$ code, except in the process of optimization to make the final machine code. Assembly language output can be viewed when code is compiled with the $LK,"CTrace",A="MN:CTrace"$(), or, afterward, with $LK,"U",A="MN:U"$() or $LK,"Uf",A="MN:Uf"$("").
$ID,-2$$TR,"Partition/Drive"$
$ID,2$There is no distinction between "partition" or "drive." They are specified with a single letter from '$FG,2$A$FG$'-'$FG,2$Z$FG$'.
$ID,2$There is no distinction between $FG,2$partition$FG$ or $FG,2$drive$FG$. They are specified with a single letter from $FG,2$A$FG$-$FG,2$Z$FG$.
'$FG,2$:$FG$' is the boot drive.
For commands taking a drive letter as an argument, $FG,2$0$FG$ is the current drive.
For commands taking a drive letter as an argument, char $FG,2$0$FG$ is the current drive.
$ID,-2$$LK,"AutoFile",A="HI:AutoFile"$
$LK,"Define",A="HI:Char/Define"$
$LK,"Hash Table",A="HI:Hash"$
$LK,"Bt, Bts, Btr, Btc, BEqu",A="HI:Bit"$
$LK,"Define",A="HI:Define"$
$LK,"DolDoc",A="FI:::/Doc/DolDocOverview.TXT"$
$LK,"Editor Link Types",A="MN:LK_FILE"$
$LK,"files_find_mask",A="FI:::/Doc/FileUtils.TXT"$
$LK,"Hash Table",A="HI:Hash"$
$LK,"RedSea File System",A="FI:::/Doc/RedSea.TXT"$
$LK,"Sprite",A="HI:Graphics/Sprite"$
$TR,"files_find_mask"$
$ID,2$$LK,"FilesFindMatch",A="MN:FilesFindMatch"$(). An optional directory plus a list of filename masks, as in $FG,2$/Demo/*.TXT.Z;*.CPP.Z$FG$
See $LK,"FUF_RECURSE",A="MN:FUF_RECURSE"$, $LK,"ST_FILE_UTIL_FLAGS",A="MN:ST_FILE_UTIL_FLAGS"$, $LK,"FILEMASK_TXT",A="MN:FILEMASK_TXT"$, $LK,"FILEMASK_SRC",A="MN:FILEMASK_SRC"$, $LK,"FILEMASK_AOT",A="MN:FILEMASK_AOT"$, $LK,"FILEMASK_JIT",A="MN:FILEMASK_JIT"$, and $LK,"FILEMASK_GRA",A="MN:FILEMASK_GRA"$.
$TR,"CLI, STI, PUSHFD, POPFD"$
$ID,2$These are x86 assembly instructions.
$FG,2$CLI$FG$ disable interrupts.
$FG,2$STI$FG$ enable interrupts.
$FG,2$PUSHFD$FG$ pushes the CPU flags.
$FG,2$POPFD$FG$ pops the CPU flags.
$ID,-2$$TR,"Filename Extention Types"$
$ID,2$
$FG,5$*.???.Z$FG$
$ID,2$$FG,5$*.???.Z$FG$
These files are automatically compressed or uncompresses files when read or written.
$FG,5$*.???.C$FG$
Contiguous files--NOT compressed.
$FG,5$*.TXT.Z;*.TXT;*.LOG.Z;*.LOG$FG$
Text Files
$FG,5$*.CPP.Z;*.CPP$FG$
HolyC src files. The default HolyC compiler type is "$FG,2$.CPP.Z$FG$".
HolyC src files. The default HolyC compiler type is $FG,2$.CPP.Z$FG$.
$FG,5$*.PRJ.Z;*.PRJ$FG$
HolyC src files to be compiled $FG,2$AOT$FG$.
$FG,5$*.HPP.Z;*.HPP$FG$
@@ -188,7 +194,7 @@ $FG,5$*.DAT.Z;*.DAT$FG$
$FG,5$*.ISO$FG$
CD-ROM image file--ISO9660.
$FG,5$*.AUT.Z;*.AUT$FG$
"AutoFile" Basically a HolyC program who's stdout goes to the input of a task when $LK,"AutoFile",A="MN:AutoFile"$() is called.
$FG,2$AutoFile$FG$ Basically a HolyC program who's stdout goes to the input of a task when $LK,"AutoFile",A="MN:AutoFile"$() is called.
$FG,5$*.GRA.Z;*.GRA$FG$
Graphics file
@@ -197,9 +203,8 @@ $LK,"FILEMASK_SRC",A="MN:FILEMASK_SRC"$
$LK,"FILEMASK_AOT",A="MN:FILEMASK_AOT"$
$LK,"FILEMASK_JIT",A="MN:FILEMASK_JIT"$
$LK,"FILEMASK_GRA",A="MN:FILEMASK_GRA"$
$ID,-2$$TR,"Naming Convention"$
$ID,2$$FG,5$$FG$The following are rules I stick to. If you work on the operating system, it'd be good to stick with them for uniformity, but you can do what you like. Since there are no "$FG,2$namespaces$FG$" and I don't plan to implement name spaces, I highly recommend putting a 2-3 character module code prefix on syms. e.g. "WS","Doc","Lex"
$ID,2$Since there are no $FG,2$namespaces$FG$ and I don't plan to implement name spaces, I highly recommend putting a 2-3 character module code prefix on syms. e.g. $FG,2$WS$FG$, $FG,2$Doc$FG$, $FG,2$Lex$FG$
$FG,5$ALL_CAPS$FG$
Assembly Language labels are capitalized with underscores between words. So are $FG,2$#define$FG$'s.
@@ -217,39 +222,26 @@ $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.
$FG,5$DOCf_????$FG$
Flags bit nums instead of bit values are designated with a lower case "$FG,2$f$FG$".
Flags bit nums instead of bit values are designated with a lower case $FG,2$f$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$*$FG$ I used C++ like naming. I place "New", "Del", "Init", "Rst", ect. on the end of a function name instead of at the beginning. "$FG,2$RstMusicSettings$FG$" should be "$FG,2$MusicSettingsRst$FG$".
$FG,5$result$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"$
$ID,2$The CPU FS segment reg. This reg points to the current task's $LK,"CTask",A="MN:CTask"$.
$ID,-2$$TR,"Gs"$
$ID,2$The CPU GS segment reg. This reg points to the $LK,"CCPU",A="MN:CCPU"$.
$ID,-2$$TR,"Bt,Bts,Btr,Btc,LBts,LBtr,LBtc"$
$ID,2$These are bit manipulation functions named after x86 instructions. They stand for "Bit Test", "Bit Test and Set", "Bit Test and Reset" and "Bit Test and Compliment". An $FG,2$'L'$FG$ means locked with an ASM lock prefix.
$ID,-2$$TR,"Cli,Sti"$
$ID,2$Turn on or off interrupts. They are named after the x86 instructions. "Cli" turns off interrupts.
$ID,2$The CPU GS segment reg. This reg points to the current core's $LK,"CCPU",A="MN:CCPU"$.
$ID,-2$$TR,"Heap"$
$ID,2$Programs can dynamically request chunks of memory allocated from a "heap" using $LK,"MAlloc",A="MN:MAlloc"$(). They must $LK,"Free",A="MN:Free"$() it when finished. Ptrs are used to refer to it. The "heap" is dynamically allocated mem.
$ID,2$Programs can dynamically request chunks of memory allocated from a $FG,2$heap$FG$ using $LK,"MAlloc",A="MN:MAlloc"$(). They must $LK,"Free",A="MN:Free"$() it when finished. Ptrs are used to refer to the chunk. The $FG,2$heap$FG$ is dynamically allocated mem.
$ID,-2$$TR,"Root"$
$ID,2$The base of a binary tree or the head of a queue is the root. (I don't like the word "head.")
$ID,2$The base of a binary tree or the head of a queue is the $FG,2$root$FG$. (I don't like the word $FG,2$head$FG$.)
$ID,-2$$TR,"Join"$
$ID,2$When two parts of a program have a common low-level routine, that routine is often labeled SomethingJoin.
$ID,-2$$TR,"user_data"$
$ID,2$Many operating system structures have space set aside for you to store values. You are on your own managing these with multiple applications and libraries.
$ID,-2$$TR,"BSP/AP"$
$ID,2$The "boot-strap processor" is core#0, has the Adam task, and is the master. The "application processors" have Seth tasks and are the slave processors. Only the BSP processor's tasks can have windows.
$ID,-2$$TR,"Multicore BSP/AP Processors"$
$ID,2$The $FG,2$boot-strap processor$FG$ is core#0, has the $FG,2$Adam task$FG$, and it is the master. The $FG,2$application processors$FG$ have Seth tasks and are the slave processors. Only the $FG,2$BSP$FG$ core#0 processor's tasks can have windows. More or less, applications are launched exclusively from the $FG,2$BSP$FG$ processor. It is the master. The only way slave cores get used is if the application explicitly $LK,"Spawn",A="MN:Spawn"$s() a task on them or $LK,"JobQue",A="MN:JobQue"$() a job on them.
$ID,-2$
Binary file not shown.
+26 -22
View File
@@ -1,38 +1,38 @@
$WW,1$$FG,5$$TX+CX,"DIRECTORY STRUCTURE"$$FG$
$WW,1$$FG,5$$TX+CX,"Directory Structure"$$FG$
$FG,2$/Accts$FG$ Each subdirectory is an acct. When you boot, you can select an acct to login to, unless you compile Kernel soas to pick one. Your acct directory is your $FG,2$HOME$FG$ directory and all your user data should be placed in here to ease backing-up your data. When you Install an application it will create a subdirectory of your $FG,2$HOME$FG$ directory for storage.
$FG,2$/Apps$FG$ Applications are placed in subdirectories of $FG,2$/Apps$FG$. Applications should have a file called $FG,2$Install.CPP.Z$FG$ which will install the app for the current user acct. The file, $FG,2$Load.CPP.Z$FG$ will load the application into mem. The file, $FG,2$Run.CPP.Z$FG$, will usually load and execute the app. To add an app to your personal menu, use $FG,2$<CTRL-L>$FG$, insert a macro with the PopUp option checked and invoke the $FG,2$Run.CPP.Z$FG$ file.
$FG,2$/Apps$FG$ Applications are placed in subdirectories of $FG,2$/Apps$FG$. Applications should have a file called $FG,2$Install.CPP.Z$FG$ which will install the app for the current user acct. The file, $FG,2$Load.CPP.Z$FG$ will load the application into mem. The file, $FG,2$Run.CPP.Z$FG$, will usually load and execute the app. To add an app to your PersonalMenu, use $FG,2$<CTRL-l>$FG$, insert a macro with the PopUp option checked and invoke the $FG,2$Run.CPP.Z$FG$ file.
$FG,2$/Demo$FG$ Here you can find lots of sample code to do various things.
$FG,2$/Doc$FG$ Here you can find documentation.
$FG,2$/Kernel$FG$ The core of the operating system is found here. Since priviledge levels are not used, calling it a "$FG,2$kernel$FG$" is deceptive. It is $FG,2$AOT$FG$ compiled by $LK,"MakeOSPrtBootInstall",A="MN:MakeOSPrtBootInstall"$(). It is loaded by the boot loader and must fit in 640K.
$FG,2$/Kernel$FG$ The core of the operating system is found here. Since priviledge levels are not used, calling it a $FG,2$kernel$FG$ is deceptive. It is $FG,2$AOT$FG$ compiled by $LK,"MakeOSPrtBootInstall",A="MN:MakeOSPrtBootInstall"$(). It is loaded by the boot loader and must fit in 640K.
$FG,2$/Compiler$FG$ The compiler module src code is found here. The compiler is $FG,2$AOT$FG$ compiled to produce a binary file which is loaded at boot. It is also $FG,2$AOT$FG$ compiled by $LK,"MakeOSPrtBootInstall",A="MN:MakeOSPrtBootInstall"$().
$FG,2$/Compiler$FG$ The compiler module src code is found here. The compiler is $FG,2$AOT$FG$ compiled to produce a binary file which is loaded at boot. It, too, is $FG,2$AOT$FG$ compiled by $LK,"MakeOSPrtBootInstall",A="MN:MakeOSPrtBootInstall"$().
$FG,2$/Adam$FG$ The non-kernel part of the operating system is found here. It is $FG,2$JIT$FG$ compiled during boot.
$FG,5$$TX+CX,"ACCT FILES"$$FG$
$FG,5$$TX+CX,"Acct Files"$$FG$
You can add and remove accts by making or removing directories in the $FG,2$::/Accts$FG$ directory. An empty account directory should be valid because it will get default files from the parent directory. Compile the $LK,"Kernel",A="MN:MakeOSPrtBootInstall"$ to set the active acct or cause it to prompt an account at boot.
$LK,"HOME/PersonalMenu.TXT"$ a menu viewed with the $FG,2$<CTRL-M>$FG$ key or by clicking "$FG,2$MENU$FG$" in the upper left border area of a window.
$LK,"HOME/PersonalMenu.TXT"$ a menu viewed with the $FG,2$<CTRL-m>$FG$ key or by clicking "$FG,2$MENU$FG$" in the upper left border area of a window.
$LK,"HOME/PersonalNotes.TXT"$ a personal note file viewed with the $FG,2$<CTRL-SHIFT-M>$FG$ key.
$LK,"HOME/DoOnce.CPP"$ a file invoked at the start-up of the first user. Customize this!
$LK,"HOME/Adam3.CPP"$ files invoked when the adam task starts-up. Customize these!
$LK,"HOME/DoOnce.CPP"$ a file invoked at the start-up of the first user. Customize this!
$LK,"HOME/Registry.CPP"$ can be edited by hand or deleted to reset to defaults. Takes affect next boot.
$FG,5$$TX+CX,"APPLICATION POLICIES"$$FG$
$FG,5$$TX+CX,"Application Policies"$$FG$
* Place applications in their own $FG,2$/Apps$FG$ subdirectory.
@@ -42,13 +42,13 @@ $FG,5$$TX+CX,"APPLICATION POLICIES"$$FG$
* Place user data in a subdirectory of $FG,2$HOME$FG$, preferably naming the subdirectory the same as the $FG,2$/Apps$FG$ subdirectory. Or, place data in the $FG,2$Registry.CPP.Z$FG$ file. See $LK,"::/Demo/RegistryDemo.CPP"$.
* Make a file called $FG,2$Install.CPP.Z$FG$ or $FG,2$Install.AUT.Z$FG$ to create the $FG,2$HOME$FG$ subdirectory and do similar stuff.
* If the app needs files in the $FG,2$HOME$FG$ directory, make an $FG,2$/Apps$FG$ file called $FG,2$Install.CPP.Z$FG$ or $FG,2$Install.AUT.Z$FG$ to create the $FG,2$HOME$FG$ subdirectory and do similar stuff.
$FG,5$$TX+CX,"PROGRAMMING GUIDELINES"$$FG$
$FG,5$$TX+CX,"Programming Guidelines"$$FG$
* Virtual mem/Paging is not used -- it is identity mapped in x86_64 mode. The stk does not grow, so allocate enough when the task (process) is $LK,"Spawn",A="MN:Spawn"$ed and use the heap for most things. (The "heap" refers to $LK,"MAlloc",A="MN:MAlloc"$() and $LK,"Free",A="MN:Free"$().)
* Virtual mem/Paging is not used -- it is identity mapped in $FG,2$x86_64$FG$ mode. The stk does not grow, so allocate enough when the task (process) is $LK,"Spawn",A="MN:Spawn"$ed and use the heap for most things. (The $FG,2$heap$FG$ refers to $LK,"MAlloc",A="MN:MAlloc"$() and $LK,"Free",A="MN:Free"$().)
* See $LK,"Naming Convention",A="FF:::/Doc/Glossary.TXT,Naming Convention"$ and $LK,"Abbreviations",A="FF:::/Doc/Glossary.TXT,Abbreviations"$.
@@ -56,11 +56,11 @@ $FG,5$$TX+CX,"PROGRAMMING GUIDELINES"$$FG$
* $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$
* Use $FG,2$I64$FG$ in place of smaller int sizes because the compiler converts everything to 64-bit. Don't use unsigned$FG$ unless it actually breaks. A policy of signed keeps it simple so you don't have to agonize over choices.
* Use $FG,2$I64$FG$ instead of smaller int sizes because the compiler converts everything to 64-bit. Don't use unsigned$FG$ unless it actually breaks. A policy of signed keeps it simple so you don't have to agonize over choices.
* In-order short circuit logic is used, in fact required.
* In-order, short circuit logic is used, in fact required.
* Avoid boolean expression assignments. Boolean assignments don't have short circuit logic and are not compiled efficiently. The $FG,2$Bool$FG$ type is just an alias for a 1 byte signed int -- nothing forces it to 1 or 0. There is a $LK,"ToBool",A="MN:ToBool"$() function that will for to 1 ot 0, however.
* Avoid boolean expression assignments. Boolean assignments don't have short circuit logic and are not compiled efficiently. The $FG,2$Bool$FG$ type is just an alias for a 1 byte signed int -- nothing forces it to $FG,2$1$FG$ or $FG,2$0$FG$. There is a $LK,"ToBool",A="MN:ToBool"$() function that will for to $FG,2$1$FG$ ot $FG,2$0$FG$, however.
* If you use floats in your interrupt routine, save and restore the fpu state with $LK,"Fxsave",A="MN:Fxsave"$() and $LK,"Fxrstor",A="MN:Fxrstor"$(). The timer interrupt does this. The keyboard and mouse don't use floats.
@@ -68,17 +68,17 @@ $FG,5$$TX+CX,"PROGRAMMING GUIDELINES"$$FG$
* $LK,"SysDbg",A="MN:SysDbg"$() and $LK,"IsSysDbg",A="MN:IsSysDbg"$() are really handy when working on the compiler or kernel. It's just a bit you can set and test.
* I don't use "$FG,2$U0 *$FG$" because the size is zero for ptr arithmetic.
* I don't use $FG,2$U0 *$FG$ because the size is zero for ptr arithmetic.
* Use $FG,2$$LK,"CH_SHIFT_SPACE",A="MN:CH_SHIFT_SPACE"$$FG$ for spaces in quotes in source code because I run $LK,"Spaces-to-Tabs",A="FF:::/Adam/Utils/S2T.CPP,S2T"$ on source code.
$FG,5$$TX+CX,"HASH SYM TABLES"$$FG$
$FG,5$$TX+CX,"Hash Sym Tables"$$FG$
* See $LK,"::/Adam/Hash2a.CPP"$ for examples of how the hash tables are set-up. Basically, syms are placed into hash tables and child process hash tables are chained to parents. This provides scopes for vars and functions.
* $FG,2$adam_task->hash_table$FG$ holds the HolyC syms loaded in on start-up.
* $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.
@@ -86,15 +86,15 @@ $FG,5$$TX+CX,"HASH SYM TABLES"$$FG$
$FG,5$$TX+CX,"ASSEMBLY LANGUAGE CONCERNS"$$FG$
$FG,5$$TX+CX,"Assembly Language"$$FG$
* $FG,2$FS$FG$ must always point to the $LK,"CTask",A="MN:CTask"$.
* $FG,2$FS$FG$ must always point to the cur $LK,"CTask",A="MN:CTask"$.
* $FG,2$GS$FG$ must always point to the $LK,"CCPU",A="MN:CCPU"$.
* $FG,2$GS$FG$ must always point to the cur $LK,"CCPU",A="MN:CCPU"$.
* Don't change the segment regs unless interrupts are off. It's hard to do, anyway. $LK,"SET_FS_BASE",A="MN:SET_FS_BASE"$ and $LK,"SET_GS_BASE",A="MN:SET_GS_BASE"$.
* When interacting with compiled code, preserve $FG,2$RBP, RSI, RDI, R10-R15$FG$ because the compiler uses these for reg vars. You are free to clobber $FG,2$RAX, RBX, RCX, RDX$FG$, $FG,2$R8$FG$ and $FG,2$R9$FG$. See $LK,"Compiler Reg Masks",A="MN:REG_VARS_MASK"$.
* When interacting with $LK,"HolyC",A="FI:::/Doc/HolyC.TXT.Z"$ compiled code, preserve $FG,2$RBP, RSI, RDI, R10-R15$FG$ because the compiler uses these for reg vars. You are free to clobber $FG,2$RAX, RBX, RCX, RDX$FG$, $FG,2$R8$FG$ and $FG,2$R9$FG$. See $LK,"Compiler Reg Masks",A="MN:REG_VARS_MASK"$, $LK,"PUSH_C_REGS",A="MN:PUSH_C_REGS"$ and $LK,"POP_C_REGS",A="MN:POP_C_REGS"$
* I recommend using the standard stk frame for functions because $LK,"Caller",A="MN:Caller"$() is used to display the call stk, such as for the wallpaper.
$FG,2$ PUSH RBP
@@ -107,3 +107,7 @@ $FG$
* The args are removed from the stack with $FG,2$RET1$FG$ statements.
$FG,2$RET1 16 //remove two args$FG$
* No args are passed in regs.
* RAX holds function return values, of course.
+2 -2
View File
@@ -1,3 +1,3 @@
$WW,1$There are symbol (hash) tables maintained by each task. When a sym is not found, the parent task's sym table is checked. All process chain back to the $FG,2$Adam$FG$ task.
$WW,1$There is a symbol (hash) tables for each task. When a sym is not found, the parent task's sym table is checked. All tasks chain back to the $FG,2$Adam$FG$ task.
TempleOS sym tables are implemented with an array of linked-lists. A num is generated from a string to index into it. Since multiple strings could generate the same num, a linked-list is built. Usually, newer entries overshadow older ones unless otherwise specified, in which case old entries are removed. There are various types of entries. See $LK,"Hash Entry Types",A="MN:HTT_EXPORT_SYS_SYM"$.
TempleOS sym tables are implemented with an array of linked-lists. A num is generated from a string by $LK,"HashStr",A="MN:HashStr"$() to index into the array of linked-lists. Multiple strings can generate the same num, so linked-lists are built. Newer entries overshadow older ones. There are various types of entries. See $LK,"Hash Entry Types",A="MN:HTT_EXPORT_SYS_SYM"$.
BIN
View File
Binary file not shown.
+3 -3
View File
@@ -1,7 +1,7 @@
$WW,1$$FG,2$#help_index "Topic/SubTopic;OtherTopic"$FG$
The help index preprocessor compiler directive sets the topics for syms subsequently defined. You specify subtopics with a '$FG,2$/$FG$' tree hierarchy and multiple topics separated by a '$FG,2$;$FG$'. The index ctrls $FG,4$HI:topic$FG$ links.
The help index preprocessor compiler directive sets the topics for syms subsequently defined. You specify subtopics with a '$FG,2$/$FG$' tree hierarchy and separate multiple topics with a '$FG,2$;$FG$'. The index ctrls $LK,"HI:index",A="MN:LK_HELP_INDEX"$ links.
$FG,2$public$FG$ can be placed before symbol to make it show.
$FG,2$public$FG$ causes a sym to appear in help_index reports.
$FG,2$#help_file "filename[.TXT.Z]"$FG$
The help file preprocessor directive places a file as the heading text in a $FG,4$HI:topic$FG$ link for the current help index.
The help file preprocessor directive makes a file into the heading of a $LK,"HI:index",A="MN:LK_HELP_INDEX"$ report for the current help index.
+104 -98
View File
@@ -2,11 +2,11 @@ $WW,1$$FG,5$$TX+CX,"HolyC"$$FG$
* See $LK,"Scoping and Linkages",A="FI:::/Doc/ImportExports.TXT"$ for details on $FG,2$extern$FG$, $FG,2$import$FG$, $FG,2$_extern$FG$, $FG,2$_import$FG$, etc.
* See $LK,"::/Doc/Directives.TXT"$.
* See $LK,"::/Doc/CompilerOverview.TXT"$.
* 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.
$FG,2$ U0 void
$FG,2$ U0 void, but ZERO size!
I8 char
U8 unsigned char
I16 short
@@ -20,6 +20,10 @@ $FG,2$ U0 void
* 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$
* 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)
{
@@ -30,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 Demo(char drv,char *fmt,char *name,int age)
$ID,2$$FG,2$void DemoC(char drv,char *fmt,char *name,int age)
{
printf("Hello World!\n");
printf("%s age %d\n",name,age);
@@ -39,7 +43,7 @@ $ID,2$$FG,2$void Demo(char drv,char *fmt,char *name,int age)
putchar('*');
}
U0 Demo(U8 drv,U8 *fmt,U8 *name,I64 age)
U0 DemoHolyC(U8 drv,U8 *fmt,U8 *name,I64 age)
{
"Hello World!\n";
"%s age %d\n",name,age;
@@ -48,20 +52,54 @@ U0 Demo(U8 drv,U8 *fmt,U8 *name,I64 age)
'*';
}
$FG$$ID,-2$
* When dealing with function addresses, precede the name with "$FG,2$&$FG$".
* When dealing with function addresses such as for callbacks, precede the name with "$FG,2$&$FG$".
* There is no $FG,2$main()$FG$ function. Any code outside of functions gets executed on start-up, in order.
* 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.)
* You can access bytes or words within any int. $FG,2$i.u8[2]$FG$ returns bits 24-27 in the variable, $FG,2$i$FG$. See $LK,"I64 declaration",A="MN:I64"$. The real feature is that a class can be accessed as a whole, if you put a type in front of the $FG,2$class$FG$ declaration.
* There is no $FG,2$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.
$ID,2$
$FG,2$public I64i union I64 //"I64i" is intrinsic. We are defining "I64".
{
I8i i8[8];
U8i u8[8];
I16 i16[4];
U16 u16[4];
I32 i32[2];
U32 u32[2];
};
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$'.
$ID,2$$WW,0$
$FG,2$U0 GrPrint(CDC *dc,I64 x,I64 y,U8 *fmt,...)
$FG,2$I64 AddNums(...)
{
U8 *buf=SPrintJoin(NULL,fmt,argc,argv);
GrPrint(dc,x,y,buf);
I64 i,result=0;
for (i=0;i<argc;i++)
result+=argv[i];
return result;
}
$FG$>$FG,2$AddNums(1,2,3);$FG$
ans=6
$FG,2$
public U0 GrPrint(CDC *dc,I64 x,I64 y,U8 *fmt,...)
{
U8 *buf=$LK,"StrPrintJoin",A="MN:StrPrintJoin"$(NULL,fmt,argc,argv);//SPrintF() with $LK,"MAlloc",A="MN:MAlloc"$()ed string.
$LK,"GrPutS",A="MN:GrPutS"$(dc,x,y,buf); //Plot string at x,y pixels. GrPutS is not public.
Free(buf);
}
...
GrPrint(gr.dc,(GR_WIDTH-10*FONT_WIDTH)>>1,(GR_HEIGHT-FONT_HEIGHT)>>1,
"Score:%4d",score); //Print score in the center of the screen.
...
$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$".
$ID,2$
@@ -93,28 +131,58 @@ $ID,2$$FG,2$U0 SubSwitch()
"] ";
break;
}
NewLine;
'\n';
}$FG$$FG$
$BG$OutPut:
>$FG,2$Zero [One] Two [Three] Four [Five]$FG$
$ID,-2$
* $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.
* $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/PageTableEntries2.CPP"$.
* A $FG,2$nounusedwarn$FG$ statement 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.
* 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.)
* $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.
$ID,2$$FG,2$U0 Main()
{
//Only use $LK,"REG_VARS_MASK",A="MN:REG_VARS_MASK"$ or $LK,"REG_NON_PTR_MASK",A="MN:REG_NON_PTR_MASK"$ for reg vars or else clobbered.
I64 reg R15 i=5, noreg j=4;
nounusedwarn i;
asm {
MOV RAX,R15
CALL &PUT_HEX_U64
MOV RAX,'\n'
CALL &PUT_CHARS
MOV RAX,U64 &j[RBP]
CALL &PUT_HEX_U64
MOV RAX,'\n'
CALL &PUT_CHARS
}
}
$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/PageTableEntries2.CPP"$.
* A single quote can encompass multiple characters. $FG,2$'ABC'$FG$ is equal to $FG,2$0x434241$FG$. $LK,"PutChars",A="MN:PutChars"$() takes multiple characters.
$ID,2$$FG,2$asm {
HELLO_WORLD::
PUSH RBP
MOV RBP,RSP
MOV RAX,'Hello '
CALL &PUT_CHARS
MOV RAX,'World\n'
CALL &PUT_CHARS
LEAVE
RET
}
Call(HELLO_WORLD);
PutChars('Hello ');
PutChars('World\n');
$FG$$ID,-2$
* The "$FG,2$`$FG$" operator raises a base to a power.
* There is no question-colon operator.
* TempleOS $LK,"operator precedence",A="FF:::/Compiler/CmpInit.CPP,binary_ops_table"$
* TempleOS $LK,"operator precedence",A="FF:::/Compiler/CmpInit.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$
@@ -142,22 +210,20 @@ $ID,-2$
* Can't use $FG,2$<>$FG$ with $FG,2$#include$FG$, use $FG,2$""$FG$.
* "$FG,2$$$$FG$" is an escape character. Two dollar signs signify an ordinary $$. See $LK,"::/Doc/Dollar.TXT"$. In $FG,2$asm$FG$ or $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ code, it also refers to the instruction's addr.
* "$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 instruction's address or the offset in a $FG,2$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,"Adam1a.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,"DocFormDo",A="MN:DocFormDo"$().
* 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,"ClassRep",A="MN:ClassRep"$().
* 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,"DocFormDo",A="MN:DocFormDo"$() 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 a 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"$. $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.
* 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$
* There is no $FG,2$continue$FG$ statement. Use $FG,2$goto$FG$.
* No bit field support, but there are bit access $LK,"library routines",A="HI:Bit"$.
* $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 instructions 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 allocated 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.
@@ -168,86 +234,26 @@ $ID,-2$
* Only one base class is allowed.
* $FG,2$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$The follow examples should be inserted in a function, so that reg variables are used. (Global vars are never reg.)
$ID,2$$FG,2$U0 Main()
{
I16 i1;
I32 j1;
j1=i1=0x12345678; //Resulting i1 is 0x5678 but j1 is 0x12345678
$FG,2$I16 i;
I32 j;
j=i=0x12345678; //Resulting i is 0x5678 but j is 0x12345678
I64 i2=0x8000000000000000;
Print("%X\n",i2>>1); //Result is 0xC000000000000000 as expected
I64 i=0x8000000000000000;
Print("%X\n",i>>1); //Result is 0xC000000000000000 as expected
U64 u3=0x8000000000000000;
Print("%X\n",u3>>1); //Result is 0x4000000000000000 as expected
U64 u=0x8000000000000000;
Print("%X\n",u>>1); //Result is 0x4000000000000000 as expected
I32 i= 0x80000000; //const is loaded into a 64-bit reg var.
Print("%X\n",i>>1); //Result is 0x40000000
I32 i=-0x80000000;
Print("%X\n",i>>1); //Result is 0xC0000000 as expected
I32 i4=0x80000000; //const is loaded into a 64-bit reg var.
Print("%X\n",i4>>1); //Result is 0x40000000
I32 i5=-0x80000000;
Print("%X\n",i5>>1); //Result is 0xFFFFFFFFC0000000
}
$ID,-2$$FG$
$FG,5$$TX+CX,"Print Family"$$FG$
$LK,"MPrint",A="MN:MPrint"$() is like $LK,"SPrint",A="MN:SPrint"$() but it returns a $LK,"MAlloc",A="MN:MAlloc"$ated str. It is vary handy because you don't have to worry about overflow.
$LK,"Auto",A="MN:Auto"$(U8 *fmt,...) sends text to the current task's input buffer.
$LK,"AutoStr",A="MN:AutoStr"$(U8 *fmt,...) sends text of an $LK,"AutoFile",A="FF:::/Doc/Glossary.TXT,AutoFile"$ to the keyboard stream of the current TASK but can also do mouse cmds.
$LK,"XTalk",A="MN:XTalk"$(CTask *task,U8 *fmt,...) and text to another task's input buffer.
$LK,"XTalkStr",A="MN:XTalkStr"$(CTask *task,U8 *fmt,...) sends text of an $LK,"AutoFile",A="FF:::/Doc/Glossary.TXT,AutoFile"$ to the keyboard stream of another TASK but can also do mouse cmds.
$LK,"DocPrint",A="MN:DocPrint"$(CDoc *doc,U8 *fmt,...) sends text to a document. You can buffer to a Doc and save it, providing the functionality of $FG,2$fprintf$FG$. See $LK,"::/Demo/Dsk/FPrintF.CPP"$.
$LK,"Adam",A="MN:Adam"$(U8 *fmt,...) sends text to the adam task to be compiled and run.
$LK,"AdamLog",A="MN:AdamLog"$(U8 *fmt,...) and $LK,"AdamErr",A="MN:AdamErr"$(U8 *fmt,...) send text to the adam task to be displayed.
$LK,"StreamPrint",A="MN:StreamPrint"$(U8 *fmt,...) sends text to the stream of code being compiled and must reside in a $FG,2$#exe{}$FG$ blk.
$LK,"GrPrint",A="MN:GrPrint"$(CDC *dc,I64 x,I64 y,U8 *fmt,...) and $LK,"GrVPrint",A="MN:GrVPrint"$() plots text in graphics mode.
$LK,"ExePrint",A="MN:ExePrint"$(U8 *fmt,...) compiles and execute a string. Note: It returns the result 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.
$LK,"RawPrint",A="MN:RawPrint"$(I64 mS,U8 *fmt) sends direct to screen memory, bypassing window manager.
$BK,1$Note:$BK,0$ Use $FG,2$Print("%s",src)$FG$ if you need an unmodified string.
$AN,"",A="SPrintCodes"$The $LK,"Print",A="MN:Print"$() family supports extended format codes. See $LK,"SPrintJoin",A="MN:SPrintJoin"$().
$ID,2$$FG,2$%$FG$[$FG,2$-$FG$][$FG,2$0$FG$][$FG,5$width$FG$][$FG,2$.$FG,5$decimals$FG$][$FG,5$flags$FG$][$FG,2$h$FG,5$sub_fmt$FG$][$FG,5$main_fmt$FG$]
$FG,5$flags:$FG$
$ID,2$* $FG,2$'t'$FG$ is a flag which will truncate to field width.
* $FG,2$','$FG$ is a flag which will add commas every three digits in a $FG,2$%d$FG$, $FG,2$%f$FG$,$FG,2$ %g$FG$,$FG,2$ %e$FG$ and $FG,2$%n$FG$ entries.
* $FG,2$'$$'$FG$ is a flag which affects the $FG,2$%Q$FG$ entry, converting $FG,2$'$$'$FG$ to $FG,2$"\044"$FG$.
* $FG,2$'/'$FG$ is a flag which affects the $FG,2$%Q$FG$ and $FG,2$%q$FG$ entries, converting $FG,2$'%'$FG$ to $FG,2$"%%"$FG$.
$ID,-2$
$FG,5$sub_fmt:$FG$
$ID,2$For $FG,2$"%n"$FG$, $FG,2$"%d"$FG$ or $FG,2$"%u"$FG$, the sub_fmt causes thousands mode. $FG,2$"%h?n"$FG$ will pick a var exponent multiples of three unit, while $FG,2$"%h-3n"$FG$ will display milli units or $FG,2$"%h6n"$FG$ will display mega units. The $FG,2$'k'$FG$ flag is always on for $FG,2$"%n"$FG$. See $LK,"::/Demo/Print.CPP"$.
$ID,-2$
* $FG,2$"%n"$FG$ will print a floating point in engineering notation, exponents being multiples of three. If it has a $FG,5$sub_fmt$FG$ code, it will display scientific units letters.
* $FG,2$"%S"$FG$ will print a Define entry.
* $FG,2$"%C"$FG$ will print a ToUpper character.
* $FG,2$"%F"$FG$ will print a text file.
* $FG,2$"%p"$FG$ will display ptr.
* $FG,2$"%P"$FG$ will display link to ptr.
* $FG,2$"%T"$FG$ and $FG,2$"%D"$FG$ will display a date or time if you pass a $LK,"CDate",A="MN:CDate"$.
* $FG,2$"%z"$FG$ will display a subentry of an enumerated list of text entries. It calls $LK,"LstSub",A="MN:LstSub"$(). Pass subentry first, list second.
* $FG,2$"%Z"$FG$ will display a Define subentry. Pass subentry first, lst_define second.
* $FG,2$"%Q"$FG$ will convert "\" to "\\" and quote to backslash quote. (For use in creating strs in strs.)
* $FG,2$"%q"$FG$ will reverse a $FG,2$"%Q"$FG$.
$ID,-2$
+81 -69
View File
@@ -2,9 +2,7 @@ $FG,5$$TX+CX,"Details of Scoping and Linkages"$$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.
$LK,"AOT Compile Mode",A="FF:::/Doc/Glossary.TXT,AOT Compile Mode"$ creates a new, empty, sym table which you must populate by $FG,2$#include$FG$ing $LK,"::/Kernel/AOT.HPP"$ or whatever to import syms.
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 $FG,2$#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 "$FG,2$UpdateWin()$FG$". This case might occur when the $FG,2$adam task$FG$ is starting-up loading-in many little utilities.
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 $FG,2$#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 $FG,2$DrawIt()$FG$. This case might occur when the $FG,2$adam task$FG$ is starting-up loading-in many little utilities.
$FG,2$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.
@@ -16,73 +14,87 @@ $FG,2$_extern$FG$ binds a new $LK,"HTT_FUN",A="MN:HTT_FUN"$ or $LK,"HTT_GLBL_VAR
$FG,2$_import$FG$ binds a new $LK,"HTT_FUN",A="MN:HTT_FUN"$ or $LK,"HTT_GLBL_VAR",A="MN:HTT_GLBL_VAR"$ sym to a sym, of a $BK,1$different$BK,0$ name imported from the task's sym table at $LK,"Load",A="MN:Load"$() time. If no sym exists to bind to at $LK,"Load",A="MN:Load"$() time, the code using this sym will be left incomplete until the sym is defined. Basically, this binds C to asm from elsewhere.
$WW,0$$FG,2$A$FG$headOfTime/$FG,2$J$FG$ustInTime
| Code occurs in $FG,2$G$FG$lobalScope/$FG,2$F$FG$unctionScope
| | $FG,2$C$FG$Code/$FG,2$A$FG$smCodeBlk
| | | $FG,2$extern$FG$/$FG,2$import$FG$/$FG,2$_extern$FG$/$FG,2$_import$FG$/$FG,2$IMPORT$FG$/$FG,2$static$FG$/$FG,2$class$FG$/$FG,2$goto$FG$
| | | | $FG,2$C$FG$odeHeap/$FG,2$D$FG$ataHeap/$FG,2$S$FG$tack/$FG,2$R$FG$egister
| | | | | TaskHashEntry:Export$FG,2$S$FG$ysSym/$FG,2$M$FG$acro/$FG,2$F$FG$unction/$FG,2$C$FG$lass/$FG,2$T$FG$ypedef
| | | | | | UsageScope: $FG,2$M$FG$odule/$FG,2$A$FG$smLocal/Asm$FG,2$B$FG$lk/$FG,2$T$FG$askAndChildren/$FG,2$F$FG$unction
| | | | | | |UsageScope: $FG,2$G$FG$lbl/Asm$FG,2$L$FG$ocal/$FG,2$R$FG$emainder/$FG,2$g$FG$lblThisBlkAndRemainder
| | | | | | || $FG,2$S$FG$taticVarInit/$FG,2$D$FG$ynamicVarInitAllowed/$FG,2$N$FG$oInitAllowed
| | | | | | || | Are dups allowed within the namespace? A dup overshadows the original.
| | | | | | || | $FG,2$D$FG$upsAllowed/$FG,2$N$FG$oDups/NoDupsBut$FG,2$P$FG$ad/$FG,2$W$FG$arningUnlessClosedOut
A G A C label:: S MG N
A G A C label: MG N
A G A C @@label: AL N
A G A IMPORT C label; MR N
A F A C label:: S BG N
A F A C label: BG N
A F A C @@label: AL N
A F A IMPORT C label; BR N
A x x #define MR D
A G C C function S MR D
A F C R var FR N
A F C S var FR N
A F C static C var FR D N
A F C goto C label: FG N
A G C C var S MR D D
A G C D var MR N D
A G C class MR D
A G C class member MR P
A G C extern class MR D
A G C extern C function MR W
A G C import C function MR D
A G C import C var MR D
A G C _extern C function MR D
A G C _extern C var MR D
A G C _import C function MR D
A G C _import C var MR D
J G A C label:: S Tg N
J G A C label: BG N
J G A C @@label: AL N
J G A IMPORT C label; TR N
J F A C label:: BG N
J F A C label: BG N
J F A C @@label: AL N
J F A IMPORT C label; BR N
J x x #define M TR D
J G C C function F TR D
J F C R var FR N
J F C S var FR N
J F C static C var FR D N
J F C goto C label: FG N
J G C C var G TR D D
J G C D var G TR S D
J G C class C TR D
J G C class member TR P
J G C extern class C TR D
J G C extern C function F TR W
J G C extern C var G TR D
J G C extern D var G TR D
J G C _extern C function F TR D
J G C _extern C var G TR D
$WW,0$$FG,5$Ahead of Time Compilation$FG$
$FG,2$G$FG$lobalScope/$FG,2$F$FG$unctionScope
| $FG,2$C$FG$odeHeap/$FG,2$D$FG$ataHeap/$FG,2$S$FG$tack/$FG,2$R$FG$egister
| | TaskHashEntry:Export$FG,2$S$FG$ysSym/$FG,2$D$FG$efine/$FG,2$F$FG$unction/$FG,2$C$FG$lass
| | | UsageScope: $FG,2$M$FG$odule/$FG,2$A$FG$smLocal/Asm$FG,2$B$FG$lk/$FG,2$T$FG$askAndChildren/$FG,2$F$FG$unction
| | | |UsageScope: $FG,2$G$FG$lbl/Asm$FG,2$L$FG$ocal/$FG,2$R$FG$emainder/$FG,2$g$FG$lblThisBlkAndRemainder
| | | || $FG,2$S$FG$taticVarInit/$FG,2$D$FG$ynamicVarInitAllowed/$FG,2$N$FG$oInitAllowed
| | | || | Are dups allowed within the namespace? A dup overshadows the original.
| | | || | $FG,2$D$FG$upsAllowed/$FG,2$N$FG$oDups/NoDupsBut$FG,2$P$FG$ad/$FG,2$W$FG$arningUnlessClosedOut
asm export $FG,2$label::$FG$ G C S MG N
asm $FG,2$label:$FG$ G C MG N
asm local $FG,2$@@label:$FG$ G C AL N
asm $FG,2$IMPORT label;$FG$ G C MR N
asm export $FG,2$label::$FG$ F C S BG N
asm $FG,2$label:$FG$ F C BG N
asm local $FG,2$@@label:$FG$ F C AL N
asm $FG,2$IMPORT label;$FG$ F C BR N
C goto $FG,2$label:$FG$ F C FG N
$FG,2$#define$FG$ x MR D
function G C S MR D
var F R FR N
var F S FR N
$FG,2$static$FG$ var F C FR D N
var G C S MR D D
var G D MR N D
$FG,2$class$FG$ G MR D
class member G MR P
$FG,2$extern class$FG$ G MR D
$FG,2$extern$FG$ function G C MR W
$FG,2$import$FG$ function G C MR D
$FG,2$import$FG$ var G C MR D
$FG,2$_extern$FG$ function G C MR D
$FG,2$_extern$FG$ var G C MR D
$FG,2$_import$FG$ function G C MR D
$FG,2$_import$FG$ var G C MR D
$FG,5$Just in Time Compilation$FG$
$FG,2$G$FG$lobalScope/$FG,2$F$FG$unctionScope
| $FG,2$C$FG$odeHeap/$FG,2$D$FG$ataHeap/$FG,2$S$FG$tack/$FG,2$R$FG$egister
| | TaskHashEntry:Export$FG,2$S$FG$ysSym/$FG,2$D$FG$efine/$FG,2$F$FG$unction/$FG,2$C$FG$lass
| | | UsageScope: $FG,2$M$FG$odule/$FG,2$A$FG$smLocal/Asm$FG,2$B$FG$lk/$FG,2$T$FG$askAndChildren/$FG,2$F$FG$unction
| | | |UsageScope: $FG,2$G$FG$lbl/Asm$FG,2$L$FG$ocal/$FG,2$R$FG$emainder/$FG,2$g$FG$lblThisBlkAndRemainder
| | | || $FG,2$S$FG$taticVarInit/$FG,2$D$FG$ynamicVarInitAllowed/$FG,2$N$FG$oInitAllowed
| | | || | Are dups allowed within the namespace? A dup overshadows the original.
| | | || | $FG,2$D$FG$upsAllowed/$FG,2$N$FG$oDups/NoDupsBut$FG,2$P$FG$ad/$FG,2$W$FG$arningUnlessClosedOut
asm export $FG,2$label::$FG$ G C S Tg N
asm $FG,2$label:$FG$ G C BG N
asm local $FG,2$@@label:$FG$ G C AL N
asm $FG,2$IMPORT label;$FG$ G C TR N
asm export $FG,2$label::$FG$ F C BG N
asm $FG,2$label:$FG$ F C BG N
asm local $FG,2$@@label:$FG$ F C AL N
asm $FG,2$IMPORT label;$FG$ F C BR N
C goto $FG,2$label:$FG$ F C FG N
$FG,2$#define$FG$ x D TR D
function G C F TR D
var F R FR N
var F S FR N
$FG,2$static$FG$ var F C FR D N
var G C G TR D D
var G D G TR S D
$FG,2$class$FG$ G C TR D
class member G TR P
$FG,2$extern class$FG$ G C TR D
$FG,2$extern$FG$ function G C F TR W
$FG,2$extern$FG$ var G C G TR D
$FG,2$extern$FG$ var G D G TR D
$FG,2$_extern$FG$ function G C F TR D
$FG,2$_extern$FG$ var G C G TR D
$WW,1$
* GoTo labels must not have the same name as global scope objects. GoTo's are rare and I don't want to slow the compiler and add code to fix this. You will get errors if a collision happens, so it's not very dangerous, but the error message is baffling.
* Goto labels must not have the same name as global scope objects. GoTo's are rare and I don't want to slow the compiler and add code to fix this. You will get errors if a collision happens, so it's not very dangerous, but the error message is baffling.
* The member names "$FG,2$pad$FG$ and "$FG,2$reserved$FG$" are special because multiple instances with the same name are allowed in a class.
* The member names $FG,2$pad$FG$ and $FG,2$reserved$FG$ are special because multiple instances with the same name are allowed in a class.
* Use $FG,2$reg$FG$ or $FG,2$noreg$FG$ in front of local var names to override automatic reg var allocation. You can, optionally, specify a reg after the "$FG,2$reg$FG$" keyword.
* Use $FG,2$reg$FG$ or $FG,2$noreg$FG$ in front of local var names to override automatic reg var allocation. You can, optionally, specify a reg after the $FG,2$reg$FG$ keyword.
* Local non-reg function vars can be accessed in asm blks with $FG,2$&i[RBP]$FG$ for example.
@@ -97,9 +109,9 @@ $WW,1$
* The $FG,2$sizeof()$FG$ and HolyC structure members can be used in asm blks.
* No reg vars are used in functions with a try/catch. They will be force to $FG,2$noreg$FG$.
* Using $FG,2$&i$FG$ in $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ or $FG,2$i.u8[2]$FG$ on a local var, $FG,2$i$FG$, will force it to $FG,2$noreg$FG$.
* Using $FG,2$&i$FG$ or $FG,2$i.u8[2]$FG$ on a local var, $FG,2$i$FG$, will force it to $FG,2$noreg$FG$.
* Using $FG,2$try$FG$/$FG,2$catch$FG$ in a function will force all local vars to $FG,2$noreg$FG$.
* An unused gap on the stk is left for $FG,2$reg$FG$ vars.
+13 -4
View File
@@ -1,7 +1,16 @@
$WW,1$"Input Ptr" is the mouse at this point.
$WW,1$"Input Ptr" is the mouse. In the future, might be joystick or pad.
$LK,"ipx",A="MN:ipx"$ and $LK,"ipy",A="MN:ipy"$ can be used to access the x and y coordinates of the input ptr. They are relative to the screen, not window. These can be used if you don't want to use msg passing. $LK,"ipz",A="MN:ipz"$ is the wheel.
$LK,"ip.pos.x",A="MN:ip"$ and $LK,"ip.pos.y",A="MN:ip"$ can be used to access the x and y coordinates of the input ptr. They are relative to the screen, not window. These can be used if you don't want to use msg passing. $LK,"ip.pos.z",A="MN:ip"$ is the wheel.
$LK,"iptx",A="MN:iptx"$ and $LK,"ipty",A="MN:ipty"$ are the text column and row of the input ptr. See $LK,"::/Demo/Games/Maze.CPP"$.
$LK,"ip.pos_text.x",A="MN:CIPStateGlbls"$ and $LK,"ip.pos_text.y",A="MN:CIPStateGlbls"$ are the text column and row of the input ptr. See $LK,"::/Demo/Games/Maze.CPP"$.
You can make the input ptr snap to a grid by adjusting $FG,4$Fs->snap$FG$.
See $LK,"CIPStateGlbls",A="MN:CIPStateGlbls"$ and $LK,"CMouseStateGlbls",A="MN:CMouseStateGlbls"$.
$HL,1$//****
mouse.pos.x=mouse.prescale.x*mouse.scale.x*ip_grid.x_speed;
ip.presnap.x=ToI64(ip.scale.x*mouse.pos.x)+ip.offset.x;
if (ip_grid.snap)
ip.pos.x=Trunc(ip.presnap.x/ip_grid.x)*ip_grid.x+ip_grid.x_offset;
else
ip.pos.x=ip.presnap.x;
//****$HL,0$
+2 -2
View File
@@ -2,9 +2,9 @@ $WW,1$$FG,5$$TX+CX,"Installing TempleOS"$$FG$
Burn a CD with software that supports ISO files. Then, boot it. It's a live CD, so you can look around with or without installing.
Dual booting with another operating system is the best way to use TempleOS. You'll need a partition for TempleOS. Windows often comes with a restore disk that does not allow repartitioning. I recommend connecting a spare additional hard drive and using the $FG,2$BIOS$FG$ to select which drive to boot.
Dual booting with another operating system is the best way to use TempleOS. I only use it in a virtual machine because it won't boot natively on my machine, though. For native dual booting, you need a partition for TempleOS. Windows often comes with a restore disk that does not allow repartitioning. I recommend connecting a spare additional hard drive and using the $FG,2$BIOS$FG$ to select which drive to boot.
If you boot the CD-ROM and log-in as the "Install" account it will automate much of this.
If you boot the CD/DVD-ROM and log-in as the "Install" account it will automate much of this.
See $LK,"Boot.TXT",A="FI:::/Doc/Boot.TXT"$ for an overview of booting. See $LK,"Requirements",A="FI:::/Doc/Requirements.TXT"$ for supported hardware. See $LK,"Upgrading",A="FI:::/Doc/Upgrade.TXT"$ if you are upgrading.
+27
View File
@@ -0,0 +1,27 @@
$WW,1$$FG,5$$TX+CX,"Key Allocations"$$FG$
See $LK,"Char",A="HI:Char"$ for definition of scan codes.
See $MA-X+PU,"Key Map",LM="KeyMap;View;\n"$ for a detailed list of key commands.
When you are at the cmd line, editing documents, browsing documentation and help, entering items in forms or in menu's, the $LK,"DolDoc",A="MN:CDoc"$ editor handles keys. It allows you to define your own key handlers in a $LK,"MyPutKey",A="MN:MyPutKey"$() function. If you choose, you can catch keys, overriding the default handlers. See $LK,"DocPutKey",A="MN:DocPutKey"$(). The following is an overview of key allocations.
$FG,2$<ALT-keys>$FG$ and $FG,2$<ALT-SHIFT-keys>$FG$ Free for user configurations in your $LK,"MyPutKey",A="MN:MyPutKey"$() handler, except for $FG,2$ALT-BACKSPACE$FG$ (undo). There are a few examples pre-defined, but you can change them if you wish.
$FG,2$<ALT-digit keys>$FG$ Extended ASCII (3 digit decimal number).
$FG,2$<CTRL-ALT-keys>$FG$ and $FG,2$<CTRL-ALT-SHIFT-keys>$FG$ Handled at a system level, NOT by the $LK,"CDoc",A="MN:CDoc"$ editor. I reserve the right to allocate these, but in the mean time, you can define your own handlers with $LK,"SetCtrlAltLetCB",A="MN:SetCtrlAltLetCB"$(). They operate either in a interrupt environment or in the window mgr when it queues kbd msgs. You can do $LK,"Raw",A="MN:Raw"$() output. $FG,2$<CTRL-ALT-letter>$FG$ handlers take a scan_code as an arg.
$FG,2$<CTRL-function key>$FG$ Auto-completes wordstat words.
$FG,2$<CTRL-digit key>$FG$ $FG$Auto-completes dictionary words.
$FG,2$<CTRL-SHIFT-function key>$FG$ $FG$Jumps to src code.
$FG,2$<CTRL-SHIFT-digit key>$FG$ Jumps to dictionary definition.
$FG,2$<function keys>$FG$ and $FG,2$<SHIFT-function keys>$FG$ $FG$I reserve the right to allocate these, but there are some free now.
$FG,2$<CTRL-key>$FG$ and $FG,2$<CTRL-SHIFT-key>$FG$ I reserve the right to allocate to these. There are not many free.
$AN,"",A="PutKeyHandling"$
See $LK,"Keyboard Devices",A="HI:Keyboard Devices/System"$.
-69
View File
@@ -1,69 +0,0 @@
$WW,1$$FG,5$$TX+CX,"Keyboard Allocations"$$FG$
See $LK,"Char",A="HI:Char"$ for definition of scan codes.
When you are at the cmd line, editing documents, browsing documentation and help, entering items in forms or in menu's, the $LK,"CDoc",A="MN:CDoc"$ editor handles keys. It allows you to define your own key handlers in a $LK,"MyPutKey",A="MN:MyPutKey"$() function. If you choose, you can catch most keys, overriding the default handlers. See $LK,"DocPutKey",A="MN:DocPutKey"$(). The following is an overview of key allocations.
$FG,2$ALT-keys and ALT-SHIFT-keys$FG$
Free for user cfgurations in your $LK,"MyPutKey",A="MN:MyPutKey"$() handler, except for $FG,2$ALT-BACKSPACE$FG$ (undo). There are a few examples pre-defined, but you can change them if you wish.
$FG,2$ALT-digit keys$FG$
Extended ASCII (3 digit decimal number).
$FG,2$CTRL-ALT-keys and CTRL-ALT-SHIFT-keys$FG$
Handled at a system level, NOT by the $LK,"CDoc",A="MN:CDoc"$ editor. I reserve the right to allocate these, but in the mean time, you can make your own by assigning handlers to the $LK,"fp_ctrl_alt_let_cbs",A="MN:fp_ctrl_alt_let_cbs"$[] array. Be aware that they operate in an interrupt framework, so they are tricky to use.
$FG,2$CTRL-function key$FG$
Auto-completes wordstat words.
$FG,2$CTRL-digit key$FG$
$FG$Auto-completes dictionary words.
$FG,2$CTRL-SHIFT-function key$FG$
$FG$Jumps to src code.
$FG,2$CTRL-SHIFT-digit key$FG$
Jumps to dictionary definition.
$FG,2$function keys and SHIFT-function keys$FG$
$FG$I reserve the right to allocate these, but there are some free now.
$FG,2$CTRL-key and CTRL-SHIFT-key$FG$
I reserve the right to allocate to these. There are not many free.
$FG,5$$TX+CX,"Behind the Scenes"$$FG$
$AN,"",A="PutKeyHandling"$The editor mostly stays in a $LK,"GetKey",A="MN:GetKey"$()/$LK,"PutKey",A="MN:PutKey"$() loop. The putkey portion is where keys are acted-upon. TempleOS has a chain of putkey handlers in a $LK,"Circular Queue",A="HI:Circular Queue"$ with priorities. The highest priority handlers can choose to terminate handling, otherwise, the keys get sent on down the chain.
$LK,"KeyDevAdd",A="MN:KeyDevAdd"$() defines a putkey device with a priority. "Device" might be a misnomer. Currently, the following are defined:
Priority Handler
---------- ---------
$FG,2$0x20000000$FG$ $LK,"MyPutKey",A="MN:MyPutKey"$() user handler
$FG,2$0x40000000$FG$ $LK,"KDInputFilterPutKey",A="MN:KDInputFilterPutKey"$() for $LK,"Auto",A="MN:Auto"$(), $LK,"AutoStr",A="MN:AutoStr"$(), and $LK,"AutoFile",A="MN:AutoFile"$() handling.
$FG,2$0x60000000$FG$ $LK,"KDRawDisplayPutKey",A="MN:KDRawDisplayPutKey"$() direct to video mem debug output.
$FG,2$0x80000000$FG$ $LK,"KDDocPutKey",A="MN:KDDocPutKey"$() standard document cmds
Since handling individual keys is slow, TempleOS supports PutS() as well. If no puts handler is defined, individual keys are sent.
$LK,"CDoc",A="MN:CDoc"$$FG,2$.user_put_key$FG$ and $LK,"CDoc",A="MN:CDoc"$$FG,2$.user_put_s$FG$ are call back routines which offer some neat tricks. See $LK,"::/Apps/MusicOrgan/JukeBox.CPP"$. There is a var $LK,"CDoc",A="MN:CDoc"$$FG,2$.user_put_data$FG$ which gets passed to them.
+14
View File
@@ -0,0 +1,14 @@
$WW,1$The editor mostly stays in a $LK,"GetKey",A="MN:GetKey"$()/$LK,"PutKey",A="MN:PutKey"$() loop. The putkey portion is where keys are acted-upon. TempleOS has a chain of putkey handlers in a $LK,"Circular Queue",A="HI:Circular Queue"$ with priorities. The highest priority handlers can choose to terminate handling, otherwise, the keys get sent on down the chain.
$LK,"KeyDevAdd",A="MN:KeyDevAdd"$() defines a putkey device with a priority. "Device" might be a misnomer. Currently, the following are defined:
Priority Handler
---------- ---------
$FG,2$0x20000000$FG$ $LK,"MyPutKey",A="MN:MyPutKey"$() user handler
$FG,2$0x40000000$FG$ $LK,"KDInputFilterPutKey",A="MN:KDInputFilterPutKey"$() for $LK,"Auto",A="MN:Auto"$(), $LK,"AutoStr",A="MN:AutoStr"$(), and $LK,"AutoFile",A="MN:AutoFile"$() handling.
$FG,2$0x60000000$FG$ $LK,"KDRawPutKey",A="MN:KDRawPutKey"$() nonwindowed direct to video mem debug output.
$FG,2$0x80000000$FG$ $LK,"KDDocPutKey",A="MN:KDDocPutKey"$() standard document cmds
Since handling individual keys is slow, TempleOS supports PutS() as well. If no puts handler is defined, individual keys are sent.
$LK,"CDoc",A="MN:CDoc"$$FG,2$.user_put_key$FG$ and $LK,"CDoc",A="MN:CDoc"$$FG,2$.user_put_s$FG$ are call back routines which offer some neat tricks. See $LK,"::/Apps/Psalmody/JukeBox.CPP"$. There is a var $LK,"CDoc",A="MN:CDoc"$$FG,2$.user_put_data$FG$ which gets passed to them.
+1 -1
View File
@@ -1,3 +1,3 @@
$WW,1$The compiler's lexical analyzer can be used in your programs to simplify parsing. See $LK,"Doc Parsing",A="FF:::/Adam/Doc/DocPlain.CPP,LexNew"$ or $LK,"Parse Opcode File",A="FF:::/Compiler/CmpInit.CPP,Opcodes.TXT"$.
$WW,1$The compiler's lexical analyzer can be used in your programs to simplify parsing. See $LK,"Doc Parsing",A="FF:::/Adam/DolDoc/DocPlain.CPP,LexNew"$ or $LK,"Parse Opcode File",A="FF:::/Compiler/CmpInit.CPP,Opcodes.TXT"$.
See $LK,"Tokens",A="MN:TK_IDENT"$.
Binary file not shown.
+3 -1
View File
@@ -21,6 +21,8 @@ Help
About(,'/');
}
$FG$
The first arg is the msg code and it is optional with the default being $LK,"MSG_KEY_DOWN_UP",A="MN:MSG_KEY_DOWN_UP"$. The second arg is the msg $FG,2$p1$FG$ value which is $FG,2$ASCII$FG$ of the key in the case of $LK,"MSG_KEY_DOWN",A="MN:MSG_KEY_DOWN"$. The third arg is the msg $FG,2$p2$FG$ value which is the $FG,2$Scan Code$FG$ of the key in the case of $LK,"MSG_KEY_DOWN",A="MN:MSG_KEY_DOWN"$.
The first arg is the msg code and it is optional with the default being $LK,"MSG_KEY_DOWN_UP",A="MN:MSG_KEY_DOWN_UP"$. The second arg is the msg $FG,2$a1$FG$ value which is $LK,"ASCII",A="MN:CH_CTRLA"$ of the key in the case of $LK,"MSG_KEY_DOWN",A="MN:MSG_KEY_DOWN"$. The third arg is the msg $FG,2$a2$FG$ value which is the $LK,"scan_code",A="FI:::/Doc/CharOverview.TXT"$$FG$ of the key in the case of $LK,"MSG_KEY_DOWN",A="MN:MSG_KEY_DOWN"$.
Press $FG,2$<CTRL-SHIFT-l>$FG$ and "Insert ASCII/ScanCode".
See $LK,"::/Demo/PullDownMenu.CPP"$.
+1
View File
@@ -0,0 +1 @@
$WW,1$There are a maximum of 63 message types, so a bitmask can be passed. Messages have two args. See $LK,"Message Codes",A="MN:MSG_NULL"$.
+4 -4
View File
@@ -1,14 +1,14 @@
$WW,1$$FG,5$$TX+CX,"TempleOS MutliCore"$$FG$
$WW,1$$FG,5$$TX+CX,"MutliCore"$$FG$
TempleOS does master-slave multicore instead of SMP. Core#0 is the master. The master core assigns computational jobs to other cores. It is symmetrical in the sense that you can do file access and heap allocations because there are locks. See $LK,"::/Demo/MultiCore/LoadTest.CPP"$. TempleOS does not move tasks between cores.
TempleOS does master-slave multicore instead of SMP. $FG,2$Core#0$FG$ is the master. The master core assigns computational jobs to other cores. It is symmetrical, however, in the sense that you can freely do file access and heap allocations because there are locks. See $LK,"::/Demo/MultiCore/LoadTest.CPP"$. TempleOS does not move tasks between cores.
Only tasks on core#0 can have windows, but other cores can help render them.
Each core has a "seth task" which is the father of all tasks on that core. Adam is the seth task on core 0.
Each core has a $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,"GetResult",A="MN:GetResult"$(). 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"$() instructions 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"$.
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"$() instructions 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"$.
See $LK,"::/Demo/Graphics/Transform.CPP"$.
See $LK,"::/Kernel/MultiProc.CPP"$.
+6 -4
View File
@@ -1,12 +1,12 @@
$FG,5$$TX+CX,"MultiTasking"$$FG$
$WW,1$TempleOS is a preemptive multitasking operating system. However, you can turn-off preemption on a task by task basis and the task will not yield ctrl unless it volunteers with $LK,"Yield",A="MN:Yield"$(), $LK,"Sleep",A="MN:Sleep"$() or a call to I/O which yields ctrl. Use the $LK,"Preempt",A="MN:Preempt"$() cmd to turn on or off preemption. This is useful when you have multiple tasks modifying data structures simultaneously. Interrupts still occur when preemption is off.
$WW,1$TempleOS is a preemptive multitasking operating system. However, you can turn-off preemption on a task by task basis and the task will not yield ctrl unless it volunteers with $LK,"Yield",A="MN:Yield"$(), $LK,"Sleep",A="MN:Sleep"$() or a call to I/O which yields ctrl. Use the $LK,"Preempt",A="MN:Preempt"$() cmd to turn on or off preemption. This is useful when you have multiple tasks modifying data structures, simultaneously. Interrupts still occur when preemption is off. Turning-off preemption does not protect against multicore simultaneous access.
$BK,1$Preemption is turned-off by default when a task is $LK,"Spawn",A="MN:Spawn"$()ed.$BK,0$
The time-slice rate is set by $LK,"JIFFY_FREQ",A="MN:JIFFY_FREQ"$.
TempleOS does not remove tasks from "the queue" when they are waiting. They swap-in, check whatever condition they are waiting for and swap-out. This keeps it simple, but would cause problems with too many tasks. TempleOS is intended for non-server, home computers with a maximum of around ten, or so, tasks. See $LK,"Scheduler",A="FL:::/Kernel/Scheduler.CPP,1"$.
TempleOS does not remove tasks from $FG,2$the queue$FG$ when they are waiting. They swap-in, check whatever condition they are waiting for and swap-out. This keeps it simple, but would cause problems with too many tasks. TempleOS is intended for non-server, home computers with a maximum of around ten, or so, tasks. See $LK,"Scheduler",A="FL:::/Kernel/Sched.CPP,1"$.
TempleOS has no task priority scheme.
@@ -15,8 +15,10 @@ Disk requests are not broken into pieces for sharing. Therefore, if one task ma
$FG,5$$TX+CX,"Interrupts"$$FG$
You can turn on and off interrupts in your user programs. This is part of the mission statement, giving complete freedom to programmers. Use CLI or STI. TempleOS currently doesn't use interrupt besides the timer and keyboard and sometimes mouse interrupt. Since the interrupt flag is part of your task context and since you are voluntarily swapped-out if you call $LK,"GetChar",A="MN:GetChar"$() or whatever, you won't even notice if you turn-off interrupts at the cmd prompt because you are being swapped-out and interrupts are being turned-on by the next task.
You can turn on and off interrupts in your user programs. This is part of the mission statement, giving complete freedom to programmers. Use $FG,2$CLI$FG$ or $FG,2$STI$FG$. TempleOS currently doesn't use interrupt besides the timer and keyboard and sometimes mouse interrupt. Since the interrupt flag is part of your task context and since you are voluntarily swapped-out if you call $LK,"GetChar",A="MN:GetChar"$() or whatever, you won't even notice if you turn-off interrupts at the cmd prompt because you are being swapped-out and interrupts are being turned-on by the next task.
I saw no reason to make the hard drive or CD-ROM code interrupt driven -- it just creates potential compatibility issues. On a home system, you do one thing at a time, mostly. TempleOS can do multiple things at once, but not as efficiently as a server operating system. It would bogg down with a hundred tasks asking for service. It is much simpler, though. The disk code does not break-up large requests in pieces, if you are curious why one task must wait until another finishes an operation.
I saw no reason to make the hard drive or CD-ROM code interrupt driven -- it just creates potential compatibility issues. On a home system, you do one thing at a time, mostly. TempleOS can do multiple things at once, but not as efficiently as a server operating system. It would bogg down with a hundred tasks asking for service. It is much simpler, though, the way it is.
The disk code does not break-up large requests in pieces, if you are curious why one task must wait until another finishes an operation.
See $LK,"::/Demo/Lectures/Spinning.CPP"$.
+22 -22
View File
@@ -1,62 +1,62 @@
$WW,1$$FG,5$$TX+CX,"Mysterious TempleOS Items"$$FG$
$WW,1$$FG,5$$TX+CX,"Mysteries"$$FG$
* TempleOS runs in $FG,2$VGA 640x480 16 color$FG$ graphics mode, not text mode. It changes to this mode with a $LK,"BIOS call",A="FF:::/Kernel/KStart.CPP,INT 0x10"$ while in real-mode before it switches to 64-bit mode. The text is $LK,"drawn manually",A="MN:GrUpdateForegroundOfText"$. If graphics mode fails, it falls-back on text mode. You can force text mode with an $LK,"Kernel config",A="FI:::/Kernel/KCfg.CPP"$ option.
* TempleOS runs in $FG,2$VGA 640x480 16 color$FG$ graphics mode, not text mode. It changes to this mode with a $LK,"BIOS call",A="FF:::/Kernel/KStart.CPP,INT 0x10"$ while in real-mode before it switches to 64-bit mode. The text is $LK,"drawn manually",A="MN:GrUpdateTextFG"$. If graphics mode fails, it falls-back on text mode. You can force text mode with an $LK,"Kernel config",A="FI:::/Kernel/KCfg.CPP"$ option.
* TempleOS identity-maps all memory, all the time. There is no "high half" memory space. TempleOS is ring-0-only, so everything is kernel, even user programs. There is a special task called "Adam" and he doesn't die, so his heap never gets freed. That's as close to "kernel memory" as it gets.
* TempleOS identity-maps all memory, all the time. There is no $FG,2$high half$FG$ memory space. TempleOS is ring-0-only, so everything is kernel, even user programs. There is a special task called $FG,2$Adam$FG$ and he doesn't die, so his heap never gets freed. That's as close to $FG,2$kernel memory$FG$ as it gets.
* TempleOS puts all code in the lowest 2 Gig, so that REL32 addressing can be used. TempleOS is 64-bit, but I just thought 2 Gig was enough for code. It actually puts global variables there, too, but you can turn that off with $LK,"OPTf_GLBLS_ON_DATA_HEAP",A="MN:OPTf_GLBLS_ON_DATA_HEAP"$. $LK,"MAlloc",A="MN:MAlloc"$() can allocate any memory, of course.
* TempleOS puts all code in the lowest 2 Gig, so that $FG,2$REL32$FG$ addressing can be used. TempleOS is 64-bit, but I just thought $FG,2$2 Gig$FG$ was enough for code. It actually puts global variables there, too, but you can turn that off with $LK,"OPTf_GLBLS_ON_DATA_HEAP",A="MN:OPTf_GLBLS_ON_DATA_HEAP"$. $LK,"MAlloc",A="MN:MAlloc"$() can allocate any memory, of course.
* TempleOS doesn't use software interrupts or SYSCALL instructions because it never needs to change out of ring-0, even running user programs. Calls are always CALL REL32 instructions.
* TempleOS doesn't use software interrupts or $FG,2$SYSCALL$FG$ instructions because it never needs to change out of ring-0, even running user programs. Calls are always $FG,2$CALL REL32$FG$ instructions.
* The stack does not grow. In theory, memory gets fragmented, too.
* There is no $FG,2$PATH$FG$. You do not enter filenames at the command-line and expect them to run. You enter C-like code. $LK,"Get Started Here",A="FI:::/Doc/CmdLine.TXT"$.
* There is no $FG,2$PATH$FG$. You do not enter filenames at the command-line and expect them to run. You enter C-like code. $LK,"Get Started Here",A="FI:::/Doc/CmdLineOverview.TXT"$.
* If you use $LK,"Grub",A="FI:::/Doc/Grub.TXT"$, you "chain-load" like Windows. You can use the TempleOS boot-loader. $LK,"Master-Boot-Loader-Stage1",A="FI:::/Adam/Boot/BootMHD.CPP"$, $LK,"Master-Boot-Loader-Stage2",A="FI:::/Adam/Boot/BootMHD2.CPP"$, $LK,"Partition-Boot-Loader",A="FI:::/Adam/Boot/BootHD.CPP"$, $LK,"CD-DVD-Boot-Loader",A="FI:::/Adam/Boot/BootCD.CPP"$.
* If you use $LK,"Grub",A="FI:::/Doc/Grub.TXT"$, you $FG,2$chain-load$FG$ like Windows. You can use the TempleOS boot-loader. $LK,"Master-Boot-Loader-Stage1",A="FI:::/Adam/Boot/BootMHD.CPP"$, $LK,"Master-Boot-Loader-Stage2",A="FI:::/Adam/Boot/BootMHD2.CPP"$, $LK,"Partition-Boot-Loader",A="FI:::/Adam/Boot/BootHD.CPP"$, $LK,"CD-DVD-Boot-Loader",A="FI:::/Adam/Boot/BootCD.CPP"$.
* The boot-loaders must be patched by you running $LK,"MakeOSPrtBootInstall",A="MN:MakeOSPrtBootInstall"$() or $LK,"MasterBootIntall",A="MN:MasterBootIntall"$(). Those will write the block address into the boot-loader because the boot-loaders do not navigate file systems to find the $LK,"Stage2",A="FI:::/Kernel/KStart.CPP"$ if you relocate it.
* TempleOS is 64-bit. Like all PC operating systems, the boot-loader starts in 16-bit real-mode. TempleOS calls a few BIOS info routines, switches to VGA-640x480x4bit, switches to 32-bit, then, 64-bit mode. There is an odd thing called a $FG,2$$TX,"PCI BIOS",HTML="http://www.o3one.org/hwdocs/bios_doc/pci_bios_21.pdf"$$FG$ which is 32-bit used for PCI config space access. TempleOS calls $LK,"that",A="FI:::/Kernel/BIOS32.CPP"$ a couple times. It must temporarily drop-out-of 64-bit mode for that and stop multi-tasking.
* TempleOS is 64-bit. Like all PC operating systems, the boot-loader starts in 16-bit real-mode. TempleOS calls a few $FG,2$BIOS$FG$ info routines, switches to VGA-640x480x4bit, switches to 32-bit, then, 64-bit mode. There is an odd thing called a $FG,2$$TX,"PCI BIOS",HTML="http://www.o3one.org/hwdocs/bios_doc/pci_bios_21.pdf"$$FG$ which is 32-bit used for $FG,2$PCI$FG$ config space access. TempleOS calls $LK,"that",A="FI:::/Kernel/BIOS32.CPP"$ a couple times. It must temporarily drop-out-of 64-bit mode for that and stop multi-tasking.
* PUSH EAX : All stack operations in 64-bit mode are 64-bits.
* $FG,2$PUSH EAX$FG$ : All stack operations in 64-bit mode are 64-bits.
* XOR EAX,EAX : Operations on 32-bit regs clear the high 32-bits.
* $FG,2$XOR EAX,EAX$FG$ : Operations on 32-bit regs clear the high 32-bits.
* MOV RAX,FS:[RAX] : FS can be set with a WRMSR, but displacement is RIP relative, so it's tricky to use. FS is used for the current $LK,"CTask",A="MN:CTask"$, GS for $LK,"CCPU",A="MN:CCPU"$.
* $FG,2$MOV RAX,FS:[RAX]$FG$ : FS can be set with a $FG,2$WRMSR$FG$, but displacement is RIP relative, so it's tricky to use. FS is used for the current $LK,"CTask",A="MN:CTask"$, GS for $LK,"CCPU",A="MN:CCPU"$.
* TempleOS uses JIT file compression on a file-by-file basis. Files are $LK,"compressed",A="FI:::/Kernel/Compress.CPP"$, not encrypted.
* TempleOS uses $FG,2$JIT$FG$ file compression on a file-by-file basis. Files are $LK,"compressed",A="FI:::/Kernel/Compress.CPP"$, not encrypted.
* TempleOS has a dictionary that is shipped compressed. When you boot the first time it is uncompressed. TempleOS has a Windows utility for uncompressing. That utility needs Microsoft DLL files. TempleOS does not use any libraries, modules or code from other sources -- I wrote it all from scratch and it is self-contained.
* TempleOS has a dictionary that is shipped compressed. When you boot the first time it is uncompressed. TempleOS has a Windows utility for uncompressing. That utility needs $FG,2$Microsoft DLL$FG$ files. TempleOS does not use any libraries, modules or code from other sources -- I wrote it all from scratch and it is self-contained.
* There are no OBJ or EXE files. There are only two files compiled ahead-of-time -- $FG,2$Kernel.BIN.C$FG$ and $FG,2$Compiler.BIN.Z$FG$. You can delete them and recompile with $LK,"MakeOSPrtBootInstall",A="MN:MakeOSPrtBootInstall"$(). TempleOS is $TX,"120,838",D="DD_TEMPLEOS_LOC"$ lines. Roughly 50,000 is compiled AOT and 50,000 during boot JIT. The rest is JIT demos and applications.
* There are no OBJ or EXE files. There are only two files compiled ahead-of-time -- $FG,2$Kernel.BIN.C$FG$ and $FG,2$Compiler.BIN.Z$FG$. You can delete them and recompile with $LK,"MakeOSPrtBootInstall",A="MN:MakeOSPrtBootInstall"$(). TempleOS is $TX,"120,723",D="DD_TEMPLEOS_LOC"$ lines. Roughly 50,000 is compiled AOT and 50,000 during boot $FG,2$JIT$FG$. The rest is $FG,2$JIT$FG$ demos and applications.
* The main difference between TempleOS and other systems is that the heap and compiler sym table are associated with tasks, not applications.
* A major difference between TempleOS and other systems is that the heap and compiler sym table are associated with tasks, not applications.
* There are sym(hash) tables maintained by each task. They are similar in scope to environment variables. When a symbol is not found, the parent task's symbol table is checked. All process chain back to the $FG,2$Adam$FG$ process. $FG,2$Adam$FG$ has the symbols from headers you normally $FG,2$#include$FG$ in other operating systems, so you do not need to $FG,2$#include$FG$ any headers in TempleOS.
* The compiler only creates pos independent code. You can't create code which is loaded at a fixed, specified location. The code is pos independent by virtue of the fact that abs addresses get patched.
* The compiler only creates $FG,2$pos independent$FG$ code. You can't create code which is loaded at a fixed, specified location. The code is pos independent by virtue of the fact that abs addresses get patched.
* Binary executable files have export syms which are loaded into the sym tables. The operating system $FG,2$Kernel$FG$ has such an export table. In addition, some map files are processed to provide more information on syms -- src file links. This is how the $LK,"Man",A="MN:Man"$()/$FG,2$WORDSTAT$FG$ feature can find src lines.
* $FG,2$#assert$FG$ might print a message at COMPILE time, not run time.
* The word "$FG,2$public$FG$" does very little except allow the $LK,"help_index",A="FI:::/Doc/HelpIndex.TXT"$ and $LK,"Who",A="MN:Who"$() program varients to exclude meaningless syms. If you wish a full report of public and nonpublic syms $MA-X+PU,"Click Here",LM="DocMax(1000000);Who;View;\n"$.
* The word $FG,2$public$FG$ does very little except allow the $LK,"Help & Index",A="FI:::/Doc/HelpIndex.TXT"$ and $LK,"Who",A="MN:Who"$() to exclude meaningless syms. If you wish a full report of public and nonpublic syms $MA-X+PU,"Click Here",LM="DocMax(1000000);Who;View;\n"$.
* When compilation takes place, the structures used by the compiler stick around. Data on classes can be accessed by code. See $LK,"ClassRep",A="MN:ClassRep"$().
* Filenames ending in "$FG,2$.Z$FG$" are automatically compressed and uncompressed when writing to disk. File size in directory listing is the compressed size. See $LK,"::/Doc/TSZ.TXT"$ for uncompressing from $FG,2$WINDOWS$FG$.
* Filenames ending in $FG,2$.Z$FG$ are automatically compressed and uncompressed when writing to disk. File size in directory listing is the compressed size. See $LK,"::/Doc/TSZ.TXT"$ for uncompressing from $FG,2$WINDOWS$FG$.
* Some memory objects are allocated when needed and will decrease the available memory displayed. A task keeps mem objects smaller than a couple blocks in it's own separate heap when freed and these are not counted in the available system free memory, though they are free. They get returned to the system when the task is killed. To get a sense of this, compile the operating system and see the amount of mem used. Then, compile it again and far less will be allocated. This is because it is reusing the small chunks. See $LK,"Memory",A="HI:Memory"$. $MA-X+PU,"Click Here",LM="MemRep;View;"$ for a $LK,"MemRep",A="MN:MemRep"$.
* Some memory objects are allocated when needed and will decrease the available memory displayed. A task keeps mem objects smaller than a couple blocks in it's own separate heap when freed and these are not counted in the available system free memory, though they are free. They get returned to the system when the task is killed. To get a sense of this, compile the operating system and see the amount of mem used. Then, compile it again and far less will be allocated. This is because it is reusing the small chunks. See $LK,"Memory Overview",A="FI:::/Doc/MemOverview.TXT"$ and $LK,"Memory Routines",A="HI:Memory"$. $MA-X+PU,"Click Here",LM="MemRep;View;"$ for a $LK,"MemRep",A="MN:MemRep"$.
* The cursor location is stored as an $FG,2$ASCII 5$FG$ in files. $FG,2$ASCII 31$FG$ is $FG,2$SHIFT-SPACE$FG$, a character which does not get converted to tabs by space-to-tabs, $LK,"S2T",A="MN:S2T"$(). The $FG,2$ASCII 28$FG$ is $FG,2$SHIFT-ESC$FG$.
* Binary data is stored beyond the terminating $FG,2$NULL$FG$ in text files. Map files store debug src lines and other files store sprites.
* Sprites can be stored as vect graphics so they might take shockingly little room. They can be converted to bitmaps.
* Sprites can be stored as vector graphics so they might take shockingly little room. They can be converted to bitmaps.
* If you change code in the $FG,2$/Adam$FG$, $FG,2$/Adam$FG$ or your $FG,2$HOME$FG$ directory, you don't need to recompile, you just need to reboot because those directories get recompiled when you boot. It uses JIT compilation. There is no "$FG,2$.BIN$FG$" file for JIT compilation.
* If you change code in the $FG,2$/Adam$FG$, $FG,2$/Adam$FG$ or your $FG,2$HOME$FG$ directory, you don't need to recompile, you just need to reboot because those directories get recompiled when you boot. It uses JIT compilation. There is no $FG,2$.BIN$FG$ file for $FG,2$JIT$FG$ compilation.
* If not found, "$FG,2$.Z$FG$" is added or removed and a search is done again. If a file is still not found, the parent directories are searched for a file of the same name.
* If not found, $FG,2$.Z$FG$ is added or removed and a search is done again. If a file is still not found, the parent directories are searched for a file of the same name.
* TempleOS supports $FG,2$FAT32$FG$ and $LK,"RedSea",A="FI:::/Doc/RedSea.TXT"$ file systems. The $LK,"RedSea",A="FI:::/Doc/RedSea.TXT"$ partitions will appear as $FG,2$FAT32$FG$ to other operating systems, but will not work. Do not access the native TempleOS partitions from other operating systems. This was to fool a bootloader when I tricked it to use it's recovery partition feature.
+82
View File
@@ -0,0 +1,82 @@
$WW,1$$FG,5$$TX+CX,"Print Fmt Strs"$$FG$
<fmt_arg> := $FG,2$%$FG$[$FG,2$-$FG$][$FG,2$0$FG$][<width>][$FG,2$.$FG$<decimals>][<flags>][$FG,2$h$FG$<aux_fmt_num>]<fmt_code>
See $LK,"StrPrintJoin",A="MN:StrPrintJoin"$().
<flags>:
$ID,2$$FG,2$'t'$FG$ truncate to <width>.
$FG,2$','$FG$ add commas every three digits or four nibbles.
$FG,2$'$$'$FG$ makes $FG,2$%Q$FG$ convert $FG,2$'$$'$FG$ to $FG,2$"\044"$FG$.
$FG,2$'/'$FG$ makes $FG,2$%Q$FG$ and $FG,2$%q$FG$ convert $FG,2$'%'$FG$ to $FG,2$"%%"$FG$.
$ID,-2$
<aux_fmt_num>:
$ID,2$For $FG,2$"%n"$FG$, $FG,2$"%d"$FG$ or $FG,2$"%u"$FG$, the <aux_fmt_num> causes thousands mode. $FG,2$"%h?n"$FG$ will pick a var exponent multiples of three unit, while $FG,2$"%h-3n"$FG$ will display milli units or $FG,2$"%h6n"$FG$ will display mega units. The $FG,2$'k'$FG$ flag is always on for $FG,2$"%n"$FG$. See $LK,"::/Demo/Print.CPP"$.
For $FG,2$"%c"$FG$ or $FG,2$"%C"$FG$, the <aux_fmt_num> repeats the char that many times.$ID,-2$
<fmt_code>:
$ID,2$$FG,2$"%n"$FG$ floating point in engineering notation, exponents being multiples of three. If it has a <aux_fmt> code, it will display scientific units letters.
$FG,2$"%S"$FG$ $LK,"Define",A="MN:Define"$() entry.
$FG,2$"%C"$FG$ $LK,"ToUpper",A="MN:ToUpper"$() character.
$FG,2$"%h25c",'\n';$FG$ 25 new-lines.
$FG,2$"%h*c",25,'\n';$FG$ 25 new-lines.
$FG,2$"%F"$FG$ text file.
$FG,2$"%p"$FG$ ptr.
$FG,2$"%P"$FG$ link to ptr.
$FG,2$"%D"$FG$ date. Pass a $LK,"CDate",A="MN:CDate"$.
$FG,2$"%T"$FG$ time. Pass a $LK,"CDate",A="MN:CDate"$.
$FG,2$"%z"$FG$ sub_entry of an enumerated list of text entries. See $LK,"LstSub",A="MN:LstSub"$(). Pass sub_entry_num first, list second.
$FG,2$"%Z"$FG$ $LK,"DefineLstLoad",A="MN:DefineLstLoad"$() subentry. Pass sub_entry_num first, define_name second.
$FG,2$"%Q"$FG$ convert "\" to "\\" and quote to backslash quote. (For use in creating strs in strs.)
$FG,2$"%q"$FG$ reverse a $FG,2$"%Q"$FG$.
$ID,-2$
$FG,5$$TX+CX,"Print Family"$$FG$
$LK,"MStrPrint",A="MN:MStrPrint"$(U8 *fmt,...) is like $LK,"StrPrint",A="MN:StrPrint"$(U8 *dst,U8 *fmt,...) but it returns a $LK,"MAlloc",A="MN:MAlloc"$ated str. It is vary handy because you don't have to worry about overflow.
$LK,"CatPrint",A="MN:CatPrint"$(U8 *_dst,U8 *fmt,...) concatenates a formated string.
$LK,"Auto",A="MN:Auto"$(U8 *fmt,...) sends text to the current task's input buffer.
$LK,"AutoStr",A="MN:AutoStr"$(U8 *fmt,...) sends text of an $LK,"AutoFile",A="FF:::/Doc/Glossary.TXT,AutoFile"$ to the keyboard stream of the current TASK but can also do mouse cmds.
$LK,"XTalk",A="MN:XTalk"$(CTask *task,U8 *fmt,...) and text to another task's input buffer.
$LK,"XTalkStr",A="MN:XTalkStr"$(CTask *task,U8 *fmt,...) sends text of an $LK,"AutoFile",A="FF:::/Doc/Glossary.TXT,AutoFile"$ to the keyboard stream of another TASK but can also do mouse cmds.
$LK,"DocPrint",A="MN:DocPrint"$(CDoc *doc,U8 *fmt,...) sends text to a document. You can buffer to a Doc and save it, providing the functionality of $FG,2$fprintf$FG$. See $LK,"::/Demo/Dsk/FPrintF.CPP"$.
$LK,"Adam",A="MN:Adam"$(U8 *fmt,...) sends text to the adam task to be compiled and run.
$LK,"AdamLog",A="MN:AdamLog"$(U8 *fmt,...) and $LK,"AdamErr",A="MN:AdamErr"$(U8 *fmt,...) send text to the adam task to be displayed.
$LK,"StreamPrint",A="MN:StreamPrint"$(U8 *fmt,...) sends text to the stream of code being compiled and must reside in a $FG,2$#exe{}$FG$ blk.
$LK,"GrPrint",A="MN:GrPrint"$(CDC *dc,I64 x,I64 y,U8 *fmt,...) and $LK,"GrVPrint",A="MN:GrVPrint"$() plots text in graphics mode.
$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,"AFPrint",A="MN:AFPrint"$(I64 mS,U8 *fmt,...) $LK,"PutChars",A="MN:PutChars"$()s one at a time with a delay.
$LK,"RawPrint",A="MN:RawPrint"$(I64 mS,U8 *fmt,...) sends direct to screen memory, bypassing window manager.
$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.
+3 -5
View File
@@ -1,9 +1,7 @@
$WW,1$The TempleOS profiler records statistics on what code location was executing when a task was preempted. You can learn where most time is wasted. There are two modes, $LK,"ProfBin",A="MN:ProfBin"$() which monitors a range of buckets and $LK,"ProfAll",A="MN:ProfAll"$() which records a hit location as well as count. I recommend $LK,"ProfAll",A="MN:ProfAll"$().
$WW,1$The profiler records where the CPU was executing when the $TX,"1000 Hz",D="DD_JIFFY_HZ"$ timer interrupt occured, so you can learn where time is spent.
You can pass a subroutine depth level argument which records a hit in not only the routine executing, but the routines which called it, as well.
Use the $LK,"Prof",A="MN:Prof"$() depth argument to record a hit in the N routines which called the current routine, as well.
When done collecting statistics, use $LK,"ProfRep",A="MN:ProfRep"$() for a report. You might need a $LK,"DocMax",A="MN:DocMax"$() to expand the command line window buffer to fit it all.
You can set the CPU to monitor with $LK,"ProfCPUSet",A="MN:ProfCPUSet"$().
Study the code. The profiler is very simple and you might want to enhance it or modify it to debug something in particular.
Study the code. The profiler is very simple. You might want to enhance it or modify it to debug something in particular.
+10 -7
View File
@@ -1,8 +1,8 @@
$FG,5$$TX+CX,"TempleOS Quirks"$$FG$
$FG,5$$TX+CX,"Quirks"$$FG$
$WW,1$* You run a risk of problems if you do file operations on the same files simultaneously because there is $BK,1$no file sharing/locking mechanism$BK,0$. Generally, the last write wins.
* When using $FG,2$FAT32$FG$, TempleOS does not generate unique short-entry names. Not all $FG,2$FAT32$FG$ filenames are valid TempleOS names and it will complain. Do not access $FG,2$FAT32$FG$ drives not dedicated to TempleOS. Disable them with $LK,"DrvEnable",A="MN:DrvEnable"$(OFF), or they will generate error messages. $FG,2$FAT32$FG$ involves a long and short name for each file. TempleOS isn't so good at making distinct short names, so don't make files with same 11 characters, or you're asking for trouble when accessing from Windows.
* When using $FG,2$FAT32$FG$, TempleOS does not generate unique short-entry names, the ones with the $FG,2$~$FG$s. Not all $FG,2$FAT32$FG$ filenames are valid TempleOS names and it will complain. Do not access $FG,2$FAT32$FG$ drives not dedicated to TempleOS. Disable them with $LK,"DrvEnable",A="MN:DrvEnable"$(OFF), or they will generate error messages. $FG,2$FAT32$FG$ involves a long and short name for each file.
* The stk does not grow because virtual mem is not used. I recommend allocating large local vars from the heap. You can change $LK,"DFT_STK",A="MN:DFT_STK"$ and recompile $FG,2$Kernel$FG$ or request more when doing a $LK,"Spawn",A="MN:Spawn"$().
@@ -18,7 +18,7 @@ $WW,1$* You run a risk of problems if you do file operations on the same files s
$ID,2$
A) $LK,"DocBottom",A="MN:DocBottom"$() followed by $LK,"DocClear",A="MN:DocClear"$() to clear the $LK,"CDoc",A="MN:CDoc"$ so it has no active widgets.
B) Disable window mgr button click checking with $FG,4$Fs->win_inhibit$FG$ set to mask $LK,"WIF_IP_L",A="MN:WIF_IP_L"$|$LK,"WIF_IP_L_D",A="MN:WIF_IP_L_D"$|$LK,"WIF_IP_R",A="MN:WIF_IP_R"$|$LK,"WIF_IP_R_D",A="MN:WIF_IP_R_D"$. This inhibits window mgr operations but still generates messages from button clicks.
B) Disable window mgr button click checking with $FG,4$Fs->win_inhibit$FG$ set to mask $LK,"WIF_SELF_IP_L",A="MN:WIF_SELF_IP_L"$|$LK,"WIF_FOCUS_TASK_IP_L_D",A="MN:WIF_FOCUS_TASK_IP_L_D"$|$LK,"WIF_SELF_IP_R",A="MN:WIF_SELF_IP_R"$|$LK,"WIF_FOCUS_TASK_IP_R_D",A="MN:WIF_FOCUS_TASK_IP_R_D"$. This inhibits window mgr operations but still generates messages from button clicks.
$ID,-2$
* $FG,2$switch/case$FG$ statements allocate a single jump table--do not use with wide, sparse ranges of case values.
@@ -32,13 +32,16 @@ $ID,-2$
* The assembler's error msgs are often off by a line and undefines are cryptic.
* The last semicolon on the cmd line is converted to a dbl semicolon because the compiler looks ahead before doing a cmd. This normally has no negative effect, but when entering "$FG,2$if$FG$" statements with "$FG,2$else$FG$" clauses it presents problems.
* The last semicolon on the cmd line is converted to a dbl semicolon because the compiler looks ahead before doing a cmd. This normally has no negative effect, but when entering $FG,2$if$FG$ statements with $FG,2$else$FG$ clauses it presents problems.
* You can do a $FG,2$class$FG$ fwd reference by using $FG,2$extern$FG$ on the first declaration, but you can only do ptr references to the $FG,2$class$FG$.
* When doing something like
$FG,4$$ID,2$$ID,2$U16 *_w=0xF0000000;
*_w|=0x8000;
$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$ instruction resulting 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.
* 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
@@ -6,7 +6,7 @@ $HL,1$#define CDIR_FILENAME_LEN 38 //Must include terminator zero
public class CDirEntry //64-byte fixed-size
{
U16 attr; //See $LK,"_ATTR_DIR",A="MN:_ATTR_DIR"$. I would like to change these.
U16 attr; //See $LK,"RS_ATTR_DIR",A="MN:RS_ATTR_DIR"$. I would like to change these.
U8 name[CDIR_FILENAME_LEN]; //See $LK,"chars_bitmap_filename",A="MN:chars_bitmap_filename"$, $LK,"FileNameChk",A="MN:FileNameChk"$
I64 cluster; //One sector per cluster. I might change origin, let's talk.
I64 size; //In bytes
+1 -1
View File
@@ -2,4 +2,4 @@ $WW,1$$FG,5$$TX+CX,"Graphic Resource Help"$$FG$
A sprite is an ordered list of elements such as lines, rectangles, bitmaps and color changes. In a program's source code, you first make a sprite. Then, you insert a pointer to it.
You can create an icon on your personal menu or in any document by placing a sprite with a payload of $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ code to execute. This is a called "sprite macro". If you check "Pop-Up", it will spawn a new task and run the payload. If you have it on your personal menu, you can, optionally, check "Esc" and it will exit to the cmd-line shell and print the macro similar to how the Linux history works.
You can create an icon on your PersonalMenu or in any document by placing a sprite with a payload of $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ code to execute. This is a called "sprite macro". If you check "Pop-Up", it will spawn a new task and run the payload. If you have it on your PersonalMenu, you can, optionally, check "Esc" and it will exit to the cmd line shell and print the macro similar to how the Linux history works.
+6 -6
View File
@@ -1,5 +1,5 @@
$TX+CX,"TempleOS V2.03",D="DD_OS_NAME_VERSION"$
$TX+CX,"TempleOS V2.06",D="DD_OS_NAME_VERSION"$
@@ -23,12 +23,12 @@ $SP+CX,"",BI=1,BP="::/Misc/StockSprites.TXT,TempleOSLogo"$
God on Tap!
$TX+CX,"God on Tap!"$
$FG,2$<F7>$FG$ Word
$FG,2$<SHIFT-F7>$FG$ Passage
$FG,2$<F6>$FG$ Song
$FG,2$<SHIFT-F6>$FG$ Doodle
$CM-RE+CX,LE=-9$ $FG,2$<F7>$FG$ Word
$CM-RE+CX,LE=-9$$FG,2$<SHIFT-F7>$FG$ Passage
$CM-RE+CX,LE=-9$ $FG,2$<F6>$FG$ Song
$CM-RE+CX,LE=-9$$FG,2$<SHIFT-F6>$FG$ Doodle
$LK+CX,"Trivial Solutions",A="FI:::/Doc/TrivialSolutions.TXT"$
+3 -3
View File
@@ -1,7 +1,7 @@
$WW,1$A $FG,4$CSprite$FG$, is an ordered list of $LK,"these",A="MN:GRST_END"$ elements, created with $FG,2$<CTRL-R>$FG$$FG$. Normally, they are packed together in a list and the address of the first is passed to routines.
$WW,1$A $FG,4$CSprite$FG$, is an ordered list of $LK,"these",A="MN:SPT_END"$ elements, created with $FG,2$<CTRL-r>$FG$$FG$. Normally, they are packed together in a list and the address of the first is passed to routines.
See $LK,"::/Demo/Graphics/SpritePlot.CPP"$, $LK,"::/Demo/Graphics/SpritePlot3D.CPP"$ and $LK,"::/Demo/Graphics/SpritePut.CPP"$ and $LK,"SpriteMesh",A="MN:SpriteMesh"$().
See $LK,"::/Demo/Graphics/SpritePlot.CPP"$, $LK,"::/Demo/Graphics/SpritePlot3D.CPP"$, $LK,"::/Demo/Graphics/SpritePut.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 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.
See $LK,"::/Adam/Gr/GrSpritePlot.CPP",A="FL:::/Adam/Gr/GrSpritePlot.CPP,1"$ for how CSprite are stored.$FG$
-4
View File
@@ -1,7 +1,3 @@
$WW,1$$FG,5$$TX+CX,"Sprite Edit as Text Help"$$FG$
You can cut, paste and duplicate elements.
See the format for $LK,"CSprites",A="MN:CSprite"$.
Sadly, you cannot change the length of variable-length element types.
+17 -17
View File
@@ -2,28 +2,28 @@ $FG,5$$TX+CX,"TempleOS"$$FG$
$LK+CX,"Trivial Solutions",A="FI:::/Doc/TrivialSolutions.TXT"$
$WW+H,1$$TR-C,"Keyboard Ctrls"$
$ID,2$$FG,9$Enter$FG$ Right-click menu
$FG,9$Space Bar$FG$ Edit (view)
$FG,9$Esc$FG$ Save and exit
$FG,9$Shift-Esc$FG$ Abort
$FG,9$Ctrl-m$FG$ Personal Menu
$FG,9$Windows Key $FG$Pull-down Menu
$BK,1$$MA+LA-X,"F1",LM="Msg(MSG_KEY_DOWN,0,SC_F1);"$$BK,0$ Help
$ID,2$$FG,2$Enter$FG$ Right-click menu
$FG,2$Space Bar$FG$ Edit (view)
$FG,2$Esc$FG$ Save and exit
$FG,2$Shift-Esc$FG$ Abort
$FG,2$Ctrl-m$FG$ Personal Menu
$FG,2$Windows Key $FG$Pull-down Menu
$MA+LA-X,"F1",LM="Msg(MSG_KEY_DOWN,0,SC_F1);"$ Help
Other keys: $MA-X+PU,"Key Map",LM="KeyMap;View;\n"$
$ID,-2$
$TR-C,"Mouse Ctrls"$
$ID,2$$FG,9$Right-Click$FG$ Right-click menu
$FG,9$Left-Click$FG$ Edit (view)
$FG,9$Double-Left$FG$ Save and exit
$FG,9$Double-Right$FG$ Abort
$FG,9$Top of Screen$FG$ Pull-down menu
$ID,2$$FG,2$Right-Click$FG$ Right-click menu
$FG,2$Left-Click$FG$ Edit (view)
$FG,2$Double-Left$FG$ Save and exit
$FG,2$Double-Right$FG$ Abort
$FG,2$Top of Screen$FG$ Pull-down menu
$ID,-2$
$TR-C,"Keyboard-Mouse Ctrls"$
$ID,2$$FG,9$Ctrl-LeftDrag$FG$ Grab-Scroll Window
$FG,9$Ctrl-Right$FG$ Null scrolling
$FG,9$Ctrl-Alt-z$FG$ Zoom screen on Mouse
$FG,9$Ctrl-Alt-Z$FG$ Unzoom screen on Mouse
$ID,2$$FG,2$Ctrl-LeftDrag$FG$ Grab-Scroll Window
$FG,2$Ctrl-Right$FG$ Null scrolling
$FG,2$Ctrl-Alt-z$FG$ Zoom screen on Mouse
$FG,2$Ctrl-Alt-Z$FG$ Unzoom screen on Mouse
$ID,-2$
Remember to terminate cmds with a semicolon.
$LK,"Help Index",A="FI:::/Doc/HelpIndex.TXT"$ $LK,"Quick Start--Command Line",A="HI:Cmd Line (Typically)"$
$LK,"Help & Index",A="FI:::/Doc/HelpIndex.TXT"$, $LK,"Quick Start: Cmd line",A="FI:::/Doc/CmdLineOverview.TXT"$
+6 -6
View File
@@ -13,15 +13,15 @@ The $FG,2$$TX,"trivial solution",HTML="http://en.wikipedia.org/wiki/Trivial_solu
* No networking.
* Least (greatest) common denominator hardware support. Mostly, one driver for each device class. I can't be in the business of different drivers. Compatibility is the greatest challenge for PC operating systems. Disk code does not use interrupts, avoiding compatibility risks. PS/2 keyboard/mouse is used instead of USB, also more compatible.
* Least (greatest) common denominator hardware support. Mostly, one driver for each device class. I can't be in the business of different drivers. Compatibility is the greatest challenge for PC operating systems. Disk code does not use interrupts, avoiding compatibility risks. $FG,2$PS/2$FG$ keyboard/mouse is used instead of $FG,2$USB$FG$, also more compatible.
* $FG,2$640x480$FG$ 16 colors. Updates whole screen at 60 fps, optimized for full screen games where "invalid rectangles" are counter-productive.
* $FG,2$640x480$FG$ 16 colors. Updates whole screen at $FG,2$60 fps$FG$, optimized for full screen games where $FG,2$InvalidRectangle$FG$s are counter-productive.
* One font, 8x8. Text and graphic layers done in software with text normally on an 8x8 grid. It can run in Text mode if graphic initialization fails.
* Compiler extends all values to 64-bit when fetched and does only 64-bit computations intermediately. Assembler has minimal 16-bit support, good enough for compiling boot loaders.
* No object files. Linking can be done at $LK,"Load",A="MN:Load"$() time for $FG,2$AOT$FG$ modules, if you insist on not using $FG,2$JIT$FG$. Modules have imports and exports.
* No object files. Use $FG,2$JIT$FG$.
* Whole files are processed almost exclusively, allowing compression.
@@ -31,11 +31,11 @@ The $FG,2$$TX,"trivial solution",HTML="http://en.wikipedia.org/wiki/Trivial_solu
* No child windows. One window per task. Buttons are widgets, not child windows. There are child tasks, however.
* No distinction between "thread", "process" or "task".
* No distinction between $FG,2$thread$FG$, $FG,2$process$FG$ or $FG,2$task$FG$.
* The $LK,"Scheduler",A="FI:::/Kernel/Scheduler.CPP"$ is mostly for home systems, not servers or mainframes. The focus task is all important. Disk requests are not broken-up, so sharing is bad, however.
* The $LK,"Scheduler",A="FI:::/Kernel/Sched.CPP"$ is mostly for home systems, not servers or mainframes. The focus task is all important. Disk requests are not broken-up, so sharing is bad, however.
* $LK,"MultiCore",A="FI:::/Doc/MultiCore.TXT"$ is done master/slave, instead of $FG,2$SMP$FG$. Core zero explicitly assigns jobs. Locks are present allowing multicore file, heap, and hardware access, though.
* $LK,"MultiCore",A="FI:::/Doc/MultiCore.TXT"$ is done $FG,2$master/slave$FG$, instead of $FG,2$SMP$FG$. Core zero explicitly assigns jobs. Locks are present allowing multicore file, heap, and hardware access, though.
* $LK,"Music",A="MN:Play"$ is done with an elegant one-voice notation.
+15
View File
@@ -0,0 +1,15 @@
$WW,1$$LK,"gr.text_base",A="MN:CGrGlbls"$ must be updated 60fps in your Fs->draw_it() callback. You probably want $LK,"GrPrint",A="MN:GrPrint"$() or just $LK,"Print",A="MN:Print"$(). The $LK,"DolDoc",A="FI:::/Doc/DolDocOverview.TXT"$ code takes care of plotting text to $LK,"gr.text_base",A="MN:CGrGlbls"$.
Bits 0-7 8-Bit ASCII Screen Code
Bits 8-11 Foreground $LK,"color",A="MN:BLACK"$
Bits 12-15 Background $LK,"color",A="MN:BLACK"$
Bits 16-20 Signed X pos shift val
Bits 21-25 Signed Y pos shift val
Bit 28 $LK,"Blink",A="MN:ATTRF_BLINK"$
Bit 29 $LK,"Invert",A="MN:ATTRF_INVERT"$ed (Swap foreground and background)
Bit 30 $LK,"Selected",A="MN:ATTRF_SELECTED"$ (XOR colors with FF)
Bit 31 $LK,"Underline",A="MN:ATTRF_UNDERLINE"$
$LK,"GrUpdateWins",A="MN:GrUpdateWins"$() calls $LK,"DocUpdateTaskDocs",A="MN:DocUpdateTaskDocs"$() which calls $LK,"DocRecalc",A="MN:DocRecalc"$() where the document text is plotted into $LK,"gr.text_base",A="MN:CGrGlbls"$. Then, $LK,"GrUpdateTextBG",A="MN:GrUpdateTextBG"$() and $LK,"GrUpdateTextFG",A="MN:GrUpdateTextFG"$() render the $LK,"gr.text_base",A="MN:CGrGlbls"$ onto $LK,"gr.dc2",A="MN:CGrGlbls"$, a raw graphic bitmap.
See $LK,"::/Demo/Games/Maze.CPP"$.
+1 -1
View File
@@ -1 +1 @@
$WW,1$Intel/AMD have an instruction that returns the num of CPU cycles since boot. This is not a steady, calibrated real time value. TempleOS measures it and you can convert with $LK,"time_stamp_freq",A="MN:time_stamp_freq"$, a value continuously calibrated from other timers.
$WW,1$Intel/AMD have an instruction that returns the num of CPU cycles since boot. This is not a steady, calibrated real time value. TempleOS measures it and you can convert with $LK,"cnts.time_stamp_freq",A="MN:CCntsGlbls"$, a value continuously calibrated from other cnts.
+1 -1
View File
@@ -1 +1 @@
$WW,1$The HPET, high precision event timer, is read with $LK,"HPET",A="MN:HPET"$() and has a frequency of $LK,"HPET_freq",A="MN:HPET_freq"$. A typical freq value is 14.3 Mhz It might not be available on all systems.
$WW,1$The HPET, high precision event timer, is read with $LK,"HPET",A="MN:HPET"$() and has a frequency of $LK,"cnts.HPET_freq",A="MN:CCntsGlbls"$. A typical freq value is 14.3 Mhz It might not be available on all systems.
+2 -2
View File
@@ -1,7 +1,7 @@
$WW,1$One jiffy is one time slice. $LK,"sys_jiffies",A="MN:sys_jiffies"$ returns time slices since boot.
$WW,1$One jiffy is one time slice. $LK,"cnts.jiffies",A="MN:CCntsGlbls"$ returns time slices since boot.
$LK,"SysTimerRead",A="MN:SysTimerRead"$ reads the timer ticks since boot. It's not as fast as $LK,"GetTSC",A="MN:GetTSC"$.
Use $LK,"JIFFY_FREQ",A="MN:JIFFY_FREQ"$ to convert $LK,"sys_jiffies",A="MN:sys_jiffies"$.
Use $LK,"JIFFY_FREQ",A="MN:JIFFY_FREQ"$ to convert $LK,"cnts.jiffies",A="MN:CCntsGlbls"$.
Use $LK,"SYS_TIMER_FREQ",A="MN:SYS_TIMER_FREQ"$ to convert $LK,"SysTimerRead",A="MN:SysTimerRead"$.
+34 -36
View File
@@ -1,51 +1,47 @@
$WW,1$$FG,5$$IV,1$$TX+CX,"TIPS"$$IV,0$$FG$
$WW,1$$FG,5$$TX+CX,"Tips"$$FG$
* Turn-off or reboot ($FG,2$<CTRL-ALT-DEL>$FG$) at any time, except during disk writes. Writes are not cached.
* 64-bit values are most efficient for the compiler.
* See $MA-X+PU,"Key Map",LM="KeyMap;View;\n"$ for a list of defined keys. Define your own keys in $LK,"MyPutKey",A="MN:MyPutKey"$(). See $LK,"Keyboard Devices",A="HI:Keyboard Devices/System"$.
* $FG,2$<ALT-m>$FG$ maximizes a window. $FG,2$<ALT-SHIFT-w>$FG$ closes WordStat. $FG,2$<ALT-w>$FG$ brings back WordStat. $FG,2$<ALT-v>$FG$ vertically tiles windows. $FG,2$<ALT-h>$FG$ horizontally tiles windows. The $FG,2$ALT$FG$ keys are defined in $LK,"::/Accts/Adam3cKeyPlugIns.CPP"$. You can customize them.
* 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-ROM 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:
$FG,5$Merge(\"D:/*\",\"E:/*\",\"+r+d\");$FG$ to check my changes.
* $FG,2$<CTRL-M>$FG$ at the cmd line to access your personal menu. 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.
* $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 adjust the num of answers displayed by setting $FG,2$Fs->answers_displayed$FG$ to a num from 0-3 in your $LK,"UserStartUp",A="MN:UserStartUp"$ routine.
* 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$ans0$FG$,$FG,2$ans1$FG$, etc. in cmd line expressions. They hold results from the last cmd line operations. 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$ansf0$FG$ or $FG,2$ansf1$FG$.
* Use the PullDown menu at the top of the screen to learn commands, or for finding the keyboard controls to games.
* Use the PullDown menu at the top of the screen to learn commands, like for games.
* You can adjust the mouse movement rate by setting global vars in your start-up file. See $LK,"mouse scale",A="FF:HOME/Adam3aLocalize.CPP,mxx_scale"$.
* If your mouse wheel doesn't work, you might try an actual $FG,2$PS/2$FG$ mouse. My new machine does not have $FG,2$PS/2$FG$ ports.
* You can adjust the mouse movement rate by setting global vars in your start-up file. See $LK,"mouse scale",A="FF:HOME/Adam3aLocalize.CPP,mouse.scale"$.
* You can set your local time zone by setting the $LK,"local_time_offset",A="MN:local_time_offset"$ global var in a start-up file. It's units are $LK,"CDATE_FREQ",A="MN:CDATE_FREQ"$. See $LK,"local time",A="FF:HOME/Adam3aLocalize.CPP,local_time"$.
* See $MA-X+PU,"Key Map",LM="KeyMap;View;\n"$ for a list of defined keys. Define your own keys in $LK,"MyPutKey",A="MN:MyPutKey"$(). See $LK,"::/Doc/KeyBoard.TXT"$.
* $FG,2$<CTRL-SHIFT-L>$FG$ in the editor to reindent a $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ function or renumber an asm routine's local labels.
* You can use $FG,2$filter_lines$FG$ in the editor text search form ($FG,2$<CTRL-F>$FG$) to temporarily display just lines near each match. A value of $FG,2$filter lines$FG$ set to $FG,2$5$FG$ will display lines within 5 lines of matches. Then, you can do another find to a different string and achieve a $FG,2$AND$FG$ search. When finished, press $FG,2$<ESC>$FG$.
* You can use $FG,2$filter_lines$FG$ in the editor text search form ($FG,2$<CTRL-f>$FG$) to temporarily display just lines near each match. A value of $FG,2$filter lines$FG$ set to $FG,2$5$FG$ will display lines within 5 lines of matches. Then, you can do another find to a different string and achieve a $FG,2$AND$FG$ search. When finished, press $FG,2$<ESC>$FG$.
* You can recompile and reinstall the kernel with $LK,"MakeOSPrtBootInstall",A="MN:MakeOSPrtBootInstall"$(). You'll probably want to make a function for recompiling that uses the $LK,"Auto",A="MN:Auto"$() function to answer the cfg questions. See my technique $LK,"Cfg Strs",A="FL:::/Demo/AcctExample/TSAdam.CPP,1"$ $LK,"Update Funs",A="FL:::/Demo/AcctExample/TSDistro.CPP,1"$.
* You can disable $FG,2$WORDSTAT$FG$ commenting-out $LK,"WSInit",A="FF:HOME/Adam3eSys.CPP,WSInit"$() in $LK,"HOME/Adam3eSys.CPP",A="FF:HOME/Adam3eSys.CPP,WSInit"$.
* $LK,"Scale2Mem",A="MN:Scale2Mem"$(min,max,limit=2*1024*1024*1024) can be used for cfg questions when recompiling. The $LK,"MakeOSPrtBootInstall",A="MN:MakeOSPrtBootInstall"$() cfg prompts accept expressions, not just numbers. The dft disk cache is $FG,2$Scale2Mem(0x80000,0x8000000)$FG$.
* You can rst MultiCore CPU's if they get hung with $LK,"MPStart",A="MN:MPStart"$().
* You can permanently disable $FG,2$WordStat$FG$ commenting-out $LK,"WSInit",A="FF:HOME/Adam3eSys.CPP,WSInit"$() in $LK,"HOME/Adam3eSys.CPP",A="FF:HOME/Adam3eSys.CPP,WSInit"$.
* Boolean expressions $BK,1$not$BK,0$ in $FG,2$if$FG$ statements don't have short circuit logic and are compiled inefficiently.
* You can use $LK,"progress1",A="MN:progress1"$-$LK,"progress4",A="MN:progress4"$ in your programs for whatever you like. They're just global vars that are shown on the wallpaper. The original intent was to indicate how far along operations were. There's no coordination, so different apps might interfere. I use them most for debugging--just values easily viewed. See $LK,"::/Demo/Progress.CPP"$.
* You can save the cmd line doc as text with $FG,2$<CTRL-A>$FG$. For a bitmap screen capture, use $LK,"BMPFileCaptureScreen",A="MN:BMPFileCaptureScreen"$(). You might want to make a hot key. See $LK,"BMPFileCaptureScreen",A="FF:::/Demo/AcctExample/TSAdam.CPP,BMPFileCaptureScreen"$.
* Use $LK,"DocMax",A="MN:DocMax"$() to adjust the size of the cmd line buf. It counts $LK,"CDoc",A="MN:CDoc"$ entries, not lines.
* Many data structures have a $FG,2$user_data$FG$ member. Those are available for you to store a data item, for convenience. $LK,"CTask",A="MN:CTask"$, $LK,"CDocEntry",A="MN:CDocEntry"$ and $LK,"CDirEntry",A="MN:CDirEntry"$ have them. You shouldn't encounter conflicts with TempleOS using them.
* You can reduce mem usage by making a smaller disk cache when you recompile the kernel; disabling $FG,2$WORDSTAT$FG$; Specifying smaller stk sizes when doing $LK,"Spawn",A="MN:Spawn"$(), changing $LK,"DFT_STK",A="MN:DFT_STK"$, and using $LK,"DocMax",A="MN:DocMax"$() to reduce the cmd line buffer size.
* If, for some strange reason, you wanted to reduce mem usage, make a smaller disk cache when you recompile the kernel; disabling $FG,2$WordStat$FG$; Specify smaller stk sizes when doing $LK,"Spawn",A="MN:Spawn"$(), chang $LK,"DFT_STK",A="MN:DFT_STK"$, and using $LK,"DocMax",A="MN:DocMax"$() to reduce the cmd line buffer size.
* Filenames ending in "$FG,2$.Z$FG$" will be automatically compressed and uncompressed when read or written. The compression method is not supported by other operating systems. You can store files uncompressed by $LK,"Move",A="MN:Move"$()ing them to a filename not ending in "$FG,2$.Z$FG$". See $LK,"::/Doc/TSZ.TXT"$ if you want to uncompress while in $FG,2$WINDOWS$FG$.
@@ -59,27 +55,29 @@ $FG,5$Merge(\"D:/*\",\"E:/*\",\"+r+d\");$FG$ to check my changes.
* $LK,"OptEqu",A="MN:OptEqu"$($LK,"OPTf_ECHO",A="MN:OPTf_ECHO"$,ON) can be placed in $LK,"Adam1.CPP",A="FI:::/Kernel/Adam1.CPP"$ to echo start-up scripts.
* Use $LK,"Plain",A="MN:Plain"$() to edit a plain text file. You'll need this if your file has $FG,2$$$$FG$'s. Use the $LK,"::/Misc/Dollar.CPP"$ utility to strip dollar signs in text files.
* Use $LK,"Plain",A="MN:Plain"$() to edit a plain text file. You'll need this if your file has $FG,2$$$$FG$'s. Use the $LK,"::/Misc/ToDolDoc.CPP"$ utility to convert plain text to DolDoc's.
* Use $LK,"Silent",A="MN:Silent"$() to disable screen text output.
* Grab-scroll any window at any time with $FG,2${CTRL-LEFT-DRAG}$FG$. Null grab-scrolling with $FG,2${CTRL-RIGHT}$FG$.
* Grab-scroll any window at any time with $FG,2${CTRL-LEFT-MOUSE-DRAG}$FG$. Null grab-scrolling with $FG,2${CTRL-RIGHT-MOUSE}$FG$.
* Use $FG,2$<CTRL-ALT-Z>$FG$ to zoom-in and $FG,2$<CTRL-ALT-SHIFT-Z>$FG$ to zoom-out. You can scroll by moving to the edge of the window. Set $LK,"gr_continuous_scroll",A="MN:gr_continuous_scroll"$ to $FG,2$TRUE$FG$ if you want.
* Use $FG,2$<CTRL-ALT-z>$FG$ to zoom-in and $FG,2$<CTRL-ALT-SHIFT-Z>$FG$ to zoom-out. You can scroll by moving to the edge of the window. Set $LK,"gr.continuous_scroll",A="MN:CGrGlbls"$ to $FG,2$TRUE$FG$ if you want.
* Use $FG,2$<CTRL-ALT-G>$FG$ and $FG,2$<CTRL-ALT-SHIFT-G>$FG$ to display a grid on the screen.
* Use $FG,2$<CTRL-ALT-g>$FG$ and $FG,2$<CTRL-ALT-SHIFT-G>$FG$ to display a grid on the screen.
* Use $FG,2$<CTRL-ALT-S>$FG$ will capture the screen as a sprite on the clipboard.
* Use $FG,2$<CTRL-ALT-a>$FG$ to enter an extended ASCII char.
* Use $FG,2$<CTRL-ALT-A>$FG$ to enter an extended ASCII char.
* Use $FG,2$<CTRL-ALT-s>$FG$ will capture the screen as a sprite on the clipboard. You can save the cmd line doc as text with $FG,2$<CTRL-a>$FG$.
* You can save a sprite as a $FG,2$.BMP$FG$ file in $FG,2$<CTRL-r>$FG$ on the Sprite BitMap Menu.
* There are handy functions--$FG,2$F(),R(),FD()$FG$ and $FG,2$RD()$FG$ which are defined in $LK,"HOME/Adam3dWrappers.CPP"$. You're encouraged to change them, since they're in acct files. They will perform find-and-replace operations accross multiple files. The $FG,2$+l$FG$ flag is particularly useful since it limits to whole labels. The $FG,2$+lb$FG$ and $FG,2$+la$FG$ flags limit to whole labels just before or after. You are encouraged to add or modify handy wrapper functions to make cmd line operations easier.
* When using $LK,"Grep",A="MN:Grep"$() while modifying code, work from the bottom-up so that line numbers are correct. If you work top-down, then inserting or deleting lines causes the lower file links will be incorrect.
* You can save files after making changes, anytime you are within the editor, like when viewing help/macro files. $FG,2$<CTRL-A>$FG$ saves as, $FG,2$<CTRL-S>$FG$ saves with the same name in the scrolling title bar. Hitting $FG,2$<ESC>$FG$ will exit and save. ($FG,2$<SHIFT-ESC>$FG$ will abort). You can save the cmd line window to a file, too, since you're actually in the editor when you're at the cmd line.
* You can save files after making changes, anytime you are within the editor, like when viewing help/macro files. $FG,2$<CTRL-a>$FG$ saves as, $FG,2$<CTRL-s>$FG$ saves with the same name in the scrolling title bar. Hitting $FG,2$<ESC>$FG$ will exit and save. ($FG,2$<SHIFT-ESC>$FG$ will abort). You can save the cmd line window to a file, too, since you're actually in the editor when you're at the cmd line.
* When using $FG,2$<CTRL-L>$FG$ to insert links in documents, you can usually leave the $FG,2$Tag Text$FG$ blank and it will be filled-in automatically based on other entries.
* When using $FG,2$<CTRL-l>$FG$ to insert links in documents, you can usually leave the $FG,2$Tag Text$FG$ blank and it will be filled-in automatically based on other entries.
* There is a feature of the precompiler that allows code to be executed in the middle of compilation and data inserted into the compilation stream. Click here for an example: $LK,"#exe {",A="FF:::/Kernel/KEnd.CPP,#exe {"$.
@@ -87,25 +85,25 @@ $FG,5$Merge(\"D:/*\",\"E:/*\",\"+r+d\");$FG$ to check my changes.
* Use $LK,"View",A="MN:View"$() in Pop-up macros to linger until the user presses $FG,2$<ESC>$FG$ or $FG,2$<SHIFT-ESC>$FG$.
* You can access the word under the cursor at $LK,"ws_cur_word",A="MN:ws_cur_word"$, but you should probably turn-off preemption or interrupts momentarily to copy it.
* You can access the word under the cursor at $LK,"ws.cur_word",A="MN:CWordStatGlbls"$, but you should probably turn-off preemption or interrupts momentarily to copy it.
* You can reactivate $FG,2$WORDSTAT$FG$ after closing it by pressing $FG,2$CTRL-FUN KEY$FG$.
* You can reactivate $FG,2$WordStat$FG$ after closing it by pressing $FG,2$<CTRL-Fun Key>$FG$ or $FG,2$<ALT-w>$FG$ if you have it defined.
* If you use consistent var names for items of different classes, you'll usually be able to use $FG,2$WORDSTAT$FG$'s autocomplete for member vars. I always use $FG,2$lx$FG$ for $LK,"CLex",A="MN:CLex"$ ptrs; $FG,2$doc$FG$ for $LK,"CDoc",A="MN:CDoc"$ ptrs; $FG,2$doc_e$FG$ or $FG,2$doc_ce$FG$ for $LK,"CDocEntry",A="MN:CDocEntry"$ ptrs, etc.
* If you use consistent var names for items of different classes, you'll usually be able to use $FG,2$WordStat$FG$'s autocomplete for member vars. I always use $FG,2$lx$FG$ for $LK,"CLex",A="MN:CLex"$ ptrs; $FG,2$doc$FG$ for $LK,"CDoc",A="MN:CDoc"$ ptrs; $FG,2$doc_e$FG$ or $FG,2$doc_ce$FG$ for $LK,"CDocEntry",A="MN:CDocEntry"$ ptrs, etc.
* $LK,"Preempt",A="MN:Preempt"$() is used to keep a task from being interrupted and swapped-out. It has a similar effect to turning-off interrupts. Each task has it's own preemption ctrl. A task with preemption turned-off can voluntarily $LK,"Yield",A="MN:Yield"$() with preemption off.
* You can set a color for different drives with $LK,"SetDrvTextAttr",A="MN:SetDrvTextAttr"$(). Place calls to this in $LK,"HOME/Adam3aLocalize.CPP"$.
* $FG,2$<CTRL-SHIFT-T>$FG$ to toggle to/from plain text just the $LK,"CDoc",A="MN:CDoc"$ cmd under the cursor. See $LK,"::/Demo/Doc/TextDemo.CPP"$.
* $FG,2$<CTRL-SHIFT-T>$FG$ to toggle to/from plain text just the $LK,"CDoc",A="MN:CDoc"$ cmd under the cursor. See $LK,"::/Demo/DolDoc/TextDemo.CPP"$.
* If you toggle to plain text when you are working with graphics in a document, you can add duplicate entries for sprites by entering a $FG,2$SP$FG$ cmd with the same num.
* If you toggle to plain text when you are working with graphics in a document, you can add duplicate entries for sprites by entering a $FG,2$$$SP...$$$FG$ cmd with the same num.
* If you toggle to plain text when working with graphics, you can add a str to the $FG,2$$$SP$$$FG$ entry to keep track of it. Try $FG,2$$$SP,"<2>",2$$$FG$ where '2' is the sprite num.
* If you toggle to plain text when working with graphics, you can add a str to the $FG,2$$$SP...$$$FG$ entry to keep track of it. Try $FG,2$$$SP,"<2>",BI=2$$$FG$ where '2' is the sprite num.
* I use spaces-to-tab operations on all my src files to keep them small. You have to be careful, though, because spaces in strings will be converted. I use $FG,2$<SHIFT-SPACE>$FG$ ' ' in such cases. See $LK,"S2T",A="MN:S2T"$() for spaces-to-tabs.
* You can edit an existing sprite by putting the cursor on it and pressing $FG,2$<CTRL-R>$FG$.
* You can edit an existing sprite by putting the cursor on it and pressing $FG,2$<CTRL-r>$FG$.
* When editing a sprite, you can cut and paste the elements in the sidebar text list window.
@@ -115,13 +113,11 @@ $FG,5$Merge(\"D:/*\",\"E:/*\",\"+r+d\");$FG$ to check my changes.
* You can customize the $FG,2$wallpaper$FG$. See $LK,"::/Demo/Graphics/WallPaperFish.CPP"$.
* You can adjust the screen refresh rate (software). It is automatically adjusted based on load. The range is $LK,"win_min_refresh",A="MN:win_min_refresh"$ - $FG,4$Fs->win_max_refresh$FG$.
* Your RAM disks will not be reformated when you reboot if the memory location has not changed and it finds the disk intacted.
* $FG,2$try{} catch{}$FG$ in a function will cause all vars to be non-reg.
* Using a sub-int array, $FG,2$i.u8[3]$FG$, for example, will force a var non-reg.
* Using a sub-int array, $FG,2$i.u8[3]$FG$, for example, will force a local var to non-reg.
* You can delete the $FG,4$HOME/Registry.CPP.Z$FG$ file. The policy is that deleting it will restore defaults. It is a text doc, if you want to edit it. Be careful of tree indentations.
@@ -129,7 +125,7 @@ $FG,5$Merge(\"D:/*\",\"E:/*\",\"+r+d\");$FG$ to check my changes.
* The editor's select-text mechanism allows for disjoint portions of selected text. This is a feature, not a bug -- you can cut-and-paste disjoint text.
* $LK,"time_stamp_freq",A="MN:time_stamp_freq"$ is continuously calibrated, so be careful because expressions involving it might decrease. Take a snap-shot, like this: $FG,2$timeout=$LK,"GetTSC",A="MN:GetTSC"$+$LK,"time_stamp_freq",A="MN:time_stamp_freq"$ x seconds;$FG$ and compare against $LK,"GetTSC",A="MN:GetTSC"$().
* $LK,"cnts.time_stamp_freq",A="MN:CCntsGlbls"$ is continuously calibrated. Be careful because expressions might decrease. Take a snap-shot, like this: $FG,2$timeout=$LK,"GetTSC",A="MN:GetTSC"$+$LK,"cnts.time_stamp_freq",A="MN:CCntsGlbls"$ x seconds;$FG$ and compare against $LK,"GetTSC",A="MN:GetTSC"$(). I recommend just using $LK,"tS",A="MN:tS"$ or $LK,"cnts.jiffies",A="MN:CCntsGlbls"$.
* Use $LK,"HeapLog",A="MN:HeapLog"$() and $LK,"HeapLogRep",A="MN:HeapLogRep"$() to find leaks. Don't be confused by $LK,"CDoc",A="MN:CDoc"$ allocations. Those are generated when text is written to the cmd line buffer.
@@ -148,3 +144,5 @@ $FG,5$Merge(\"D:/*\",\"E:/*\",\"+r+d\");$FG$ to check my changes.
* $LK,"ZipRep",A="MN:ZipRep"$() can highlight src files with lots of redundancy.
* With $FG,2$sub_switch_start$FG$/$FG,2$sub_switch_end$FG$, common trailing code is fast. Common leading code is slow.$FG$
* The first line of the $MA-X+PU,"Psalmody",LM="#include \"::/Apps/Psalmody/Run\"\n"$ $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ song files is a comment with a category recognized by $LK,"JukeBox",A="FF:::/Apps/Psalmody/JukeBox.CPP,JukeBox"$(). The categories are $FG,2$"no nothing"$FG$, $FG,2$"has words"$FG$, $FG,2$"has graphics"$FG$, or $FG,2$"special"$FG$. The third character in the song comment is a digit rating number, shown in $LK,"JukeBox",A="FF:::/Apps/Psalmody/JukeBox.CPP,JukeBox"$(). You can set the song rating in $LK,"JukeBox",A="FF:::/Apps/Psalmody/JukeBox.CPP,JukeBox"$() by pressing $FG,2$0$FG$-$FG,2$9$FG$. You can press $FG,2$<DELETE>$FG$ to delete songs.
+1 -1
View File
@@ -1,6 +1,6 @@
$WW,1$$LK,"CDC",A="MN:CDC"$'s have a 4x4 matrix for rotating, scaling, skewing and shifting in 3 dimensions. To make the graphics routines use the transform, you must set the $LK,"DCF_TRANSFORMATION",A="MN:DCF_TRANSFORMATION"$ flag.
The matrix consists of integers that have been scaled 32 bits ($LK,"gr_scale",A="MN:gr_scale"$). See $LK,"::/Demo/Lectures/FixedPoint.CPP"$ to learn why.
The matrix consists of integers that have been scaled 32 bits ($LK,"GR_SCALE",A="MN:GR_SCALE"$). See $LK,"::/Demo/Lectures/FixedPoint.CPP"$ to learn why.
See $LK,"GrRotXNew",A="MN:GrRotXNew"$(), $LK,"GrRotYNew",A="MN:GrRotYNew"$(), $LK,"GrRotZNew",A="MN:GrRotZNew"$(), $LK,"GrScaleNew",A="MN:GrScaleNew"$(), $LK,"GrRotXEqu",A="MN:GrRotXEqu"$(), $LK,"GrRotYEqu",A="MN:GrRotYEqu"$(), $LK,"GrRotZEqu",A="MN:GrRotZEqu"$() and $LK,"GrScaleEqu",A="MN:GrScaleEqu"$() to rotate about axes and scale. Combine them with $LK,"GrMulMat",A="MN:GrMulMat"$() and assign them to the $LK,"CDC",A="MN:CDC"$.$FG,2$dc$FG$ with $LK,"GrSetRotMat",A="MN:GrSetRotMat"$(). See $LK,"::/Demo/Graphics/Box.CPP"$.
+3 -3
View File
@@ -6,10 +6,10 @@ The $FG,2$$TX,"trivial solution",HTML="http://en.wikipedia.org/wiki/Trivial_solu
See $LK,"::/Doc/Acknowledgements.TXT"$.
See $LK,"::/Doc/Demands.TXT"$.
$FG,2$Website:$FG$
$FG,5$Website:$FG$
$TX,"www.templeos.org",HTML="http://www.templeos.org"$
$FG,2$Owner/President:$FG$
$FG,5$Owner/President:$FG$
Terry A. Davis
$TX,"ASU Transcripts",HTML="http://www.templeos.org/files/ASU_Transcripts.pdf"$
8144 Sickle Lane
@@ -17,5 +17,5 @@ Las Vegas, NV 89128
(702)254-4223
$TX,"tdavis@templeos.org",HTML="mailto:tdavis@templeos.org"$
$FG,2$About Me:$FG$
$FG,5$About Me:$FG$
I was a National Merit Scholar with a 1440 SAT at Arizona State University. Here are my $TX,"ASU Transcripts",HTML="http://www.templeos.org/files/ASU_Transcripts.pdf"$. I have a bachelor's in Computer System Engineering from ASU, basically, embedded systems, and a master's in Electrical Engineering from ASU, control systems. I worked as a software, hardware and mechanical engineer at Ticketmaster from 1990-1996. I designed a 3 axis stepper-motor-driven milling machine 1996-1997 with a CAD/CAM package for a company I started called Home Automation and Robotic Equipment. I worked for a company named Xytec Corp. 1997-1999. We made FPGA-based image processing equipment. I wrote $FG,2$$TX,"SimStructure",HTML="http://www.templeos.org/files/SimStrSetUp.zip"$$FG$ from 2000-2001 for H.A.R.E. I worked as head software/electrical engineer for a company called Graphic Technologies, 2001-2002, making replacement chips for toner printer cartridges so they could be refilled.
+3 -3
View File
@@ -1,7 +1,7 @@
$WW,1$$FG,5$$TX+CX,"Upgrading TempleOS"$$FG$
$WW,1$$PURPLE$$TX+CX,"Upgrading TempleOS"$$FG$
To upgrade, you generally boot the new TempleOS CD/DVD, install on top of your partition, modify your files and set it to boot your account by executing $LK,"MakeOSPrtBootInstall",A="MN:MakeOSPrtBootInstall"$(). Often, your code will have to be modified to work with the new version. See $LK,"ChangeLog",A="FI:::/Doc/ChangeLog.TXT"$. You might have to boot an alternate partition or the CD and modify your code until it boots okay.
To upgrade, you generally boot the new TempleOS CD/DVD, install on top of your partition, modify your files and set it to boot your account by executing $LK,"MakeOSPrtBootInstall",A="MN:MakeOSPrtBootInstall"$(). Often, your code will have to be modified to work with the new version. See $LK,"Change Log",A="FI:::/Doc/ChangeLog.TXT"$. You might have to boot an alternate partition or the CD and modify your code until it boots okay.
The $FG,2$INSTALL$FG$ option when you boot a CD will install on top of an existing install if you tell it not to reformat.
The $GREEN$INSTALL$FG$ option when you boot a CD will install on top of an existing install if you tell it not to reformat.
See the $LK,"Installing",A="FI:::/Doc/Install.TXT"$ documentation.
+27 -18
View File
@@ -6,7 +6,7 @@ $ID,2$* Professionals doing hobby projects
* Teenagers doing projects
* Non-professional, older-persons 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,"120,838",D="DD_TEMPLEOS_LOC"$ 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 "hello world" application in one line of code and can put graphics on the screen with a three line program!
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,"120,677",D="DD_TEMPLEOS_LOC"$ 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 "hello world" 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"$.
@@ -14,21 +14,21 @@ Conventional thinking is "failure is not an option" for general purpose operatin
Two things to know about TempleOS are that $UL,1$tasks$UL,0$ have $LK,"MAlloc",A="MN:MAlloc"$/$LK,"Free",A="MN:Free"$ heap memory, not applications, and tasks have compiler symbol tables that persist at a scope like environment variables in other operating systems, and the symbols can include functions.
In other operating systems, I hated learning one language for command line scripts and another for programming. With $FG,2$TempleOS$FG$, the command line feeds right into the $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ (more than $FG,2$C$FG$, less than $FG,2$C++$FG$) compiler, line by line, and it places code into memory it $LK,"MAlloc",A="MN:MAlloc"$()s. The compiler is paused at the command line, waiting for input. Naturally, you $FG,2$#include$FG$ a program to load it into memory and, usually, start it. During the boot process, many files get compiled before you have access to the command line. (Don't worry, booting takes only a couple of seconds.) All the header declarations for the operating system are compiled and are available for use in your programs without needing to $FG,2$#include $FG$them. Everything is truly compiled to native $FG,4$$TX,"x86_64",HTML="http://en.wikipedia.org/wiki/Amd64#AMD64"$$FG$ and nothing is "interpreted".
In other operating systems, I hated learning one language for command line scripts and another for programming. With $FG,2$TempleOS$FG$, the command line feeds right into the $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ compiler, line by line, and it places code into memory it $LK,"MAlloc",A="MN:MAlloc"$()s. The compiler is paused at the command line, waiting for input. Naturally, you $FG,2$#include$FG$ a program to load it into memory and, usually, start it. During the boot process, many files get $LK,"compiled",A="FI:::/Kernel/Adam1.CPP"$ before you have access to the command line. (Don't worry, booting takes only a couple of seconds.) All the header declarations for the operating system are compiled and are available for use in your programs without needing to $FG,2$#include $FG$them. Everything is truly compiled to native $FG,2$$TX,"x86_64",HTML="http://en.wikipedia.org/wiki/Amd64#AMD64"$$FG$ machine code, nothing is $FG,2$interpreted$FG$ and there is no $FG,2$byte code$FG$.
Statements at the global scope (outside the scope of $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ functions) execute immediately. There is no $FG,2$main()$FG$ function. Instead, you give meaningful names to what would be $FG,2$main()$FG$ functions and you invoke them by calling them with a statement in the global scope, usually at the bottom of your file.
Statements at the global scope -- outside the scope of functions -- execute immediately. There is no $FG,2$main()$FG$ function. Instead, you give meaningful names to what would be $FG,2$main()$FG$ functions and you invoke them by calling them with a statement in the global scope, usually at the bottom of your file.
I started with $FG,2$C$FG$ syntax, but didn't like the command line for a directory listing looking like this:
>$FG,4$Dir("*.*",FALSE);
>$FG,2$Dir("*.*",FALSE);
$FG$So, I added default args from $FG,2$C++$FG$ and it looked like this:
>$FG,4$Dir();
>$FG,2$Dir();
$FG$I didn't like that, so I made parentheses optional on calls with no args and it, now, looks like this:
>$FG,4$Dir;$FG$
>$FG,2$Dir;$FG$
The syntax change created an ambiguity when specifying function addresses. To resolve it, I made a '$FG,2$&$FG$' required in front of function names when specifying an address of a function, which is better anyway.
@@ -36,7 +36,7 @@ Once I was no longer using standard C/C++ syntax, I decided to change everything
There are no object files in TempleOS and, normally, you don't make executable files either, but you can. That's known as "$FG,2$Ahead-Of-Time$FG$" compilation. Instead, you "$FG,2$Just-In-Time$FG$" compile.
Tasks have no priority scheme and are never removed from the queue. Instead, they often poll whatever they are waiting on and swap-out. (Swapping tasks takes half a microsecond and does not involve disk activity or memory maps.) See $LK,"Scheduler",A="FL:::/Kernel/Scheduler.CPP,1"$. Polling keeps it simple. It's might be a problem if you had lots of tasks busy, which rarely happens on a home computer. The order of the tasks in the queue determines front-to-back window order. See $LK,"TempleOS MultiTasking",A="FI:::/Doc/MultiTasking.TXT"$.
Tasks have no priority and are never removed from the queue. Instead, they often poll whatever they are waiting on and swap-out. (Swapping tasks takes half a microsecond and does not involve disk activity or memory maps.) See $LK,"Scheduler",A="FL:::/Kernel/Sched.CPP,1"$. Polling keeps it simple. It's might be a problem if you had lots of tasks busy, which rarely happens on a home computer. The order of the tasks in the queue determines front-to-back window order. See $LK,"TempleOS MultiTasking",A="FI:::/Doc/MultiTasking.TXT"$.
The $FG,2$FAT32$FG$ filesystem is supported to makes exchanging files with a dual booted other operating system easy and there is the simple, 64-bit TempleOS $LK,"RedSea",A="FI:::/Doc/RedSea.TXT"$ filesystem. The $LK,"RedSea",A="FI:::/Doc/RedSea.TXT"$ has allocation bitmap for clusters and all files are stored contiguously. You can't grow files.
@@ -44,31 +44,40 @@ TempleOS is geared toward reading and writing whole files. Since whole files ar
If a file is not found, "$FG,2$.Z$FG$" is added or removed and a search is done, again. There is no $FG,2$PATH$FG$, but parent directories are searched when a file is not found. This feature is especially useful for default account files.
It's fun being able to turn-off interrupts with CLI $FG$and on with STI. $FG,2$TempleOS$FG$ runs all programs in kernel mode, ring 0, so no instructions are off-limits. Turning-off and on preemption with $LK,"Preempt",A="MN:Preempt"$() is a less drastic measure that is usually sufficient. A newly $LK,"Spawn",A="MN:Spawn"$()ed task begins with preemption off.
It's fun being able to turn-off interrupts with the asm instruction, CLI, $FG$and on with STI. $FG,2$TempleOS$FG$ runs all programs in kernel mode, ring 0, so no instructions are off-limits. Turning-off and on preemption with $LK,"Preempt",A="MN:Preempt"$() is a less drastic measure that is usually sufficient. A newly $LK,"Spawn",A="MN:Spawn"$()ed task begins with preemption off.
The graphic resolution is poor, $FG,2$640x480 16 color$FG$, but that's all I feel comfortable with without GPU acceleration supported. A $FG,2$1600x1200x24$FG$ bit screen takes 37 times more memory, implying 37 times the CPU power. Also, a fixed size keeps it simple with everybody machine having the same appearance. Look on the bright-side -- you won't spend as much time twiddling pixs for your game art and you'll have tons of CPU power available, especially with multicore systems.
The graphic resolution is poor, $FG,2$640x480 16 color$FG$, but God said that and that's all I feel comfortable with without GPU acceleration supported. A $FG,2$1600x1200x24$FG$ bit screen takes 37 times more memory, implying 37 times the CPU power. Also, a fixed size keeps it simple with everybody machine having the same appearance. Look on the bright-side -- you won't spend as much time twiddling pixels for your game art and you'll have tons of CPU power available, especially with multicore systems.
TempleOS is for hobbyist programmers on single user (at a time) home computers, not mainframes or servers, but it is preemptive multitasking. The focus task is all-important so symmetrical multiprocessing is almost pointless. Why does it matter running two apps at the same time twice as fast when you really want to run one faster? You could say TempleOS does master/slave multiprocessing. The anticipated use for multicore is primarily putting graphics on the screen. Hardware graphics acceleration is not used, so this is possible. See $LK,"TempleOS MultiCore",A="FI:::/Doc/MultiCore.TXT"$.
There is no distinction between the terms "task", "process" or "thread". All have a task record, $LK,"CTask",A="MN:CTask"$(), pointed to by the $FG,2$FS$FG$ segment reg and are accessed with $FG,4$Fs->$FG$ while $FG,4$Gs->$FG$ points to a $LK,"CCPU",A="MN:CCPU"$ for the current CPU core. Each task can have just one window, but a task can have children with windows. (The segment regs are just used as extra regs -- there is nothing segmented about TempleOS' memory.)
There is no distinction between the terms $FG,2$task$FG$, $FG,2$process$FG$ or $FG,2$thread$FG$. All have a task record, $LK,"CTask",A="MN:CTask"$, pointed to by the $FG,2$FS$FG$ segment reg and are accessed with $FG,4$Fs->$FG$ while $FG,4$Gs->$FG$ points to a $LK,"CCPU",A="MN:CCPU"$ for the current CPU core. Each task can have just one window, but a task can have children with windows. (The segment regs are just used as extra regs -- there is nothing segmented about TempleOS' memory.)
In TempleOS, "$FG,2$Adam$FG$" refers to a task that is the father of all tasks. He's never supposed to die. Since tasks inherit the symbols of parents, system-wide stuff is associated with $FG,2$Adam$FG$. His heap is like kernel memory in other operating systems. Since $FG,2$Adam$FG$ is immortal, it's safe to allocate objects, not tied to any mortal task, from $FG,2$Adam$FG$'s heap. He stays in a server mode, taking requests, so you can ask him to $FG,2$#include$FG$ something, placing that code system-wide. A funny story is that originally I called it the "root" task and even had a "$FG,2$/Root$FG$" directory ;-) $FG,2$Adam$FG$ executes $LK,"::/Kernel/Adam1.CPP"$ at boot time.
In TempleOS, $FG,2$Adam$FG$ refers to a task that is the father of all tasks. He's never supposed to die. Since tasks inherit the symbols of parents, system-wide stuff is associated with $FG,2$Adam$FG$. His heap is like kernel memory in other operating systems. Since $FG,2$Adam$FG$ is immortal, it's safe to allocate objects, not tied to any mortal task, from $FG,2$Adam$FG$'s heap. He stays in a server mode, taking requests, so you can ask him to $FG,2$#include$FG$ something, placing that code system-wide. A funny story is that originally I called it the $FG,2$root$FG$ task and even had a $FG,2$/Root$FG$ directory ;-) $FG,2$Adam$FG$ executes $LK,"::/Kernel/Adam1.CPP"$ at boot time.
For easy back-ups, place everything you author in your $FG,2$HOME$FG$ directory and subdirectories. Then, use $LK,"CopyTree",A="MN:CopyTree"$(). That should make upgrading easy, too. To make an account use $LK,"MkDir",A="MN:MkDir"$() to create a directory under $FG,2$/Accts$FG$. It will be $FG,2$HOME$FG$ if you boot to it. Recompile with $LK,"MakeOSPrtBootInstall",A="MN:MakeOSPrtBootInstall"$() and make it boot your acct. Customizable start-up scripts go in your $FG,2$HOME$FG$ directory. The default start-up scripts are in $FG,2$/Accts$FG$, the parent of all accounts. Copy the start-up files you wish to customize into $FG,2$HOME$FG$ and modify them. See $LK,"Acct Files",A="FF:::/Doc/GuideLines.TXT,ACCT FILES"$.
For easy back-ups, place everything you author in your $FG,2$HOME$FG$ directory and subdirectories. Then, use $LK,"CopyTree",A="MN:CopyTree"$(). That should make upgrading easy, too. To make an account use $LK,"MkDir",A="MN:MkDir"$() to create a directory under $FG,2$/Accts$FG$. It will be $FG,2$HOME$FG$ if you boot to it. Recompile with $LK,"MakeOSPrtBootInstall",A="MN:MakeOSPrtBootInstall"$() and make it boot your acct. Customizable start-up scripts go in your $FG,2$HOME$FG$ directory. The default start-up scripts are in $FG,2$/Accts$FG$, the parent of all accounts. Copy the start-up files you wish to customize into $FG,2$HOME$FG$ and modify them. See $LK,"Acct Files",A="FF:::/Doc/GuideLines.TXT,ACCT FILES"$. You can make your own distro that includes everything and is a bootable live CD with $LK,"::/Misc/MakeDistro.CPP"$.
Typically, your usage pattern through the day will be repeatedly left or right clicking on filenames in a cmd line $LK,"Dir",A="MN:Dir"$() listing. You left-click files to edit them and right-click to $FG,2$#include$FG$ them. To begin a project, type $LK,"Ed",A="MN:Ed"$(""); and supply a filename. You can also run programs with $FG,2$<F5>$FG$ when in the editor. $FG,2$<ESC>$FG$ to save and exit the file. You'll need to do a new $LK,"Dir",A="MN:Dir"$() cmd, periodically, so make a macro on your personal menu. Access your personal menu by pressing $FG,2$<CTRL-M>$FG$, cursoring until you are on top of it and pressing $FG,2$<SPACE BAR>$FG$.
Typically, your usage pattern through the day will be repeatedly left or right clicking on filenames in a cmd line $LK,"Dir",A="MN:Dir"$() listing. You left-click files to edit them and right-click to $FG,2$#include$FG$ them. To begin a project, type $LK,"Ed",A="MN:Ed"$("filename");, supplying a filename. You can also run programs with $FG,2$<F5>$FG$ when in the editor. $FG,2$<ESC>$FG$ to save and exit the file. You'll need to do a new $LK,"Dir",A="MN:Dir"$() cmd, periodically, so make a macro on your PersonalMenu. Access your PersonalMenu by pressing $FG,2$<CTRL-m>$FG$, cursoring until you are on top of it and pressing $FG,2$<SPACE>$FG$.
$FG,2$<CTRL-T>$FG$ toggles plain text mode, showing format commands, a little like viewing html code. $FG,2$<CTRL-L>$FG$ inserts a nongraphic widget. $FG,2$<CTRL-R>$FG$ inserts a graphic resource or edits the graphic under the cursor.
$FG,2$<CTRL-t>$FG$ toggles plain text mode, showing format commands, a little like viewing html code.
$FG,2$<CTRL-l>$FG$ inserts a nongraphic widget.
$FG,2$<CTRL-r>$FG$ inserts a graphic resource or edits the graphic under the cursor.
$FG,2$<CTRL-d>$FG$ brings-up the file manager. It's pretty crappy. I find I don't need it very often, believe it or not.
$FG,2$<CTRL-b>$FG$ toggles window border.
$FG,2$<CTRL-D>$FG$ brings-up the file manager. It's pretty crappy. I find I don't need it very often, believe it or not.
$FG,2$<ALT-m>$FG$ maximizes a window.
$FG,2$<ALT-SHIFT-w>$FG$ closes WordStat.
$FG,2$<ALT-w>$FG$ brings back WordStat.
$FG,2$<ALT-v>$FG$ vertically tiles windows.
$FG,2$<ALT-h>$FG$ horizontally tiles windows.
The $FG,2$ALT$FG$ keys are defined in $LK,"HOME/Adam3cKeyPlugIns.CPP"$. You can customize them.
$FG,2$<CTRL-ALT-E>$FG$ creates a new terminal window. $FG,2$<CTRL-ALT-X>$FG$ kills a window. You'll do these periodically.
$FG,2$<CTRL-ALT-e>$FG$ creates a new terminal window. $FG,2$<CTRL-ALT-x>$FG$ kills a window. You'll do these periodically.
$LK,"Grep",A="MN:Grep"$() is your best friend. There's a wrapper function called $LK,"F",A="MN:F"$() in your $FG,2$HOME/Adam3dWrappers.CPP.Z$FG$ file. Feel free to make wrapper functions for functions you use often and customize the args. By the way, $LK,"Grep",A="MN:Grep"$() or $LK,"R",A="MN:R"$() can be used to replace strings across multiple files. You can access $LK,"Grep",A="MN:Grep"$() using $FG,2$<CTRL-SHIFT-F>$FG$.
$LK,"Grep",A="MN:Grep"$() is your best friend. There's a wrapper function called $LK,"F",A="MN:F"$() in your $FG,2$HOME/Adam3dWrappers.CPP.Z$FG$ file. Feel free to make wrapper functions for functions you use often and customize the args. By the way, $LK,"Grep",A="MN:Grep"$() or $LK,"R",A="MN:R"$() can be used to replace strings across multiple files. You can access $LK,"Grep",A="MN:Grep"$() using $FG,2$<CTRL-SHIFT-f>$FG$.
As you browse code, use the $FG,2$WordStat$FG$ window to look-up functions, etc. $FG,2$<CTRL-SHIFT-F1>$FG$ (or whatever number) to follow a sym to it's source. You can browse deeper and deeper. You go back with $FG,2$<SHIFT-ESC>$FG$.
Use the $LK,"Help Index",A="FI:::/Doc/HelpIndex.TXT"$ or $LK,"Demo Index",A="FI:::/Doc/DemoIndex.TXT"$ to find-out what exists. Press $FG,2$F1$FG$ for help or use the links on your menu ($FG,2$<CTRL-M>$FG$). Also, look in the $FG,2$/Demo$FG$ or $FG,2$/Apps$FG$ directories for inspiration.
Use the $LK,"Help & Index",A="FI:::/Doc/HelpIndex.TXT"$ or $LK,"Demo Index",A="FI:::/Doc/DemoIndex.TXT"$ to find-out what exists. Press $FG,2$<F1>$FG$ for help or use the links on your menu ($FG,2$<CTRL-m>$FG$). Also, look in the $FG,2$/Demo$FG$ or $FG,2$/Apps$FG$ directories for inspiration.
$MA-X+PU,"Take Tour",LM="SpawnUser(\"Cd(\\\"::/Misc/Tour\\\");;AutoFile(\\\"Tour\\\");\n\");"$
+4 -4
View File
@@ -1,6 +1,6 @@
$WW,1$$FG,5$$TX+CX,"Text-Widget Help"$$FG$
$WW,1$$FG,5$$TX+CX,"DolDoc Widget Help"$$FG$
See $LK,"::/Doc/Dollar.TXT"$ for details on dollar sign cmds.
$LK,"DolDoc",A="::/Doc/DolDocOverview.TXT"$ is a propriatary TempleOS document type.
$FG,2$"Expression"$FG$ a num or HolyC algebraic term with operators and HolyC syms can be entered.
$FG,2$"Macro"$FG$ Most entries can behave like macro entries if you assign them macro strs.
@@ -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,4$fmtstr$FG$ entries in class definitions.
$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$X Expression$FG$ For cursor movements, the horizontal value.
$FG,5$Y Expression$FG$ For cursor movements, the vertical value.
@@ -37,6 +37,6 @@ $FG,5$$BK,1$PopUp$BK,0$$FG$ For macro's, run the macro in a PopUp window. Do th
$FG,5$Escape$FG$ For macro's, send an $FG,2$<ESC>$FG$ char to exit before running the macro. Without this, the macro runs in the wrong window, usually.
$FG,5$Refresh Data$FG$ updates $FG,4$$$DA$$$FG$ entry continuously.
$FG,5$Refresh Data$FG$ updates $FG,2$$$DA...$$$FG$ entry continuously.
$FG,5$Html Link$FG$ stores a link which will be embedded if you generate a html version of a document with $LK,"ToHtml",A="MN:ToHtml"$() or $LK,"Doc2Html",A="MN:Doc2Html"$().