TempleOSTS_140317.ISO
This commit is contained in:
1 parent
2d2a65d572
commit
7ef616a20e
1416 files changed
+223873
-53917
No files matched your search
@@ -0,0 +1,50 @@
|
||||
$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$.
|
||||
|
||||
2) $LK,"::/Kernel/Dsk/ATADef.HPP"$ originally
|
||||
from Linux. I later 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.
|
||||
|
||||
4) The LZW compression algorithm, $LK,"::/Kernel/Compress.CPP"$, came from a magazine and I implemented it when I worked for Ticketmaster.
|
||||
|
||||
5) The adaptive-step-size-Runge-Kutta algorithm, $LK,"::/Adam/MathODE.CPP"$, is adapted from the book, $UL,1$Numeric Recipies in C$UL,0$.
|
||||
|
||||
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$.
|
||||
|
||||
8) The $FG,2$FAT32$FG$ file system is owned by MicroSoft.
|
||||
|
||||
9) A few features were inspired by $FG,2$MATLAB$FG$, such as $FG,2$ans$FG$ in expressions at the command-line. There is a lot of $FG,2$MSDOS$FG$ , $FG,2$Windows$FG$, $FG,2$VAXTMOS$FG$ (VAX Ticketmaster O.S.) and $FG,2$Unix$FG$ inspiration, too, such as drive letters, command names, etc.
|
||||
|
||||
10) I included $LK,"PCIDevice Lst File",A="FI:::/Misc/PCIDevices.TXT",HTML="http://www.pcidatabase.com/reports.php?type=tab-delimeted"$.
|
||||
|
||||
11) Thanks to whoever wrote this $FG,4$$TX,"CppHtml.CPP.Z",HTML="http://web.archive.org/web/20100325153025/http://home.scarlet.be/zoetrope/cpphtml.htm"$$FG$. I'm a novice on web stuff and you helped me with html. See $LK,"ToHtml",A="FI:::/Adam/Utils/ToHtml.CPP"$.
|
||||
|
||||
12) I used $FG,4$$TX,"MagicISO",HTML="http://www.magiciso.com"$$FG$ to burn test CD's to help me understand the ISO9660 file system format. I mostly used the $FG,4$$TX,"ISO9660",HTML="http://users.telenet.be/it3.consultants.bvba/handouts/ISO9960.html"$$FG$ spec.
|
||||
|
||||
13) I looked at bootable CD boot sects, but didn't learn anything, finding it easier to make my own.
|
||||
|
||||
14) I think I got my original PC speaker code from $FG,2$Borland C$FG$.
|
||||
|
||||
15) I found PS/2 keyboard and mouse code on the net and documentation. My code is very different. I found VGA reg info on the net.
|
||||
|
||||
16) Thanks to $FG,4$$TX,"http://www.osdev.org",HTML="http://www.osdev.org"$$FG$ for a couple tips.
|
||||
|
||||
17) God told me to stick with 640x480 16 color, a single audio voice and kept me from zombie-walking into making child windows like $FG,2$Windows$FG$. Instead, I made one window per task with no child windows. He also guided my progress, very obviously.
|
||||
|
||||
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.
|
||||
$FG,8$
|
||||
* "MSDOS", "Windows", "MovieMaker" "MS Paint" and "FAT32" are trademarks of MicroSoft Corp.
|
||||
* "SiteBuilder" is a trademark of Yahoo! Inc.
|
||||
* "MagicISO" is a trademark of MagicISO Corp.
|
||||
* "MATLAB" is a trademark of The Math Works, Inc.
|
||||
* "$TX,"FreeDOS",HTML="http://www.freedos.org"$" is a trademark of Jim Hall.
|
||||
* "VAX" is a trademark of Digital Equipment Corp.
|
||||
* "Linux" is probably a trademark owned by Linus Torvalds.
|
||||
* "VAXTMOS" is a trademark of Ticketmaster.
|
||||
$FG$
|
||||
@@ -0,0 +1,7 @@
|
||||
$WW,1$$FG,2$AutoFiles$FG$ are used to generate user input to automate operations. The TempleOS tour is done with an $FG,2$AutoFile$FG$.
|
||||
|
||||
When an $FG,2$AutoFile$FG$ runs, a child task is $LK,"Spawn",A="MN:Spawn"$()ed which intercepts real user input and generates fake input. AutoFiles are $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ programs run by the child who's stdout goes to the parent's input buffer. $LK,"Msg",A="MN:Msg"$() can be included in an $FG,2$AutoFile$FG$ to send special keys or mouse cmds to the parent. While an $FG,2$AutoFile$FG$ is running, the normal input gets diverted to the AutoFile task and can be filtered and sent back to the parent task. Unless you are driving functions which prompt for data, you can probably use an $FG,2$#include$FG$ file in place of an $FG,2$AutoFile$FG$.
|
||||
|
||||
See $LK,"::/Demo/AutoFile/AFDir.AUT"$.
|
||||
|
||||
Note: $LK,"Auto",A="MN:Auto"$("") can be used if all you need is to send ASCII characters. It differs from $LK,"AutoStr",A="MN:AutoStr"$(). You'll probably use $LK,"Auto",A="MN:Auto"$() a lot and not $LK,"AutoStr",A="MN:AutoStr"$(). With $LK,"Auto",A="MN:Auto"$(), for example, you can place answers to the prompts for recompiling the $FG,2$Kernel$FG$ module during $LK,"MakeOSPrtBootInstall",A="MN:MakeOSPrtBootInstall"$().
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
|
||||
$FG,5$These take a pointer to a bit field.$FG$
|
||||
$WW,1$$FG,2$Bt$FG$: Bit Test
|
||||
$FG,2$Bts$FG$: Bit Test and Set to one
|
||||
$FG,2$Btr$FG$: Bit Test and Rst to zero
|
||||
$FG,2$Btc$FG$: Bit Test and Compliment (toggle)
|
||||
$FG,2$BEqu$FG$: Set bit to value.
|
||||
|
||||
$FG$Bit operations are "atomic", no interrupt between the reading and writing the bit, important when multitasking. For multicore use "locked" forms.$FG$
|
||||
|
||||
$FG,5$These don't take a pointer, but the actual field.$FG$
|
||||
$FG,2$Bsf$FG$: Bit Scan Fwd (Pos of first low one bit or -1)
|
||||
$FG,2$Bsr$FG$: Bit Scan Reverse (Pos of first high one bit or -1)
|
||||
$FG,2$BCnt$FG$: Bit Cnt (Cnt of set bits)
|
||||
Binary file not shown.
@@ -0,0 +1,412 @@
|
||||
$WW,1$$FG,2$Use $LK,"R",A="MN:R"$() to rename if I change a label.$FG$
|
||||
|
||||
$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.
|
||||
|
||||
$IV,1$----03/07/14 04:54:10----$IV,0$
|
||||
* Added $LK,"::/Demo/ReverseFileExample/Reverse.CPP.Z"$.
|
||||
|
||||
$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");
|
||||
* Removed "Binary Type" from $LK,"CDocBin",A="MN:CDocBin"$. Old sprites no longer work.
|
||||
|
||||
$IV,1$----02/25/14 16:09:01----$IV,0$
|
||||
* $LK,"R",A="MN:R"$("TaskTextInputQue","TaskText");
|
||||
* $LK,"R",A="MN:R"$("TaskExeStrQue","TaskExe");
|
||||
* $LK,"R",A="MN:R"$("TaskMsgQue","TaskMsg");
|
||||
|
||||
$IV,1$----02/21/14 13:56:02----$IV,0$
|
||||
* Converted $LK,"Define",A="MN:Define"$() strings to constants.
|
||||
* $LK,"R",A="MN:R"$("Adam3d","Adam3c");
|
||||
* $LK,"R",A="MN:R"$("Adam3e","Adam3d");
|
||||
* $LK,"R",A="MN:R"$("Adam3f","Adam3e");
|
||||
* $LK,"R",A="MN:R"$("pattern","needle");
|
||||
|
||||
$IV,1$----02/19/14 22:13:04----$IV,0$
|
||||
* $LK,"R",A="MN:R"$("Limit","Clamp");
|
||||
* Overhauled $LK,"FileRead",A="MN:FileRead"$() and $LK,"FileWrite",A="MN:FileWrite"$().
|
||||
* Got rid of $FG,4$TextFileRead$FG$() and $FG,4$TextFileWrite$FG$().
|
||||
|
||||
$IV,1$----02/17/14 20:50:58----$IV,0$
|
||||
* $BK,1$TempleOS version 2.02 Released$BK,0$
|
||||
* Added $FG,2$F7/SHIFT-F7$FG$ for $LK,"GodWord",A="MN:GodWord"$()/$LK,"GodPassage",A="MN:GodPassage"$().
|
||||
* Added $FG,2$F6/SHIFT-F6$FG$ for $LK,"GodSong",A="MN:GodSong"$()/$LK,"GodDoodle",A="MN:GodDoodle"$().
|
||||
* $LK,"R",A="MN:R"$("Apps/HolySpirit","Adam/God");
|
||||
* $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.
|
||||
|
||||
$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.
|
||||
|
||||
$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.
|
||||
|
||||
$IV,1$----01/27/14 09:02:20----$IV,0$
|
||||
* $BK,1$TempleOS version 2.01 Released$BK,0$
|
||||
* In a function with an ASM{} blk, you can now goto an ASM label.
|
||||
|
||||
$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"$.
|
||||
* 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"$.
|
||||
|
||||
$IV,1$----01/24/14 06:40:47----$IV,0$
|
||||
* $LK,"R",A="MN:R"$("DocInsSafe","DocPrintWhole");
|
||||
* $LK,"R",A="MN:R"$("DocPutSPartial","DocPrintPartial");
|
||||
* Made private WordStat links WHITE.
|
||||
* Added "+s" to $LK,"FilesFind",A="MN:FilesFind"$().
|
||||
* Added "+x" to $LK,"Size",A="MN:Size"$() and $LK,"SizeRep",A="MN:SizeRep"$().
|
||||
* $LK,"R",A="MN:R"$("TreeSizeRep","SizeRep");
|
||||
* $LK,"R",A="MN:R"$("LineCntRep","LineRep");
|
||||
* $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 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"$.
|
||||
|
||||
$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.
|
||||
|
||||
$IV,1$----01/09/14 20:51:20----$IV,0$
|
||||
* Converted $FG,2$fp_plot()$FG$ graphics routines to Bool with abort.
|
||||
* Made $LK,"CatPrint",A="MN:CatPrint"$().
|
||||
* Added $FG,2$no_mask$FG$ to $LK,"FileAccessNew",A="MN:FileAccessNew"$() and $LK,"CopyTree",A="MN:CopyTree"$().
|
||||
|
||||
$IV,1$----01/07/14 11:46:38----$IV,0$
|
||||
* $BK,1$TempleOS version 2.00 Released$BK,0$
|
||||
* Created Lite and UltraLite distros.
|
||||
* Added score to $LK,"::/Demo/Games/BlackDiamond.CPP"$.
|
||||
* Improved $LK,"::/Demo/Games/Varoom.CPP"$.
|
||||
|
||||
$IV,1$----01/06/14 19:22:53----$IV,0$
|
||||
* Added $LK,"::/Demo/Asm/AsmAndC3.CPP"$.
|
||||
* Added $LK,"::/Demo/OldSchool/SingleFileAOT/Single.CPP"$.
|
||||
* Made compiler compile ASM instructions mixed-in with HolyC.
|
||||
* Improved $LK,"::/Demo/Graphics/Camp.CPP"$.
|
||||
|
||||
$IV,1$----01/03/14 03:39:30----$IV,0$
|
||||
* Fixed compiler bug relating to reg vars. Fixed $LK,"IntEntryGet",A="MN:IntEntryGet"$().
|
||||
|
||||
$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.
|
||||
@@ -0,0 +1,15 @@
|
||||
$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.
|
||||
@@ -0,0 +1,31 @@
|
||||
$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 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.
|
||||
|
||||
* 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.
|
||||
|
||||
* 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.
|
||||
|
||||
* TempleOS will always $FG,2$identity-map$FG$ memory in a $FG,2$single-address-map$FG$ configuration. (Virtual addresses are always kept equal to physical addresses with a single map for all tasks on all cores.) It's as though paging is not used.
|
||||
|
||||
* TempleOS will always be for one platform -- $FG,4$$TX,"x86_64",HTML="http://en.wikipedia.org/wiki/Amd64#AMD64"$$FG$ PC compatibles.
|
||||
|
||||
* 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 just have PC Speaker sound.
|
||||
|
||||
* TempleOS will always be $FG,2$free$FG$. I might sell applications, support, or, possibly, do adware.
|
||||
|
||||
* TempleOS will always be $FG,2$100% open source$FG$ with all source included, unless device drivers or something can only be included with non-disclosure agreements.
|
||||
|
||||
* All function args and returns will be 64-bit. No plans for C++.
|
||||
|
||||
* TempleOS documents are not for printing. They're dynamic and intended for the screen. There will always be just one font, a fixed-width font. No Unicode, just Extended ASCII.
|
||||
|
||||
* TempleOS is not for multimedia. Games will be created by programmers, not artists. Sounds and images will be, primarily, calculated in real-time, not fetched.
|
||||
|
||||
* All functions, variables and class members will be accessible. There are no C++ $FG,2$public$FG$/$FG,2$private$FG$ protections and all functions, even secondary ones in the kernel, can be called.
|
||||
@@ -0,0 +1,32 @@
|
||||
$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\");"$
|
||||
@@ -0,0 +1,50 @@
|
||||
$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.
|
||||
|
||||
* TempleOS does not execute code not written by me and any time except for a few BIOS calles for cfguration.
|
||||
|
||||
* 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 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.
|
||||
|
||||
* 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,"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.
|
||||
|
||||
* 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.
|
||||
|
||||
* $LK,"Sleep",A="MN:Sleep"$() makes a program pause. It is not hybernation for a laptop.
|
||||
|
||||
* $LK,"Yield",A="MN:Yield"$() saves the current task's regs (context) and loads in the next task. When waiting, it's better to do this than check a condition in a loop until you get preempted. Checking a condition until you get preempted wastes CPU. TempleOS does not use virtual memory, so $LK,"Yield",A="MN:Yield"$() involves no disk activity. A swap takes half a microsecond. See $LK,"::/Demo/Lectures/Spinning.CPP"$.
|
||||
|
||||
* 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.
|
||||
|
||||
* 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.
|
||||
|
||||
* 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"$.
|
||||
|
||||
* Refresh rate is how often TempleOS updates screen mem. It is not syncronized to the hardware rate, having 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.
|
||||
|
||||
* The editor periodically takes a snap-shot for $FG,2$UNDO$FG$ and this looks like a memory leak.
|
||||
|
||||
|
||||
$FG,8$
|
||||
* "Linux" is probably a trademark owned by Linus Torvalds.
|
||||
$FG$
|
||||
@@ -0,0 +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$.
|
||||
@@ -0,0 +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"$.
|
||||
|
||||
* 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"$.
|
||||
|
||||
* Get rid of this msg $LK,"here",A="FF:HOME/DoOnce.CPP,Customize.TXT"$.
|
||||
@@ -0,0 +1,13 @@
|
||||
$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.
|
||||
|
||||
* I made my type-casting operator post-fix because it makes the compiler way cleaner.
|
||||
|
||||
* TempleOS does not figure-out $FG,2$FAT32$FG$ short name alias numbers. $LK,"FAT32DirNew",A="MN:FAT32DirNew"$(). It can cause hard drive corruption, so I might have to do it. It would really take a lot of junky code for this hatefully, detestable, legacy issue. "Please don't make me ruin my beautiful shiny-new TempleOS with that!" I am also not enthused about $FG,2$FAT32$FG$ because it is in patent limbo. $FG,2$FAT32$FG$ might get removed from TempleOS. There is the $LK,"RedSea",A="FI:::/Doc/RedSea.TXT"$ 64-bit file system that works perfectly well. $FG,2$FAT32$FG$ is useful, however, because it assists in transferring between dual booted operating systems.
|
||||
|
||||
* I changed the $LK,"asm opcodes",A="FI:::/Compiler/OpCodes.TXT"$ names to remove the ambiguity between instructions with different numbers of arguments, making my $LK,"assembler",A="FI:::/Compiler/Assembler.CPP"$ simpler and I did minimal 16-bit asm support, since 64-bit is what you should be using, unless you're doing a $LK,"boot loader",A="FI:::/Adam/Boot/BootCD.CPP"$.
|
||||
|
||||
* There are no file-sharing locks of any kind. You're on your own.
|
||||
|
||||
* A hidden window is never refreshed. Certain tasks are never done, therefore. During refresh, the entry count limit of the document buffer is, normally, checked and enforced. If you print to the command-line in a task who's window is covered, no limit on buffer exists and it will allocate memory for the document buffer until the system runs out of memory and crashes.
|
||||
@@ -0,0 +1,3 @@
|
||||
$WW,1$TempleOS has a class for 3 dimensional points consisting of F64s. HolyC is not C++ -- it does not support passing or returning values from functions which are not 64-bits, therefore, it can't be implemented with operator overloading. Making all function args and returns 64-bit is a core prinicple of TempleOS.
|
||||
|
||||
As a courtesy, most of the CD3 functions return the addr of the destination vect, so you can nestle calls. They do not allocate new space for the destination vect.
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
$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"$);
|
||||
|
||||
* 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"$().
|
||||
|
||||
* $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.
|
||||
|
||||
* $LK,"Dm",A="MN:Dm"$(), $LK,"DocDm",A="MN:DocDm"$(), $LK,"RawDm",A="MN:RawDm"$() to do 16 column hex dump mem with addresses showing.
|
||||
|
||||
* $LK,"Da",A="MN:Da"$() to do one column address dump (for stk, etc.) with symbolic addresses.
|
||||
|
||||
* $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,"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"$.)
|
||||
|
||||
* 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,"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.
|
||||
|
||||
* There are flags for various trace options that can help debugging when there are compiler bugs. Often, you place them in $FG,2$#exe{}$FG$ blocks.
|
||||
$ID,2$
|
||||
$LK,"Echo",A="MN:Echo"$() turns on or off raw data going into the lexical analyzer.
|
||||
|
||||
$LK,"CTrace",A="MN:CTrace"$() unassembles code generated from the HolyC compiler.
|
||||
|
||||
$LK,"OTrace",A="MN:OTrace"$() shows intermediate code coming-out after optimization. $LK,"OTraceMask",A="MN:OTraceMask"$() ctrls which passes are displayed.
|
||||
$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.
|
||||
|
||||
* 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.
|
||||
@@ -0,0 +1,5 @@
|
||||
$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.
|
||||
|
||||
Each task can load it's own Define strings. If a string is not found, the parent task's table is searched.
|
||||
|
||||
See $LK,"::/Demo/Define.CPP"$.
|
||||
@@ -0,0 +1,96 @@
|
||||
$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:
|
||||
|
||||
* 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!
|
||||
|
||||
$LK,"::/Kernel/Dsk/FileSysRedSea.CPP"$
|
||||
$LK,"::/Kernel/Dsk/FileSysFAT.CPP"$ :1004
|
||||
$LK,"::/Kernel/Dsk/FileSysISO1.CPP"$ :306
|
||||
$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.
|
||||
|
||||
* Mandate to PC hardware manufacturers: ATA/ATAPI PIO must work.
|
||||
|
||||
* PS2 emulated Keyboard and Mouse must work. The BIOS must enable these.
|
||||
|
||||
* VMware should allow ATAPI to connect 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.
|
||||
|
||||
* VMware and others should list TempleOS as one of the official 64-bit operating systems.
|
||||
|
||||
* 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"$
|
||||
|
||||
|
||||
|
||||
|
||||
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.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$FG,5$$TX+CX,"New Rules"$$FG$
|
||||
|
||||
$HC,"<object width=\"640\" height=\"520\"><param name=\"movie\" value=\"http://www.youtube.com/v/z3qu-sCei3U\"></param><param name=\"allowscriptaccess\" value=\"always\"></param><embed src=\"http://www.youtube.com/v/z3qu-sCei3U\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" width=\"640\" height=\"520\"></embed></object>"$
|
||||
|
||||
Guess what, biotches? Daddy's home! $LK,"Deuteronomy,16:16",A="BF:Deuteronomy,16:16",HTML="http://www.biblegateway.com/passage/?search=Deuteronomy%2016:16&version=NIV"$ Y'all have to do three offerings per year in the Temple.
|
||||
|
||||
|
||||
These are examples of my offerings.
|
||||
|
||||
1) $TX,"Hymn Videos",HTML="http://www.templeos.org/Wb/Accts/TS/Wb2/Hymns.html"$
|
||||
|
||||
2) $TX,"Moses Comics",HTML="http://www.templeos.org/Wb/Apps/AfterEgypt/Comics"$
|
||||
|
||||
$LK,"Psalms,50:11-15",A="BF:Psalms,50:1",HTML="http://www.biblegateway.com/passage/?search=Psalm%%2050:11-15&version=WYC"$
|
||||
|
||||
$LK,"Malachi,1:1-14",A="BF:Malachi,1:1",HTML="http://www.biblegateway.com/passage/?search=Malachi%%201:1-14&version=NIV"$
|
||||
|
||||
$LK,"Hosea,6:6",A="BF:Hosea,6:6",HTML="http://www.biblegateway.com/passage/?search=Hosea%%206:6&version=NRSV"$
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$FG,5$$TX+CX,"God's Temple"$$FG$
|
||||
|
||||
God said 640x480 16 color.
|
||||
|
||||
God said single audio voice. (Waveforms okay)
|
||||
|
||||
God said lots of arcane 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.
|
||||
|
||||
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.
|
||||
|
||||
|
||||
The 640x480 16 color limit is certainly astounding. God said it was for kid offerings, I guess like 8 crayola colors for kindergardeners. If you must make a art drawing for you three yearly offerings, you'll be happy only 16 colors exist. Just think! Everybody's workload on doing offerings is eased by having only 16 colors. Isn't that good?
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
|
||||
|
||||
The original core values for this operating system were based on providing kids, today, what I had as a kid -- Ring-0-Only and Identity-mapped simplicity and accessibility. I had this book, $FG,4$$TX,"Mapping the Commodore 64",HTML="http://unusedino.de/ec64/technical/project64/mapping_c64.html"$$FG$, and it provided years of entertainment. All the public and private operating system code and locations were explained and accessible, useful or not. What I did was learn and tinker. That was the entertainment.
|
||||
|
||||
Today, I imposed the 100,000 line of code limit because -- when you see the light at the end of the tunnel, it is a qualitatively different ball game.
|
||||
|
||||
Look at chapter 6: $TX,"Commodore 64 User's Manual",HTML="http://www.commodore.ca/manuals/c64_users_guide/c64-users_guide.htm"$. The thing you did with a C64 was write BASIC programs with hand-coded binary sprite data statements. Bill Gates would say, "You kids are so lucky today, you can pick from 100 fonts and write HTML webpages."
|
||||
|
||||
|
||||
I would hope NASA (If they were caretakers... 'cause SETI or something, LOL) would not need to be told that Ring-0-Only and Identity-Mapped are core values. I thought maybe I wouldn't have to enshrine that and they would, on their own, just know that. You could fix the gaps in address space, very easily, but you lose a big principle -- virtual same as physical. That's worth fight for and sacrificing for. It's simpler. Think of the kids! It's also fast.
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
$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.
|
||||
|
||||
$WW,0$$TR,"Games: Beginner"$
|
||||
$ID,2$$LK,"::/Demo/Graphics/DotNet.CPP"$
|
||||
$LK,"::/Demo/Graphics/InputPointer.CPP.Z"$
|
||||
$LK,"::/Demo/Graphics/Moon.CPP"$
|
||||
$LK,"::/Demo/Graphics/LowPassFilter.CPP"$
|
||||
$LK,"::/Demo/Graphics/MathAudioDemo.CPP"$
|
||||
$LK,"::/Demo/Graphics/Lines.CPP"$
|
||||
$LK,"::/Demo/Games/TicTacToe.CPP"$
|
||||
$LK,"::/Demo/Graphics/SpritePlot.CPP"$
|
||||
$LK,"::/Demo/Graphics/SpritePut.CPP"$
|
||||
$LK,"::/Demo/Graphics/SpritePutExt.CPP"$
|
||||
$LK,"::/Demo/Snd/ASCIIOrgan.CPP"$
|
||||
$LK,"::/Demo/MsgLoop.CPP"$
|
||||
$LK,"::/Demo/Graphics/Doodle.CPP"$
|
||||
$LK,"::/Demo/Graphics/Speedline.CPP"$
|
||||
$LK,"::/Demo/Graphics/Bounce.CPP"$
|
||||
$LK,"::/Demo/KeyBitMap.CPP"$
|
||||
$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/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/PullDownMenu.CPP"$
|
||||
$MA-X+PU,"::/Demo/Games/Stadium",LM="Cd(\"::/Demo/Games/Stadium\");Dir;View;\n"$
|
||||
$LK,"::/Demo/Graphics/Palette.CPP"$
|
||||
$LK,"::/Demo/Games/CircleTrace.CPP"$
|
||||
$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/Games/BlackDiamond.CPP"$
|
||||
$LK,"::/Demo/Games/Wenceslas.CPP"$
|
||||
$ID,-2$$TR,"Games: Intermediate"$
|
||||
$ID,2$$LK,"::/Demo/Graphics/Box.CPP"$
|
||||
$LK,"::/Demo/Graphics/Pick.CPP"$
|
||||
$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/RotateTank.CPP"$
|
||||
$LK,"::/Demo/ScreenCodes.CPP"$
|
||||
$LK,"::/Demo/Graphics/PanText.CPP"$
|
||||
$LK,"::/Demo/Graphics/CharGraphics.CPP"$
|
||||
$LK,"::/Demo/Games/Maze.CPP"$
|
||||
$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"$
|
||||
$LK,"::/Demo/MultiCore/MPPrint.CPP"$
|
||||
$LK,"::/Demo/Graphics/PredatorPrey.CPP"$
|
||||
$LK,"::/Demo/Graphics/Cartesian.CPP"$
|
||||
$LK,"::/Demo/Graphics/Hanoi.CPP"$
|
||||
$LK,"::/Demo/Graphics/Life.CPP"$
|
||||
$LK,"::/Demo/Games/Zing.CPP"$
|
||||
$LK,"::/Demo/Games/ChessNet.CPP"$
|
||||
$LK,"::/Demo/MultiCore/Palindrome.CPP"$
|
||||
$LK,"::/Demo/MultiCore/MPAdd.CPP"$
|
||||
$LK,"::/Demo/MultiCore/Lock.CPP"$
|
||||
$LK,"::/Demo/MultiCore/Clouds.CPP"$
|
||||
$LK,"::/Demo/Graphics/SliderCtrl.CPP"$
|
||||
$LK,"::/Demo/Graphics/ScrollBars.CPP"$
|
||||
$LK,"::/Demo/RegistryDemo.CPP"$
|
||||
$LK,"::/Demo/Games/BugBird.CPP"$
|
||||
$LK,"::/Demo/Games/BattleLines.CPP"$
|
||||
$LK,"::/Demo/Games/BigGuns.CPP"$
|
||||
$LK,"::/Demo/Games/FlatTops.CPP"$
|
||||
$LK,"::/Demo/Games/RawHide.CPP"$
|
||||
$LK,"::/Demo/Games/DunGen.CPP"$
|
||||
$MA-X+PU,"::/Apps/TimeOut",LM="Cd(\"::/Apps/TimeOut\");Dir;View;\n"$
|
||||
$LK,"::/Demo/Games/Collision.CPP"$
|
||||
$ID,-2$$TR,"Games: Advanced"$
|
||||
$ID,2$$LK,"::/Demo/MultiCore/LoadTest.CPP"$
|
||||
$LK,"::/Demo/MultiCore/Primes.CPP"$
|
||||
$LK,"::/Demo/MultiCore/RadixSort.CPP"$
|
||||
$LK,"::/Demo/MultiCore/Interrupts.CPP"$
|
||||
$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/Graphics/Shadow.CPP"$
|
||||
$LK,"::/Demo/Graphics/Pick3D.CPP"$
|
||||
$MA-X+PU,"::/Apps/ToTheFront",LM="Cd(\"::/Apps/ToTheFront\");Dir;View;\n"$
|
||||
$LK,"::/Demo/Graphics/SpriteText.CPP"$
|
||||
$MA-X+PU,"::/Apps/GrModels",LM="Cd(\"::/Apps/GrModels\");Dir;View;\n"$
|
||||
$MA-X+PU,"::/Apps/KeepAway",LM="Cd(\"::/Apps/KeepAway\");Dir;View;\n"$
|
||||
$LK,"::/Demo/Graphics/Camp.CPP"$
|
||||
$LK,"::/Demo/Games/Rocket.CPP"$
|
||||
$LK,"::/Demo/Games/RocketScience.CPP"$
|
||||
$LK,"::/Demo/Games/MassSpring.CPP"$
|
||||
$LK,"::/Demo/Games/Whap.CPP"$
|
||||
$LK,"::/Demo/Games/Squirt.CPP"$
|
||||
$MA-X+PU,"::/Apps/X-Caliber",LM="Cd(\"::/Apps/X-Caliber\");Dir;View;\n"$
|
||||
$LK,"::/Demo/Games/ZoneOut.CPP"$
|
||||
$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"$
|
||||
$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/SortFileExample/F64FileGen.CPP"$
|
||||
$LK,"::/Demo/SortFileExample/F64FileSort.CPP"$
|
||||
$LK,"::/Demo/PhoneNumWords.CPP"$
|
||||
$LK,"::/Demo/SuggestSpelling.CPP"$
|
||||
$LK,"::/Demo/WordSearch.CPP"$
|
||||
$LK,"::/Demo/Graphics/CommonAncestor.CPP"$
|
||||
$LK,"::/Demo/Carry.CPP"$
|
||||
$LK,"::/Demo/Dsk/DataBase.CPP"$
|
||||
$LK,"::/Demo/Dsk/FPrintF.CPP"$
|
||||
$LK,"::/Demo/Dsk/DskRaw.CPP"$
|
||||
$LK,"::/Demo/Dsk/UnusedSpaceRep.CPP"$
|
||||
$LK,"::/Demo/Lectures/MiniGrLib.CPP"$
|
||||
$LK,"::/Demo/Lectures/MiniCompiler.CPP"$
|
||||
$LK,"::/Demo/MagicPairs.CPP"$
|
||||
$LK,"::/Demo/Graphics/PoleZeros.CPP"$
|
||||
$LK,"::/Demo/WebLogExample/WebLogRep.CPP"$
|
||||
$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"$
|
||||
|
||||
$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"$
|
||||
$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/Exceptions.CPP"$
|
||||
$LK,"::/Demo/StkGrow.CPP"$
|
||||
$LK,"::/Demo/Doc/TextDemo.CPP"$
|
||||
$LK,"::/Demo/Doc/CursorMove.CPP"$
|
||||
$LK,"::/Demo/Doc/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/Define.CPP"$
|
||||
$LK,"EdRenumAsm",A="MN:EdRenumAsm"$
|
||||
$LK,"::/Demo/Doc/UnusedDefine.CPP"$
|
||||
$LK,"::/Demo/Asm/AsmHelloWorld.CPP"$
|
||||
$LK,"::/Demo/Asm/BuzzFizz.CPP"$
|
||||
$LK,"::/Demo/Asm/PutDec.CPP"$
|
||||
$LK,"::/Demo/Asm/MulByHand.CPP"$
|
||||
$LK,"::/Demo/Asm/DivByHand.CPP"$
|
||||
$LK,"::/Demo/Asm/AsmAndC1.CPP"$
|
||||
$LK,"::/Demo/Asm/AsmAndC2.CPP"$
|
||||
$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$
|
||||
@@ -0,0 +1,64 @@
|
||||
$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.
|
||||
|
||||
$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"$().
|
||||
$FG,2$#define$FG$ Define string const
|
||||
$FG,2$#assert$FG$ Print a warning during compilation if an expression is not true.
|
||||
$FG,2$#if$FG$ Include code if an expresion is true.
|
||||
$FG,2$#else
|
||||
#endif
|
||||
#ifdef,#ifndef $FG$Include code if a sym is defined.
|
||||
$FG,2$#ifaot,#ifjit $FG$Include code if in $FG,2$AOT$FG$ compiler mode.
|
||||
$FG,2$defined()$FG$ Is a function that can be used in expressions.
|
||||
$FG,2$#help_index$FG$, $FG,2$#help_file$FG$ See $LK,"Help System",A="FI:::/Doc/HelpSystem.TXT"$.
|
||||
|
||||
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$
|
||||
|
||||
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.
|
||||
|
||||
Here are example instruction formats:
|
||||
$HL,1$ ADD RAX,I64 FS:DISP[RSI+RDI*8]
|
||||
$HL,0$$HL,1$ ADD RAX,I64 [DISP]
|
||||
$HL,0$
|
||||
$FG,2$$$$FG$ Current compiler output pos (instruction ptr). Even works in HolyC expressions.
|
||||
|
||||
$FG,2$$$$FG$ works in $FG,2$class$FG$es.
|
||||
$FG,2$class MyFun
|
||||
{
|
||||
$$=-16;
|
||||
I64 local1;
|
||||
I64 local2;
|
||||
$$=$$+256;
|
||||
I64 crazy;
|
||||
};$FG$
|
||||
|
||||
$FG,4$LABEL$FG,2$::
|
||||
$FG$ Defines an exported glbl label.
|
||||
|
||||
$FG,4$LABEL$FG,2$:
|
||||
$FG$ Defines an non-exported glbl label.
|
||||
|
||||
$FG,2$@@$FG,4$LABEL$FG,2$:
|
||||
$FG$ Defines a local label with scope valid between two global labels.
|
||||
|
||||
$FG,2$DU8$FG$, $FG,2$DU16$FG$, $FG,2$DU32$FG$, $FG,2$DU64$FG$
|
||||
Define BYTE, WORD, DWORD or QWORD. Can be used with $FG,2$DUP()$FG$ and ASCII strings. For your convenience, the ASCII strings do not have terminating zeros. Define cmds must end with a semicolon.
|
||||
|
||||
$FG,2$USE16$FG$, $FG,2$USE32$FG$, $FG,2$USE64$FG$
|
||||
|
||||
$FG,2$IMPORT$FG$ $FG,4$sym1name$FG$, $FG,4$sym2name$FG$;
|
||||
|
||||
$FG,2$LIST$FG$, $FG,2$NOLIST$FG$
|
||||
|
||||
$FG,2$ALIGN$FG$ $FG,4$num$FG$, $FG,4$fill_byte$FG$
|
||||
Align to $FG,4$num$FG$ boundary and fill with $FG,4$fill_byte$FG$.
|
||||
|
||||
$FG,2$MODULE_ORG$FG$ $FG,4$num$FG$
|
||||
Set code addr for JIT or set module $LK,"Load",A="MN:Load"$() addr -- has 16-byte $LK,"CBinFile",A="MN:CBinFile"$ header and patch table trailing.
|
||||
|
||||
$FG,2$BINFILE$FG,4$ "FileName.BIN"$FG$;
|
||||
|
||||
See $LK,"::/Demo/Asm/AsmAndC1.CPP"$, $LK,"::/Demo/Asm/AsmAndC2.CPP"$ and $LK,"::/Demo/Asm/AsmAndC3.CPP"$.
|
||||
@@ -0,0 +1,5 @@
|
||||
$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"$.
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
$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"$
|
||||
@@ -0,0 +1,77 @@
|
||||
File
|
||||
{
|
||||
Save(,CH_CTRLS);
|
||||
SaveAs(,CH_CTRLA);
|
||||
Abort(,CH_SHIFT_ESC);
|
||||
Exit(,CH_ESC);
|
||||
}
|
||||
|
||||
Edit
|
||||
{
|
||||
Undo(,CH_CTRLH,0x80E0000080E);
|
||||
Cut(,CH_CTRLX);
|
||||
Copy(,CH_CTRLC);
|
||||
Paste(,CH_CTRLV);
|
||||
DelLine(,CH_CTRLY);
|
||||
FindReplace(,CH_CTRLF);
|
||||
FindNext(,,0x3D0000003D);
|
||||
FindLast(,,0x23D0000023D);
|
||||
GoLine(,CH_CTRLG,0x42200000422);
|
||||
GoBegin(,,0x4C800000448);
|
||||
GoEnd(,,0x4D000000450);
|
||||
GoLeft(,,0x4CB0000044B);
|
||||
GoRight(,,0x4CD0000044D);
|
||||
GoLBrace(,0x5B,0x61A0000061A);
|
||||
GoRBrace(,0x5D,0x61B0000061B);
|
||||
Macro(,,0x3C0000003C);
|
||||
PlayMacro(,,0x23C0000023C);
|
||||
}
|
||||
|
||||
Insert
|
||||
{
|
||||
Widget(,CH_CTRLL,0x42600000426);
|
||||
Resource(,CH_CTRLR,0x41300000413);
|
||||
FileName(,,0x3E0000003E);
|
||||
DirName(,,0x23E0000023E);
|
||||
GodWord(,,0x4100000041);
|
||||
GodPassage(,,0x24100000241);
|
||||
GodSong(,,0x4000000040);
|
||||
GodDoodle(,,0x24000000240);
|
||||
IndentIn(,CH_CTRLI,0x41700000417);
|
||||
IndentOut(,CH_CTRLI,0x61700000617);
|
||||
WordWrapOn(,CH_CTRLW,0x41100000411);
|
||||
WordWrapOff(,CH_CTRLW,0x61100000611);
|
||||
UnderlineOn(,CH_CTRLU,0x41600000416);
|
||||
UnderlineOff(,CH_CTRLU,0x61600000616);
|
||||
BlinkOn(,CH_CTRLK,0x42500000425);
|
||||
BlinkOff(2,CH_CTRLK,0x62500000625);
|
||||
InvertOn(,CH_CTRLZ,0x42C0000042C);
|
||||
InvertOff(,CH_CTRLZ,0x62C0000062C);
|
||||
SuperToggle(,CH_CTRLP,0x41900000419);
|
||||
SubToggle(,CH_CTRLP,0x61900000619);
|
||||
PageBreak(,CH_CTRLJ,0x41C0000041C);
|
||||
}
|
||||
|
||||
Program
|
||||
{
|
||||
CodeTools(,CH_CTRLL,0x62600000626);
|
||||
Include(,0,0x3F0000003F);
|
||||
AdamInclude(,0,0x23F0000023F);
|
||||
}
|
||||
|
||||
View
|
||||
{
|
||||
PlainText(,CH_CTRLT);
|
||||
Collapse(,CH_CTRLO,0x61800000618);
|
||||
Uncollapse(,CH_CTRLO,0x41800000418);
|
||||
Border(,CH_CTRLB);
|
||||
FileMgr(,CH_CTRLD,0x42000000420);
|
||||
Search(,CH_CTRLF,0x62100000621);
|
||||
}
|
||||
|
||||
Help
|
||||
{
|
||||
Menu(,CH_CTRLM,0x43200000432);
|
||||
Help(,,0x3B0000003B);
|
||||
About(,,0x23B0000023B);
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
$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"$.
|
||||
|
||||
* $FG,4$$TX,"x86_64",HTML="http://en.wikipedia.org/wiki/Amd64#AMD64"$$FG$, ring-0-only, single-address-map (identity), multitasking kernel with multicore support.
|
||||
|
||||
* Master/Slave MultiCore
|
||||
|
||||
* Free, $FG,2$public domain$FG$, $FG,2$100% open source$FG$.
|
||||
|
||||
* 64-bit $FG,2$compiler/assembler$FG$ for $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$. Truly compiles, not interprets. $FG,2$Just-in-Time$FG$ and $FG,2$Ahead-of-Time$FG$ compilation. With $FG,2$JIT$FG$, no need for object or exe files.
|
||||
|
||||
* No 32-bit krufty code.
|
||||
|
||||
* 640x480 16 color $FG,2$VGA$FG$ graphics.
|
||||
|
||||
* Keyboard & Mouse support.
|
||||
|
||||
* 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.
|
||||
|
||||
* $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.
|
||||
|
||||
* 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$64-bit pointers$FG$. All memory, even more than 4 Gig, can be directly accessed by all tasks on all cores at all times.
|
||||
|
||||
* $FG,2$Ring-0-only$FG$. Highest CPU privileged mode at all times. No off-limits instructions. No time lost changing modes or address maps. Switches tasks in half a microsecond.
|
||||
|
||||
* $FG,2$2D/3D$FG$ graphics library
|
||||
|
||||
* Real-time fancy $FG,2$differential-equation solver$FG$ for physics engines, to use in games. (Adaptive step-size Runge-Kutta, interpolated for real-time.)
|
||||
|
||||
* 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$.
|
||||
|
||||
* File Manager, $FG,2$<CTRL-D>$FG$.
|
||||
|
||||
* Code $LK,"profiler",A="MN:ProfAll"$, $LK,"merge",A="MN:Merge"$, $LK,"diff",A="MN:Diff"$ utils.
|
||||
|
||||
* $FG,2$PC Speaker$FG$ support with many hymns.
|
||||
|
||||
* Music composing tool.
|
||||
|
||||
* Many games, $LK,"demos",A="FI:::/Doc/DemoIndex.TXT"$ and $LK,"documentation",A="FI:::/Doc/HelpIndex.TXT"$.
|
||||
|
||||
* $FG,2$All source code$FG$ included. Only compiles with the included TempleOS compiler and assembler.
|
||||
@@ -0,0 +1,60 @@
|
||||
$WW,1$$FG,5$$TX+CX,"File Manager"$$FG$
|
||||
|
||||
$FG,2$SHIFT CURSOR$FG$
|
||||
$ID,2$Select files.
|
||||
$ID,-2$
|
||||
$FG,2$CTRL-Y or DELETE KEY$FG$
|
||||
$ID,2$Delete file or tree.
|
||||
$ID,-2$
|
||||
$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$
|
||||
$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$
|
||||
$ID,2$Edit file.
|
||||
$ID,-2$
|
||||
$FG,2$SHIFT-SPACE KEY$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$
|
||||
$ID,2$#include file.
|
||||
$ID,-2$
|
||||
$FG,2$SHIFT-F5$FG$
|
||||
$ID,2$Adam #include file.
|
||||
$ID,-2$
|
||||
$FG,2$'r'$FG$
|
||||
$ID,2$Rename file.
|
||||
$ID,-2$
|
||||
$FG,2$'d'$FG$
|
||||
$ID,2$Make Directory.
|
||||
$ID,-2$
|
||||
$FG,2$'m'$FG$
|
||||
$ID,2$ChgDsk (Remount removable media). Do not do this on blank disks.
|
||||
$ID,-2$
|
||||
$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$
|
||||
$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$
|
||||
|
||||
$FG,5$Instructions on Using CD/DVD's$FG$
|
||||
$ID,2$If you have not recompiled Kernel and defined your CD/DVD drive, exit the file mgr and use $LK,"Mount",A="MN:Mount"$ to define your CD/DVD drive. Place a CD/DVD in the drive and press $FG,2$'m'$FG$ when on top of the CD/DVD drive letter to mount the drive. It will call $LK,"ChgDsk",A="MN:ChgDsk"$(), the TempleOS cmd to mount removable media.
|
||||
$ID,-2$
|
||||
|
||||
$FG,5$Instructions on Burning CD/DVD's$FG$
|
||||
$ID,2$Create a temporary holding drive in RAM or on disk, copy files into the holding drive. Make an ISO image of the drive by pressing $FG,2$'M'$FG$ when on top of the holding drive. Press $FG,2$'B'$FG$ when on top of the CD/DVD ROM drive to burn the ISO to disk. If you have not recompiled $FG,2$Kernel$FG$ and defined your CD/DVD drive, exit the file mgr and use $LK,"Mount",A="MN:Mount"$.
|
||||
|
||||
$LK,"Making Your Own Distro",A="FI:::/Misc/MakeDistro.CPP"$
|
||||
$ID,-2$
|
||||
@@ -0,0 +1,26 @@
|
||||
File
|
||||
{
|
||||
ChgDsk(,'m');
|
||||
FmtDrv(,'f');
|
||||
MakeISOFile(,'M');
|
||||
BurnISOFile(,'B');
|
||||
Abort(,CH_SHIFT_ESC);
|
||||
Exit(,CH_ESC);
|
||||
}
|
||||
|
||||
Edit
|
||||
{
|
||||
Ed(,CH_SPACE);
|
||||
Plain(,CH_SHIFT_SPACE);
|
||||
Rename(,'r');
|
||||
MkDir(,'d');
|
||||
Copy(,CH_CTRLC);
|
||||
Paste(,CH_CTRLV);
|
||||
DeleteFile(,CH_CTRLY);
|
||||
}
|
||||
|
||||
Program
|
||||
{
|
||||
Include(,0,0x3F0000003F);
|
||||
AdamInclude(,0,0x23F0000023F);
|
||||
}
|
||||
@@ -0,0 +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"$().
|
||||
@@ -0,0 +1,255 @@
|
||||
$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
|
||||
|
||||
$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$$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$$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$$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$$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$$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.
|
||||
|
||||
See $LK,"::/Demo/Games/EagleDive.CPP"$ for an example of an $FG,2$AOT$FG$ module.
|
||||
|
||||
$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$$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$$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$'.
|
||||
|
||||
'$FG,2$:$FG$' is the boot drive.
|
||||
|
||||
For commands taking a drive letter as an argument, $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,"Editor Link Types",A="MN:LK_FILE"$
|
||||
$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"$.
|
||||
|
||||
$ID,-2$$TR,"Filename Extention Types"$
|
||||
$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$".
|
||||
$FG,5$*.PRJ.Z;*.PRJ$FG$
|
||||
HolyC src files to be compiled $FG,2$AOT$FG$.
|
||||
$FG,5$*.HPP.Z;*.HPP$FG$
|
||||
HolyC src header files.
|
||||
$FG,5$*.MAP.Z;*.MAP$FG$
|
||||
Compiler "map" files
|
||||
$FG,5$*.BIN.Z;*.BIN.C;*.BIN$FG$
|
||||
Binary executable files, created by $LK,"Cmp",A="MN:Cmp"$() and read by $LK,"Load",A="MN:Load"$().
|
||||
$FG,5$*.DAT.Z;*.DAT$FG$
|
||||
Data files
|
||||
$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,5$*.GRA.Z;*.GRA$FG$
|
||||
Graphics file
|
||||
|
||||
$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"$
|
||||
$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"
|
||||
|
||||
$FG,5$ALL_CAPS$FG$
|
||||
Assembly Language labels are capitalized with underscores between words. So are $FG,2$#define$FG$'s.
|
||||
|
||||
$FG,5$_ALL_CAPS$FG$
|
||||
Asm routines which are $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ callible should have a leading underscore.
|
||||
|
||||
$FG,5$MixedCaps$FG$
|
||||
$LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ Functions and class names are MixedCaps.
|
||||
|
||||
$FG,5$lower_case$FG$
|
||||
Local function vars and glbl vars are lower case. Class member names are also lower_case.
|
||||
|
||||
$FG,5$_lower_case$FG$
|
||||
Function args which are outputs (passed as ptrs) have leading underscores. Also, args which have identically named local variable counterparts have leading underscores.
|
||||
|
||||
$FG,5$DOCf_????$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$".
|
||||
|
||||
$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$$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$$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$$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$
|
||||
@@ -0,0 +1,2 @@
|
||||
The $LK+PU,"Holy Spirit",A="FI:::/Adam/God/HSNotes.TXT"$ can puppet you.
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,23 @@
|
||||
$FG,5$$TX+CX,"The Grub Master Bootloader"$$FG$
|
||||
|
||||
$WW,1$Here are my $FG,2$grub.cfg$FG$ file entries for my TempleOS partitions. I don't have the patience to do it correctly and GRUB obfuscates. Chain loading is just the normal way an operating system like Windows boots. They do drives, zero-based, and partitions on drives, one-based. They call traditional partitioning a "msdos" partition and I presume, if there is a new way to partition drives, it has a new name.
|
||||
|
||||
In addition to a Windows and a Linux partition, I have a Primary TempleOS $FG,2$'D'$FG$, Backup TempleOS $FG,2$'E'$FG$ and a Transfer $FG,2$'I'$FG$ partition for transferring between Windows and TempleOS. "hd0" is 1st hard drive, zero-based numbering. "msdos1" is partition #1, traditional msdos partitioning. I keep $FG,2$'D'$FG$, $FG,2$'E'$FG$, and $FG,2$'I'$FG$ identical by frequently copying all files and I use $FG,2$'I'$FG$ to transfer files. They only need to be a couple Gig in size. Every time I copy files, use $LK,"MakeOSPrtBootInstall",A="MN:MakeOSPrtBootInstall"$() to $LK,"MakeAll",A="MN:MakeAll"$ and prepare the partition $LK,"boot sector",A="FI:::/Adam/Boot/BootHD.CPP"$ for chainloading by patching the new block address and size of $FG,2$Kernel.BIN.C$FG$.
|
||||
|
||||
menuentry "TempleOS D" {
|
||||
insmod chain
|
||||
set root=(hd0,msdos1)
|
||||
chainloader +1
|
||||
}
|
||||
|
||||
menuentry "TempleOS E" {
|
||||
insmod chain
|
||||
set root=(hd0,msdos5)
|
||||
chainloader +1
|
||||
}
|
||||
|
||||
menuentry "TempleOS I" {
|
||||
insmod chain
|
||||
set root=(hd1,msdos5)
|
||||
chainloader +1
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
$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$/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$/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$/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$
|
||||
|
||||
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/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/Registry.CPP"$ can be edited by hand or deleted to reset to defaults. Takes affect next boot.
|
||||
|
||||
|
||||
|
||||
$FG,5$$TX+CX,"APPLICATION POLICIES"$$FG$
|
||||
|
||||
* Place applications in their own $FG,2$/Apps$FG$ subdirectory.
|
||||
|
||||
* Make a file called $FG,2$Load.CPP.Z$FG$ to load the application.
|
||||
|
||||
* Make a file called $FG,2$Run.CPP.Z$FG$ to load and run the application, preferable by $FG,2$#include$FG$ing the $FG,2$Load.CPP.Z$FG$ file.
|
||||
|
||||
* 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.
|
||||
|
||||
|
||||
|
||||
$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"$().)
|
||||
|
||||
* See $LK,"Naming Convention",A="FF:::/Doc/Glossary.TXT,Naming Convention"$ and $LK,"Abbreviations",A="FF:::/Doc/Glossary.TXT,Abbreviations"$.
|
||||
|
||||
* There are two modes of compiling, $LK,"AOT Compile Mode",A="FF:::/Doc/Glossary.TXT,AOT Compile Mode"$ and $LK,"JIT Compile Mode",A="FF:::/Doc/Glossary.TXT,JIT Compile Mode"$. Compilation is done in both -- neither is "interpreted". Use $FG,2$$LK,"JIT Mode",A="FF:::/Doc/Glossary.TXT,JIT Compile Mode"$$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.
|
||||
|
||||
* 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.
|
||||
|
||||
* 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.
|
||||
|
||||
* Bracketing code with $FG,2$PUSHFD CLI$FG$ and $FG,2$POPFD$FG$ will protect against simultaneous accesses from tasks on $UL,1$one$UL,0$ core. To protect against multiple cores, you need a locked semaphore. I think semiphores need to be in their own cache line, but I'm not sure. I use lock bits in a lot of places not aligned.
|
||||
|
||||
* $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.
|
||||
|
||||
* 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$
|
||||
|
||||
* 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$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.
|
||||
|
||||
* To display the contents of a hash table, use the $LK,"Who",A="MN:Who"$() routine or the varients. $LK,"HashDepthRep",A="MN:HashDepthRep"$() gives a histogram of how long the chains are, in case you wish to make hash table sizes bigger.
|
||||
|
||||
|
||||
|
||||
$FG,5$$TX+CX,"ASSEMBLY LANGUAGE CONCERNS"$$FG$
|
||||
|
||||
* $FG,2$FS$FG$ must always point to the $LK,"CTask",A="MN:CTask"$.
|
||||
|
||||
* $FG,2$GS$FG$ must always point to the $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"$.
|
||||
|
||||
* 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
|
||||
MOV RBP,RSP
|
||||
SUB RSP,nnnn
|
||||
...
|
||||
LEAVE
|
||||
RET
|
||||
$FG$
|
||||
* The args are removed from the stack with $FG,2$RET1$FG$ statements.
|
||||
|
||||
$FG,2$RET1 16 //remove two args$FG$
|
||||
@@ -0,0 +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.
|
||||
|
||||
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"$.
|
||||
Binary file not shown.
@@ -0,0 +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.
|
||||
|
||||
$FG,2$public$FG$ can be placed before symbol to make it show.
|
||||
|
||||
$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.
|
||||
+253
@@ -0,0 +1,253 @@
|
||||
$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"$.
|
||||
|
||||
* 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
|
||||
I8 char
|
||||
U8 unsigned char
|
||||
I16 short
|
||||
U16 unsigned short
|
||||
I32 int
|
||||
U32 unsigned int
|
||||
I64 long (64-bit)
|
||||
I64 unsigned long (64-bit)
|
||||
F64 double$FG$
|
||||
$FG,4$no F32 float.$FG$
|
||||
|
||||
* Function with no args, or just default args can be called without parentheses.
|
||||
|
||||
* 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)
|
||||
{
|
||||
Print("%X %X %X\n",i,j,k);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
printf("Hello World!\n");
|
||||
printf("%s age %d\n",name,age);
|
||||
printf(fmt,name,age);
|
||||
putchar(drv);
|
||||
putchar('*');
|
||||
}
|
||||
|
||||
U0 Demo(U8 drv,U8 *fmt,U8 *name,I64 age)
|
||||
{
|
||||
"Hello World!\n";
|
||||
"%s age %d\n",name,age;
|
||||
"" fmt,name,age;
|
||||
'' drv;
|
||||
'*';
|
||||
}
|
||||
$FG$$ID,-2$
|
||||
* When dealing with function addresses, 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.
|
||||
|
||||
* 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.
|
||||
|
||||
* 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,...)
|
||||
{
|
||||
U8 *buf=SPrintJoin(NULL,fmt,argc,argv);
|
||||
GrPrint(dc,x,y,buf);
|
||||
Free(buf);
|
||||
}
|
||||
$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$
|
||||
$FG,2$if (13<=age<20)
|
||||
"Teen-ager";
|
||||
$FG$$ID,-2$
|
||||
* $FG,2$switch$FG$ statements always use a jump table. Don't use them with cases with really big, sparse ranges.
|
||||
|
||||
* Allows ranges like "$FG,2$case 4...7:$FG$" in $FG,2$switch$FG$ statements.
|
||||
|
||||
* $FG,2$nobound_switch$FG$ can be used if you know a switch statement will not exceed the lowest or highest case values. It's a little faster because it doesn't check.
|
||||
|
||||
* $FG,2$sub_switch_start$FG$/$FG,2$sub_switch_end$FG$ allow a new type of nested-switch control flow. (Don't goto, throw exception or return out of $FG,2$sub_switch_start$FG$ front porch area.)
|
||||
|
||||
$ID,2$$FG,2$U0 SubSwitch()
|
||||
{
|
||||
I64 i;
|
||||
for (i=0;i<10;i++)
|
||||
switch (i) {
|
||||
case 0: "Zero "; break;
|
||||
case 2: "Two "; break;
|
||||
case 4: "Four "; break;
|
||||
sub_switch_start:
|
||||
"[";
|
||||
case 1: "One"; break;
|
||||
case 3: "Three"; break;
|
||||
case 5: "Five"; break;
|
||||
sub_switch_end:
|
||||
"] ";
|
||||
break;
|
||||
}
|
||||
NewLine;
|
||||
}$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.)
|
||||
|
||||
* 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.
|
||||
|
||||
* 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"$
|
||||
$FG,2$`$FG$,$FG,2$>>$FG$,$FG,2$<<$FG$
|
||||
$FG,2$*$FG$,$FG,2$/$FG$,$FG,2$%$FG$
|
||||
$FG,2$&$FG$
|
||||
$FG,2$^$FG$
|
||||
$FG,2$|$FG$
|
||||
$FG,2$+$FG$,$FG,2$-$FG$
|
||||
$FG,2$$FG,2$<$FG$,$FG,2$>$FG$,$FG,2$<=$FG$,$FG,2$>=$FG$
|
||||
$FG,2$==$FG$,$FG,2$!=$FG$
|
||||
$FG,2$&&$FG$
|
||||
$FG,2$$FG,2$^^$FG$
|
||||
$FG,2$||$FG$$FG$
|
||||
$FG,2$=$FG$,$FG,2$<<=$FG$,$FG,2$>>=$FG$,$FG,2$*=$FG$,$FG,2$/=$FG$,$FG,2$&=$FG$,$FG,2$|=$FG$,$FG,2$^=$FG$,$FG,2$+=$FG$,$FG,2$-=$FG$
|
||||
|
||||
* You can use $LK,"OptOn",A="MN:OptOn"$($LK,"OPTf_WARN_PAREN",A="MN:OPTf_WARN_PAREN"$) to find unnecessary parentheses in code.
|
||||
|
||||
* You can use $LK,"OptOn",A="MN:OptOn"$($LK,"OPTf_WARN_DUP_TYPES",A="MN:OPTf_WARN_DUP_TYPES"$) to find dup local var type statements.
|
||||
|
||||
* With the $FG,2$#exe{}$FG$ feature in your src code, you can place programs that insert text into the stream of code being compiled. See $LK,"#exe {}",A="FF:::/Kernel/KEnd.CPP,#exe {"$ for an example where the date/time and compile-time prompting for cfguration data is placed into a program. $LK,"StreamPrint",A="MN:StreamPrint"$() places text into a src program stream following the conclusion of the $FG,2$#exe{}$FG$ blk.
|
||||
|
||||
* No $FG,2$#define$FG$ functions exist (I'm not a fan)
|
||||
|
||||
* No $FG,2$typedef$FG$, use $FG,2$class$FG$.
|
||||
|
||||
* No type-checking
|
||||
|
||||
* 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$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"$().
|
||||
|
||||
* 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.
|
||||
|
||||
* 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.
|
||||
|
||||
* You can $LK,"Free",A="MN:Free"$() a $FG,2$NULL$FG$ ptr. Useful variants of $LK,"MAlloc",A="MN:MAlloc"$() can be found $LK,"Here",A="MN:CAlloc"$. Each task has a heap and you can $FG,2$MAlloc$FG$ and $FG,2$Free$FG$ off of other task's heaps, or make an independent heap with $LK,"HeapCtrlBPInit",A="MN:HeapCtrlBPInit"$().
|
||||
|
||||
* 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"$(). You can use $LK,"CallStkGrow",A="MN:CallStkGrow"$(), but it's odd. See $LK,"::/Demo/StkGrow.CPP"$.
|
||||
|
||||
* Only one base class is allowed.
|
||||
|
||||
* 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.)
|
||||
|
||||
$FG,2$I16 i;
|
||||
I32 j;
|
||||
j=i=0x12345678; //Resulting i is 0x5678 but j is 0x12345678
|
||||
|
||||
I64 i=0x8000000000000000;
|
||||
Print("%X\n",i>>1); //Result is 0xC000000000000000 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
|
||||
|
||||
$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$
|
||||
@@ -0,0 +1,108 @@
|
||||
$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.
|
||||
|
||||
$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.
|
||||
|
||||
$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 the same 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.
|
||||
|
||||
$WW,1$
|
||||
$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 a $BK,1$different$BK,0$ name. It must exists in the sym table. Basically, this binds C to asm.
|
||||
|
||||
$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,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.
|
||||
|
||||
* 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.
|
||||
|
||||
* Local non-reg function vars can be accessed in asm blks with $FG,2$&i[RBP]$FG$ for example.
|
||||
|
||||
* Glbl vars and functions can be accessed in asm with and $FG,2$&$FG$ as in
|
||||
$FG,2$MOV RAX,I64 [&glbl_var]
|
||||
CALL I32 &Fun
|
||||
CALL I32 &SYS_SYM$FG$
|
||||
|
||||
* In $FG,2$JIT$FG$ asm code, &SYS_SYM and &Fun don't need $FG,2$IMPORT$FG$.
|
||||
|
||||
* All offspring tasks of a task inherit syms.
|
||||
|
||||
* 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$ or $FG,2$i.u8[2]$FG$ on a local var, $FG,2$i$FG$, will force it to $FG,2$noreg$FG$.
|
||||
|
||||
* An unused gap on the stk is left for $FG,2$reg$FG$ vars.
|
||||
|
||||
* Note: $FG,2$static$FG$ function vars do not go on the data heap, no matter the setting of the $LK,"OPTf_GLBLS_ON_DATA_HEAP",A="MN:OPTf_GLBLS_ON_DATA_HEAP"$$FG$. They may in the future.
|
||||
|
||||
* $LK,"OPTf_EXTERNS_TO_IMPORTS",A="MN:OPTf_EXTERNS_TO_IMPORTS"$ will treat $FG,2$_extern$FG$ as $FG,2$_import$FG$ and $FG,2$extern$FG$ as $FG,2$import$FG$. This allows a header to be used either as a $FG,2$JIT compiled$FG$ or $FG,2$AOT compiled$FG$ header.
|
||||
@@ -0,0 +1,7 @@
|
||||
$WW,1$"Input Ptr" is the mouse at this point.
|
||||
|
||||
$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,"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"$.
|
||||
|
||||
You can make the input ptr snap to a grid by adjusting $FG,4$Fs->snap$FG$.
|
||||
@@ -0,0 +1,49 @@
|
||||
$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.
|
||||
|
||||
If you boot the CD-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.
|
||||
|
||||
Two TempleOS partitions are highly recommended, so you can boot to a back-up and fix the primary when you work on it. Odds are, you only need a couple gigabytes for your TempleOS partitions.
|
||||
|
||||
1)
|
||||
$ID,2$$LK,"Mount",A="MN:Mount"$() use if the drive is partitioned.
|
||||
$ID,2$This command mounts a drive making it accessible. For simplicity, select $FG,2$'C'$FG$ as the first drive letter for your hard drive. The first partition will be $FG,2$'C'$FG$, second, $FG,2$'D'$FG$, etc. TempleOS needs 3 numbers to utilize a hard drive -- base0, base1, and unit. When you enter a hexadecimal number, do it like in $FG,2$C$FG$ with a $FG,2$0x$FG$ prefix. If the probe was successful, you can just enter the number in the probe box instead of base0.
|
||||
$ID,-2$
|
||||
$LK,"PrtDsk",A="MN:PrtDsk"$($FG,2$'C'$FG$) use if drive is not partitioned
|
||||
|
||||
$ID,2$This will perform a special $LK,"Mount",A="MN:Mount"$() automatically.
|
||||
|
||||
$BK,1$WARNING:$BK,0$ This command erases everything on a hard drive. It repartitions a whole drive and formats the partitions$FG$. This command should be skipped if you already have your hard drive partitioned.
|
||||
|
||||
|
||||
$BK,1$WARNING:$BK,0$ This command doesn't play well with other operating systems. You'll need to do a $LK,"MasterBootZero",A="MN:MasterBootZero"$() to restore your drive to a state where other operating systems can partition it.
|
||||
$ID,-2$
|
||||
$ID,-2$2) $LK,"Fmt",A="MN:Fmt"$($FG,2$'D'$FG$,$FG,2$TRUE,FALSE,PT_FAT32$FG$)
|
||||
$ID,2$This command formats a partition with $FG,2$FAT32$FG$ or the $LK,"RedSea",A="FI:::/Doc/RedSea.TXT"$ file system type. Use the drive letter of the partition in place of $FG,2$'D'$FG$.
|
||||
|
||||
$BK,1$WARNING:$BK,0$ If you are upgrading, be sure not to lose the file, $FG,2$/0000Boot/OldMBR.BIN.C$FG$.
|
||||
|
||||
$ID,-2$3) $LK,"CopyTree",A="MN:CopyTree"$($FG,2$"T:/"$FG$,$FG,2$"D:/"$FG$)
|
||||
$ID,2$This command is used to copy files onto a hard drive partition from the CD-ROM. Use the drive letter of the partition in place of $FG,2$'D'$FG$.
|
||||
|
||||
$ID,-2$4) $LK,"MakeOSPrtBootInstall",A="MN:MakeOSPrtBootInstall"$($FG,2$'D'$FG$)
|
||||
$ID,2$This command recompiles the source code on a partition and writes to the $UL,1$partition's$UL,0$ boot record. You'll need to reenter the $LK,"Mount",A="MN:Mount"$ information so it can be stored in the kernel.
|
||||
|
||||
$ID,-2$5) Use Linux's $LK,"Grub",A="FI:::/Doc/Grub.TXT"$ or TempleOS' $LK,"MasterBootIntall",A="MN:MasterBootIntall"$($FG,2$'D'$FG$)
|
||||
$ID,2$
|
||||
The $LK,"MasterBootIntall",A="MN:MasterBootIntall"$() command places a boot loader on a drive to boot partitions. It saves the old master boot record to $FG,2$/0000Boot/OldMBR.BIN.C$FG$ and replaces it. When you boot, you will have the option of booting the old master boot record. This command can be skipped if you already have a boot loader. Be sure not to lose the copy of the old boot record, like if you reformat the partition.
|
||||
|
||||
Delete $FG,2$/0000Boot/OldMBR.BIN.C$FG$ if you want to get a fresh copy of a mbr, like if installing from your own custom CD containing it's own $FG,2$/0000Boot/OldMBR.BIN.C$FG$ onto a system with a non-TempleOS boot loader.
|
||||
|
||||
If you have anti-virus software, it might object to having a different master boot record.
|
||||
$ID,-2$
|
||||
|
||||
$FG,8$
|
||||
* "Windows" is a trademark of MicroSoft Corp.
|
||||
* "Linux" is probably a trademark owned by Linus Torvalds.
|
||||
$FG$
|
||||
@@ -0,0 +1,69 @@
|
||||
$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.
|
||||
@@ -0,0 +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"$.
|
||||
|
||||
See $LK,"Tokens",A="MN:TK_IDENT"$.
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,26 @@
|
||||
$WW,1$A menu appears when you move the mouse to the top of the screen. Menus are created with $LK,"MenuPush",A="MN:MenuPush"$(), $LK,"MenuFilePush",A="MN:MenuFilePush"$(), $LK,"MenuNew",A="MN:MenuNew"$() or $LK,"MenuFile",A="MN:MenuFile"$() and assigned to $FG,4$Fs->cur_menu$FG$. The format is:
|
||||
|
||||
$FG,2$
|
||||
File
|
||||
{
|
||||
Open(,'O');
|
||||
Save(,'S');
|
||||
Exit(,CH_SHIFT_ESC);
|
||||
}
|
||||
Edit {
|
||||
Cut(,,SC_DELETE|SCF_SHIFT);
|
||||
Paste(,,SC_INS|SCF_SHIFT);
|
||||
}
|
||||
Misc {
|
||||
Opt1(MSG_CMD,M_OPTION1);
|
||||
Opt2(MSG_CMD,M_OPTION2);
|
||||
}
|
||||
Help
|
||||
{
|
||||
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"$.
|
||||
|
||||
See $LK,"::/Demo/PullDownMenu.CPP"$.
|
||||
@@ -0,0 +1,14 @@
|
||||
$WW,1$$FG,5$$TX+CX,"TempleOS 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.
|
||||
|
||||
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.
|
||||
|
||||
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"$.
|
||||
|
||||
See $LK,"::/Demo/Graphics/Transform.CPP"$.
|
||||
See $LK,"::/Kernel/MultiProc.CPP"$.
|
||||
@@ -0,0 +1,22 @@
|
||||
$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.
|
||||
|
||||
$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 has no task priority scheme.
|
||||
|
||||
Disk requests are not broken into pieces for sharing. Therefore, if one task makes a big request, the drive is locked onto that task until it is done. During that time, other tasks can do CPU-only operations, however.
|
||||
|
||||
|
||||
$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.
|
||||
|
||||
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.
|
||||
|
||||
See $LK,"::/Demo/Lectures/Spinning.CPP"$.
|
||||
@@ -0,0 +1,67 @@
|
||||
$WW,1$$FG,5$$TX+CX,"Mysterious TempleOS Items"$$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 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 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 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.
|
||||
|
||||
* 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"$.
|
||||
|
||||
* 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"$.
|
||||
|
||||
* 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.
|
||||
|
||||
* PUSH EAX : All stack operations in 64-bit mode are 64-bits.
|
||||
|
||||
* XOR EAX,EAX : 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"$.
|
||||
|
||||
* TempleOS uses JIT 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.
|
||||
|
||||
* 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.
|
||||
|
||||
* The main 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.
|
||||
|
||||
* 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"$.
|
||||
|
||||
* 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$.
|
||||
|
||||
* 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"$.
|
||||
|
||||
* 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.
|
||||
|
||||
* 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 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.
|
||||
|
||||
* The CPU usage during disk operation expands to 99%. It polls while swapping-out. You can do other, non-disk activity during disk operations because it swaps-out a lot and task swaps take only half a microsecond, probably a hundred times faster than a typical OS. See $LK,"Cooperative Multitasking",A="FI:::/Demo/Lectures/Spinning.CPP"$. It does not break-up disk operations into small pieces for sharing, however, so the disk is lock onto that one task.
|
||||
|
||||
$FG,8$
|
||||
* "Windows" is a trademark of MicroSoft Corp.
|
||||
$FG$
|
||||
@@ -0,0 +1,6 @@
|
||||
$WW,1$TempleOS has an advanced algorithm for integrating ordinary differential equations suitable for use in video games. (Not scientific work.) It also has some support for systems of masses and springs, to save you some work.
|
||||
|
||||
See $LK,"CMathODE",A="MN:CMathODE"$ and $LK,"ODEsUpdate",A="MN:ODEsUpdate"$ for an overview.
|
||||
See $LK,"ODECallDerivative",A="MN:ODECallDerivative"$ to see what support there is for masses and springs.
|
||||
|
||||
See $LK,"::/Demo/Games/Whap.CPP"$, $LK,"::/Demo/Games/Rocket.CPP"$, $LK,"::/Demo/Games/MassSpring.CPP"$, $LK,"::/Apps/Span/SpanMain.CPP"$ or $LK,"::/Apps/X-Caliber/X-Caliber.CPP"$.
|
||||
@@ -0,0 +1,17 @@
|
||||
$WW,1$$FG,5$$TX+CX,"Compiler Options"$$FG$
|
||||
|
||||
Use $LK,"OptOn",A="MN:OptOn"$() $LK,"OptOff",A="MN:OptOff"$(). You might need to do $FG,2$#exe {OptOn();}$FG$.
|
||||
|
||||
$LK,"OPTf_GLBLS_ON_DATA_HEAP",A="MN:OPTf_GLBLS_ON_DATA_HEAP"$ without this option, global vars are placed in the code heap which is limited to 2 Gig. In $FG,2$AOT$FG$ modules, global vars take-up room in the $FG,2$.BIN$FG$ file, so you might want to use this option, instead. You might wish to turn it on and off around specific vars. A disadvantage of data heap global vars in $FG,2$AOT$FG$ modules is they can't be initialized.
|
||||
|
||||
$LK,"OPTf_EXTERNS_TO_IMPORTS",A="MN:OPTf_EXTERNS_TO_IMPORTS"$ and $LK,"OPTf_KEEP_PRIVATE",A="MN:OPTf_KEEP_PRIVATE"$ are strange options, you'll never need. They're to allow the same header file for $FG,2$Kernel$FG$ to act as $FG,2$extern$FG$s when compiling itself and $FG,2$import$FG$s when compiled by $FG,2$AOT$FG$ modules.
|
||||
|
||||
$LK,"OPTf_WARN_UNUSED_VAR",A="MN:OPTf_WARN_UNUSED_VAR"$ warning if unused var. It is applied to functions.
|
||||
|
||||
$LK,"OPTf_WARN_PAREN",A="MN:OPTf_WARN_PAREN"$ warning if parenthesis are not needed.
|
||||
|
||||
$LK,"OPTf_WARN_DUP_TYPES",A="MN:OPTf_WARN_DUP_TYPES"$ warning if dup local var type statements.
|
||||
|
||||
$LK,"OPTf_NO_REG_VAR",A="MN:OPTf_NO_REG_VAR"$ forces all function local vars to the stk not regs. Applied to functions.
|
||||
|
||||
$LK,"OPTf_NO_BUILTIN_CONST",A="MN:OPTf_NO_BUILTIN_CONST"$ Disable 10-byte float consts for ã, log2_10, log10_2, loge_2. Applied to functions.
|
||||
@@ -0,0 +1,9 @@
|
||||
$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"$().
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
@@ -0,0 +1,3 @@
|
||||
$WW,1$A $FG,2$Queue$FG$ is a bunch of $LK,"MAlloc",A="MN:MAlloc"$()ed chunks of mem linked together in a circle with one ptr to the $FG,2$next$FG$ value and another ptr to the $FG,2$last$FG$ value. These ptrs must be stored in the first locations in the structure.
|
||||
|
||||
Be careful when writing multitasking code not to access $FG,2$Queues$FG$ while in the middle of a change. You might turn-off preemption or interrupts.
|
||||
@@ -0,0 +1,44 @@
|
||||
$FG,5$$TX+CX,"TempleOS 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.
|
||||
|
||||
* 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"$().
|
||||
|
||||
* The syntax highlighting occassionally glitches. The compiler doesn't.
|
||||
|
||||
* Call $LK,"ChgDsk",A="MN:ChgDsk"$() when you insert a new removable media.
|
||||
|
||||
* Accessing CD-ROM's is flacky. Try $LK,"Drv",A="MN:Drv"$() or $LK,"ChgDsk",A="MN:ChgDsk"$() twice.
|
||||
|
||||
* You can only $FG,2$extern$FG$ something once. There is a varient called $FG,2$_extern$FG$ which binds a HolyC definition to a asm sym. This, too, can only be done once.
|
||||
|
||||
* A terminal task has a $LK,"CDoc",A="MN:CDoc"$ document structure that remains active even when you change $FG,4$Fs->draw_it$FG$. To prevent links in the $LK,"CDoc",A="MN:CDoc"$ from being activated when the user clicks in the window, do one of three things:
|
||||
$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.
|
||||
$ID,-2$
|
||||
* $FG,2$switch/case$FG$ statements allocate a single jump table--do not use with wide, sparse ranges of case values.
|
||||
|
||||
* Don't do a $FG,2$goto$FG$ out of a $FG,2$try{}$FG$.
|
||||
|
||||
* A $FG,2$goto$FG$ label name must not match a global scope object's name. (It's not worth slowing-down the compiler to handle this case.)
|
||||
|
||||
* $LK,"MemCpy",A="MN:MemCpy"$() only goes fwd.
|
||||
|
||||
* A $LK,"Cd",A="MN:Cd"$() cmd must be followed by two semicolons if a $FG,2$#include$FG$ is after it. This is because the preprocessor processes the next token ahead.
|
||||
|
||||
* 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.
|
||||
|
||||
* 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;
|
||||
$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.
|
||||
@@ -0,0 +1,38 @@
|
||||
$WW,1$$FG,5$$TX+CX,"RedSea File System"$$FG$
|
||||
|
||||
The RedSea file system is a simple, 64-bit, file system which is, basically, FAT32 with fixed-sized 64-byte directory entries and no FAT table, just an allocation bitmap. It has no clustered-blocks, just 512 byte sectors. Files are stored in contiguous blocks and cannot grow in size.
|
||||
|
||||
$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.
|
||||
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
|
||||
CDate datetime; //See $LK,"DateTime",A="::/Doc/TimeDate.TXT"$, $LK,"Implementation of DateTime",A="FI:::/Kernel/Date.CPP"$
|
||||
};
|
||||
|
||||
public class CBootStruct //RedSea is type FAT32 in partition table to fool BIOS
|
||||
{
|
||||
U8 jump_and_nop[3];
|
||||
U8 signature,reserved[4]; //MBR_PT_REDSEA=0x88. Distinguish from real FAT32
|
||||
I64 sects;
|
||||
I64 root_cluster;
|
||||
I64 bitmap_sects;
|
||||
I64 unique_id;
|
||||
U8 code[470];
|
||||
U16 signature2; //0xAA55
|
||||
};
|
||||
$HL,0$
|
||||
See $LK,"implementation of RedSea file system",A="::/Kernel/Dsk/FileSysRedSea.CPP"$.
|
||||
|
||||
File with names ending in .Z are stored compressed.
|
||||
See $LK,"implementation of LZW compression",A="::/Kernel/Compress.CPP"$.
|
||||
|
||||
I hope to do a ISO9660 replacement that consists of a hard-drive partition image copied onto a CD/DVD starting at about sector 20 with EL TORITO booting. 512-byte sectors will be placed on top of 2048-byte CD/DCD sectors, so there will be four blocks per CD/DVD sector.
|
||||
|
||||
There is no bad block table and no redundant allocation table. When I was a teenager, I used a raw disk block editing program to look at directory blocks and follow chains of blocks on my Commodore 64. I undeleted files. My goal in designing the RedSea system is to be as simple as possible, for kids.
|
||||
|
||||
$FG,8$
|
||||
* "Commodore 64" was a trademark of Commodore Business Machines.
|
||||
@@ -0,0 +1,30 @@
|
||||
$WW,1$$FG,5$$TX+CX,"Requirements for TempleOS"$$FG$
|
||||
|
||||
$FG,5$User Skills Required$FG$
|
||||
* Knowledge of the $FG,2$C$FG$ programming language.
|
||||
|
||||
$FG,5$Supported Hardware$FG$
|
||||
* $FG,4$$TX,"x86_64",HTML="http://en.wikipedia.org/wiki/Amd64#AMD64"$$FG$ PC compatible computer. (Obviously, you need 64-bit hardware for a 64-bit operating system.)
|
||||
|
||||
* 640x480 16 color VGA graphics.
|
||||
|
||||
* Most$FG$ keyboards and mice.
|
||||
|
||||
* Minimum 256 Meg RAM; Maximum $TX,"128 Gig",D="DD_MAPPED_MEM_SPACE_GIG"$ RAM (easily increased).
|
||||
|
||||
* Internal PC Speakers.
|
||||
|
||||
* CD/DVD-ROMs (not SCSI). ISO9660 file system.
|
||||
|
||||
* ATA and SATA hard drives.
|
||||
|
||||
$FG,5$Unsupported Hardware$FG$
|
||||
* No graphics acceleration.
|
||||
|
||||
* No sound cards.
|
||||
|
||||
* $FG,4$No networking$FG$.
|
||||
|
||||
* No USB devices, except keyboard and mouse in legacy mode. No, you can't use flash memory cards.
|
||||
|
||||
* No printers.
|
||||
@@ -0,0 +1,5 @@
|
||||
$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.
|
||||
@@ -0,0 +1,34 @@
|
||||
|
||||
$TX+CX,"TempleOS V2.03",D="DD_OS_NAME_VERSION"$
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$SP+CX,"",BI=1,BP="::/Misc/StockSprites.TXT,TempleOSLogo"$
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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
|
||||
|
||||
$LK+CX,"Trivial Solutions",A="FI:::/Doc/TrivialSolutions.TXT"$
|
||||
|
||||
@@ -0,0 +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.
|
||||
|
||||
See $LK,"::/Demo/Graphics/SpritePlot.CPP"$, $LK,"::/Demo/Graphics/SpritePlot3D.CPP"$ and $LK,"::/Demo/Graphics/SpritePut.CPP"$ and $LK,"SpriteMesh",A="MN:SpriteMesh"$().
|
||||
|
||||
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$
|
||||
@@ -0,0 +1,3 @@
|
||||
$WW,1$$FG,5$$TX+CX,"Sprite BitMap Menu Help"$$FG$
|
||||
|
||||
Bitmaps have a background color. If you delete to the clipboard, what's left will be background colored.
|
||||
@@ -0,0 +1,9 @@
|
||||
$WW,1$$FG,5$$TX+CX,"Sprite Edit Menu Help"$$FG$
|
||||
|
||||
Order of elements matters. They are executed in the order they appear in the side-bar. You can set the current element by clicking the element in the side-bar and making it RED.
|
||||
|
||||
DELETE will delete the RED element in the side-bar. You can just delete elements directly in the side-bar as long as you click another element to update things.
|
||||
|
||||
You can delete or select elements graphically.
|
||||
|
||||
You can insert an element which shifts around all subsequent other elements. Perhaps, you inserted a sprite's elements from the clip-board and want to chift it around. This command is also useful if you interpolate in programs.
|
||||
@@ -0,0 +1,7 @@
|
||||
$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.
|
||||
@@ -0,0 +1,9 @@
|
||||
$WW,1$$FG,5$$TX+CX,"Sprite Main Menu Help"$$FG$
|
||||
|
||||
Order of elements matters. They are executed in the order they appear in the side-bar. You can set the insert point for new elements by click the element in the side-bar and making it RED.
|
||||
|
||||
After you create a 3D Mesh, you can edit it by selecting it in the side-bar so it is colored RED. Then, click EDIT-3D-MESH. A shiftable 3D mesh has a 2D offset to position the origin. You can convert between shiftable and non-shiftable by editing it with the other command.
|
||||
|
||||
You can convert all elements to a BitMap if END is RED in the side-bar and you CONVERT-TO-BITMAP. Later, you can edit that bitmap by selecting it in the side bar so it is colored RED and clicking EDIT-BITMAP.
|
||||
|
||||
If you have a 3D icon, you might want to place a background-colored rectangle under the 3D icon, so it hovers above. Use TRANSFORM-OFF and TRANSFORM-ON. You will also need to set the Z offset of the icon. Go to the Edit menu and select EDIT-AS-TEXT and change the third INT to Z offset. Good luck.
|
||||
@@ -0,0 +1,7 @@
|
||||
$FG,5$$TX+CX,"Sprite SideBar Help"$$FG$
|
||||
|
||||
$WW,1$You can cut and paste elements in this side-bar to reorder, delete or duplicating them. Click an element in the side-bar after you make changes to cause the changes to take-effect.
|
||||
|
||||
You can click on an element to make it the insert point for new elements.
|
||||
|
||||
The RED element is the current element and it is the insert point for new elements.
|
||||
@@ -0,0 +1,29 @@
|
||||
$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
|
||||
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$
|
||||
$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$
|
||||
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)"$
|
||||
@@ -0,0 +1,46 @@
|
||||
$WW,1$$FG,5$$TX+CX,"Strategic Decisions Making"$
|
||||
$TX+CX,"TempleOS Simple"$
|
||||
$FG$
|
||||
The $FG,2$$TX,"trivial solution",HTML="http://en.wikipedia.org/wiki/Trivial_solution"$$FG$ in math is the simple, obvious answer. TempleOS has many examples of using trivial solutions.
|
||||
|
||||
* Everything runs in kernel, $FG,2$ring 0$FG$, mode.
|
||||
|
||||
* $FG,2$One memory map$FG$ for all tasks on all cores with virtual addresses set equal to physical.
|
||||
|
||||
* One platform -- $FG,4$$TX,"x86_64",HTML="http://en.wikipedia.org/wiki/Amd64#AMD64"$$FG$ PC's, no 32-bit support.
|
||||
|
||||
* No security.
|
||||
|
||||
* 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.
|
||||
|
||||
* $FG,2$640x480$FG$ 16 colors. Updates whole screen at 60 fps, optimized for full screen games where "invalid rectangles" 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.
|
||||
|
||||
* Whole files are processed almost exclusively, allowing compression.
|
||||
|
||||
* One language and compiler for command-line, scripts, songs, automations and code.
|
||||
|
||||
* One editor/word processor/browser for the command-line window, source code, documentation browser, dialog forms.
|
||||
|
||||
* 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".
|
||||
|
||||
* 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.
|
||||
|
||||
* $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,"Music",A="MN:Play"$ is done with an elegant one-voice notation.
|
||||
|
||||
* All tasks have a heap and a sym table. Scope is that of environment vars in other operating systems. As text is typed at the command line or you run programs by $FG,2$#include$FG$ing them, the syms go in the table. If a sym is not found, the parent task's table is checked. The father of all tasks has the API syms you'll need waiting in it's table. No need to $FG,2$#include$FG$ headers.
|
||||
|
||||
* No need for namespaces -- scoping occurs automatically based on task symbol table hierarchy with the $FG,2$Adam task$FG$'s symbol system-wide global.
|
||||
|
||||
* Sometimes, I $LK,"cut corners",A="FI:::/Doc/CutCorners.TXT"$ in the interest of keeping the code beautiful.
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
$WW,1$$FG,5$$TX+CX,"Linux TSZ Utility"$$FG$
|
||||
|
||||
|
||||
$FG,2$TSZ [-ascii] filename$FG$
|
||||
|
||||
Will uncompress a single file from within Linux. The $FG,2$-ascii$FG$ flag will convert the irregular TempleOS ASCII 5 and ASCII 31 characters to spaces. (ASCII 5 is used to mark the cursor pos and ASCII 31 is used for shifted space characters and will cause problems unless you convert them.)
|
||||
|
||||
|
||||
$FG,5$$TX+CX,"Windows TSZ Utility"$$FG$
|
||||
|
||||
$FG,2$TSZ$FG$ will uncompress TempleOS files you have gotten to Windows. There are two ways to get files from TempleOS to Windows -- via CD-ROM or via a $FG,2$FAT32$FG$ partition.
|
||||
|
||||
|
||||
$FG,2$TSZ [-ascii] dirname$FG$:
|
||||
|
||||
will uncompress all TempleOS files with names ending in "$FG,2$.Z$FG$" in a Windows directory and in all subdirectories. The $FG,2$-ascii$FG$ flag used in combination will convert the irregular TempleOS ASCII 5 and ASCII 31 characters to spaces. (ASCII 5 is used to mark the cursor pos and ASCII 31 is used for shifted space characters and will cause problems unless you convert them.) Note: If you pick names not ending in "$FG,2$.Z$FG$", they will not need to be uncompressed. You can $LK,"Move",A="MN:Move"$() or $LK,"Copy",A="MN:Copy"$() them to a name not ending in "$FG,2$.Z$FG$" and they will be stored uncompressed.
|
||||
|
||||
$FG,8$
|
||||
* "Windows" is a trademark of MicroSoft Corp.
|
||||
* "Linux" is probably a trademark owned by Linus Torvalds.
|
||||
$FG$
|
||||
@@ -0,0 +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.
|
||||
@@ -0,0 +1,3 @@
|
||||
$WW,1$TempleOS uses a 64-bit value, $LK,"CDate",A="MN:CDate"$, for date/time. The upper 32-bits are the days since Christ. The lower 32-bits store time of day divided by 4 billion which works out to 49710ths of a second. You can subtract two $LK,"CDate",A="MN:CDate"$'s to get a time span.
|
||||
|
||||
Use $LK,"CDATE_FREQ",A="MN:CDATE_FREQ"$ to convert.
|
||||
@@ -0,0 +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.
|
||||
@@ -0,0 +1,7 @@
|
||||
$WW,1$One jiffy is one time slice. $LK,"sys_jiffies",A="MN:sys_jiffies"$ 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,"SYS_TIMER_FREQ",A="MN:SYS_TIMER_FREQ"$ to convert $LK,"SysTimerRead",A="MN:SysTimerRead"$.
|
||||
+150
@@ -0,0 +1,150 @@
|
||||
$WW,1$$FG,5$$IV,1$$TX+CX,"TIPS"$$IV,0$$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.
|
||||
|
||||
* 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.
|
||||
|
||||
* 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$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, 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 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 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"$.
|
||||
|
||||
* You can rst MultiCore CPU's if they get hung with $LK,"MPStart",A="MN:MPStart"$().
|
||||
|
||||
* 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.
|
||||
|
||||
* 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$.
|
||||
|
||||
* $LK,"Merge",A="MN:Merge"$() can be used to see what's changed. The $FG,2$+d$FG$ flag will show differences of files which have changed and allow you to merge code. (The $FG,2$+r$FG$ flag will recurse.)
|
||||
|
||||
* There is a utility $LK,"LinkChk",A="MN:LinkChk"$() which will check for broken links in documentation.
|
||||
|
||||
* You can use $LK,"OptOn",A="MN:OptOn"$($LK,"OPTf_WARN_PAREN",A="MN:OPTf_WARN_PAREN"$) to find unnecessary parentheses in code.
|
||||
|
||||
* You can use $LK,"OptOn",A="MN:OptOn"$($LK,"OPTf_WARN_DUP_TYPES",A="MN:OPTf_WARN_DUP_TYPES"$) to find unnecessary local var type statements.
|
||||
|
||||
* $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,"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$.
|
||||
|
||||
* 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-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.
|
||||
|
||||
* 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.
|
||||
|
||||
* 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 {"$.
|
||||
|
||||
* If you output to the cmd line and wish to allow users to scroll around and view data, you can use $LK,"View",A="MN:View"$().
|
||||
|
||||
* 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 reactivate $FG,2$WORDSTAT$FG$ after closing it by pressing $FG,2$CTRL-FUN KEY$FG$.
|
||||
|
||||
* 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"$.
|
||||
|
||||
* 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.
|
||||
|
||||
* 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$.
|
||||
|
||||
* When editing a sprite, you can cut and paste the elements in the sidebar text list window.
|
||||
|
||||
* I recommend keeping CSprite in vect format until you are done creating them, so you can edit the ctrl points. Then, convert them to bitmaps, so the flood fills work well. If you are doing interpolation, however, they must be vect.
|
||||
|
||||
* $LK,"GrFloodFill",A="MN:GrFloodFill"$() is slow. $LK,"GrRect",A="MN:GrRect"$() is fast.
|
||||
|
||||
* 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.
|
||||
|
||||
* 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.
|
||||
|
||||
* Study $LK,"::/Adam/Utils/MemRep.CPP"$ and $LK,"WallPaper",A="MN:WallPaper"$() to learn how the system resources are put together.
|
||||
|
||||
* 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"$().
|
||||
|
||||
* 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.
|
||||
|
||||
* For advanced heap debugging, play with $LK,"_CFG_HEAP_DBG",A="MN:_CFG_HEAP_DBG"$. You're on your own.
|
||||
|
||||
* You can use $LK,"Type",A="MN:Type"$() to display $FG,2$.BMP$FG$ or $FG,2$.GRA$FG$ files.
|
||||
|
||||
* Use $LK,"Man",A="MN:Man"$() to jump to short sym name src code.
|
||||
|
||||
* Use $LK,"Fix",A="MN:Fix"$() to edit and fix the last compiler err.
|
||||
|
||||
* You can use $FG,2$<CTRL-SHIFT-L>$FG$ to do a check for compile errors.
|
||||
|
||||
* You can use $LK,"DocOpt",A="MN:DocOpt"$() to optimize links. (Mostly just removes .Z)
|
||||
|
||||
* $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$
|
||||
@@ -0,0 +1,13 @@
|
||||
$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.
|
||||
|
||||
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"$.
|
||||
|
||||
You can rotate single points using $LK,"GrRot",A="MN:GrRot"$().
|
||||
|
||||
The 4th dimension allows a neat trick where you can place pos shifts (translations), into the matrix and $LK,"GrMulMat",A="MN:GrMulMat"$ them to combine rotation/shift operations. Normally, you can't combine pos shift operations. See $LK,"GrSetTranslation",A="MN:GrSetTranslation"$() and $LK,"::/Demo/Graphics/Transform.CPP"$.
|
||||
|
||||
Finally, $LK,"CDC",A="MN:CDC"$'s have an $FG,2$x$FG$, $FG,2$y$FG$ and $FG,2$z$FG$ which is an additional shift (translation).
|
||||
|
||||
The transformation is implemented as a callback on the $LK,"CDC",A="MN:CDC"$'s $FG,2$transform()$FG$ member. The default $FG,2$transfrom()$FG$ callback is $LK,"GrTransform",A="MN:GrTransform"$(). See $LK,"::/Demo/Games/EagleDive.CPP"$ or $LK,"::/Demo/Games/CastleFrankenstein.CPP"$ to see how to change the $FG,2$transfrom()$FG$ callback for foreshortening.
|
||||
@@ -0,0 +1,21 @@
|
||||
$WW,1$$FG,5$$TX+CX,"Trivial Solutions"$$FG$
|
||||
|
||||
|
||||
The $FG,2$$TX,"trivial solution",HTML="http://en.wikipedia.org/wiki/Trivial_solution"$$FG$ in math is the simple, obvious answer. The fable that NASA spent millions on a space pen while Russia used a pencil is an example. TempleOS uses many $LK,"trivial solutions",A="FI:::/Doc/Strategy.TXT"$.
|
||||
|
||||
See $LK,"::/Doc/Acknowledgements.TXT"$.
|
||||
See $LK,"::/Doc/Demands.TXT"$.
|
||||
|
||||
$FG,2$Website:$FG$
|
||||
$TX,"www.templeos.org",HTML="http://www.templeos.org"$
|
||||
|
||||
$FG,2$Owner/President:$FG$
|
||||
Terry A. Davis
|
||||
$TX,"ASU Transcripts",HTML="http://www.templeos.org/files/ASU_Transcripts.pdf"$
|
||||
8144 Sickle Lane
|
||||
Las Vegas, NV 89128
|
||||
(702)254-4223
|
||||
$TX,"tdavis@templeos.org",HTML="mailto:tdavis@templeos.org"$
|
||||
|
||||
$FG,2$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.
|
||||
@@ -0,0 +1,7 @@
|
||||
$WW,1$$FG,5$$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.
|
||||
|
||||
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.
|
||||
|
||||
See the $LK,"Installing",A="FI:::/Doc/Install.TXT"$ documentation.
|
||||
@@ -0,0 +1,78 @@
|
||||
$WW,1$$FG,5$$TX+CX,"Welcome to TempleOS"$$FG$
|
||||
|
||||
$LK,"Trivial Solutions",A="FI:::/Doc/TrivialSolutions.TXT"$'s TempleOS is a x86_64, multi-cored, multi-tasking, ring-0-only, single-address_mapped (identity), operating system for recreational programming:
|
||||
|
||||
$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!
|
||||
|
||||
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"$.
|
||||
|
||||
Conventional thinking is "failure is not an option" for general purpose operating systems. Since this OS is used in addition to Windows or Linux, however, failure is an option -- just use Windows if you can't do something.
|
||||
|
||||
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".
|
||||
|
||||
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.
|
||||
|
||||
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$So, I added default args from $FG,2$C++$FG$ and it looked like this:
|
||||
|
||||
>$FG,4$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$
|
||||
|
||||
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.
|
||||
|
||||
Once I was no longer using standard C/C++ syntax, I decided to change everything I didn't like and call it $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$. Here are the new $LK,"operator precedence",A="FF:::/Doc/HolyC.TXT,operator precedence"$ rules. It's Biblical! See $LK,"Luke,5:37",A="BF:Luke,5:37"$.
|
||||
|
||||
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"$.
|
||||
|
||||
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.
|
||||
|
||||
TempleOS is geared toward reading and writing whole files. Since whole files are processed, compression is possible. Filenames ending in "$FG,2$.Z$FG$" are automatically compressed or uncompressed when stored and fetched. TempleOS does support direct block random access into files, however -- $LK,"FRBlks",A="MN:FRBlks"$() and $LK,"FWBlks",A="MN:FWBlks"$().
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.)
|
||||
|
||||
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.
|
||||
|
||||
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"$.
|
||||
|
||||
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$.
|
||||
|
||||
$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-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$.
|
||||
|
||||
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.
|
||||
|
||||
|
||||
$MA-X+PU,"Take Tour",LM="SpawnUser(\"Cd(\\\"::/Misc/Tour\\\");;AutoFile(\\\"Tour\\\");\n\");"$
|
||||
|
||||
$FG,8$
|
||||
* "Windows" is a trademark of MicroSoft Corp.
|
||||
$FG$
|
||||
@@ -0,0 +1,42 @@
|
||||
$WW,1$$FG,5$$TX+CX,"Text-Widget Help"$$FG$
|
||||
|
||||
See $LK,"::/Doc/Dollar.TXT"$ for details on dollar sign cmds.
|
||||
|
||||
$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.
|
||||
$FG,2$"AutoStr"$FG$ Like a macro except it is an $LK,"AutoFile",A="FF:::/Doc/Glossary.TXT,AutoFile"$. You can't have both an autostr and macro text defined.
|
||||
|
||||
$FG,5$Tag Text$FG$ is the text that will be displayed for the item. For links, you can leave it blank and the details of the link will be shown.
|
||||
$FG,5$Hide$FG$ means display nothing, making an entry invisible.
|
||||
|
||||
$FG,5$Left X$FG$ relative to the left margin.
|
||||
$FG,5$Center X$FG$ relative to the horizontal center of the window.
|
||||
$FG,5$Right X$FG$ relative to the right margin.
|
||||
$FG,5$Top Y$FG$ relative to the top of the window.
|
||||
$FG,5$Center Y$FG$ relative to the vertical center of the window.
|
||||
$FG$$FG,5$Bottom Y$FG$ relative to the bottom of the window.
|
||||
|
||||
$FG,5$Blink$FG$ make the text blink.
|
||||
$FG,5$Invert$FG$ make the text inverted.
|
||||
$FG,5$Underline$FG$ make the text underlined.
|
||||
|
||||
$FG,5$Scroll X Length Expression$FG$ if a value is entered, the text will scroll in an area of this width.
|
||||
$FG,5$Y Offset Expression$FG$ if a value is entered, the text will be shifted vertically by this many pixs, so you can make superscripts or subscripts.
|
||||
$FG,5$X Offset Expression$FG$ if a value is entered, the text will be shifted horizontally by this many pixs.
|
||||
|
||||
$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$X Expression$FG$ For cursor movements, the horizontal value.
|
||||
$FG,5$Y Expression$FG$ For cursor movements, the vertical value.
|
||||
|
||||
$FG,5$$BK,1$PopUp$BK,0$$FG$ For macro's, run the macro in a PopUp window. Do this when making a macro to run a program, so it doesn't tie-up memory.
|
||||
|
||||
$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$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"$().
|
||||
@@ -0,0 +1,7 @@
|
||||
$FG,2$$WW,1$WordStat$FG$ collects statistics from all text files in subdirectories when you call $LK,"WSInit",A="MN:WSInit"$(). It counts which words follow which other words with what frequency in a big sparse matrix.
|
||||
|
||||
It provides auto-complete typing and jump-to-code or jump-to-dictionary_definition functionality.
|
||||
|
||||
Tip: If you use consistent var names for items of different classes, you'll usually be able to autocomplete the 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 have the raw Project Gutenberg dictionary file, you can generate the TempleOS processed dictionary files with the stand-alone program $LK,"::/Adam/WordStat/WSDictGen.CPP"$.
|
||||
Reference in new issue
Block a user