TempleOSTS_130707.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:45:45 +02:00
1 parent 17b71f1a2d
commit 1343005a29
617 files changed
+14399 -25130

No files matched your search

+15 -18
View File
@@ -1,7 +1,5 @@
$WW,1$$FG,5$$TX+CX,"Acknowledgements"$$FG$
I am a for profit company, not an academic. I have never seen a commercial product with acknowledgements like an academic paper. Never-the-less, here are references. (I don't know the original sources on many of these.)
1) The font, $LK-A,"::/TempleOS/Kernel/Font8x8.CPP"$, is taken from $FG,4$$TX+HTML,"FreeDOS","http://www.freedos.org"$$FG$.
2) $LK-A,"::/TempleOS/Kernel/Dsk/ATADef.HPP"$ originally
@@ -15,35 +13,33 @@ from Linux. I later got the spec.
6) The random number generator is from the book, $UL,1$Numeric Recipies in C$UL,0$.
7) The pilgrim game map is from $FG,4$$TX+HTML,"US Geological Survey","http://nationalatlas.gov/mapmaker"$$FG$. (Screen captured and edited with MS Paint and saved as $FG,2$.BMP$FG$ and imported into TempleOS and converted with a program I wrote.)
7) Tne sheep and goats in AfterEgypt are from $FG,4$$TX+HTML,"http://www.public-domain-photos.com","http://www.public-domain-photos.com"$$FG$.
8) Tne sheep in AfterEgypt is from $FG,4$$TX+HTML,"http://www.public-domain-photos.com","http://www.public-domain-photos.com"$$FG$.
8) The $FG,2$FAT32$FG$ file system is owned by MicroSoft.
9) 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) 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+HTML,"PCIDevice Lst File","FI:::/TempleOS/Misc/PCIDevices.TXT","http://www.pcidatabase.com/reports.php?type=tab-delimeted"$.
11) I included $LK+HTML,"PCIDevice Lst File","FI:::/TempleOS/Misc/PCIDevices.TXT","http://www.pcidatabase.com/reports.php?type=tab-delimeted"$.
11) Thanks to whoever wrote this $FG,4$$TX+HTML,"CppHtml.CPP.Z","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","FI:::/TempleOS/Adam/Utils/ToHtml.CPP"$.
12) Thanks to whoever wrote this $FG,4$$TX+HTML,"CppHtml.CPP.Z","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","FI:::/TempleOS/Adam/ToHtml.CPP"$.
12) Yahoo Sitebuilder helped with some html code items.
13) Yahoo Sitebuilder helped with some html code items.
13) I used $FG,4$$TX+HTML,"MagicISO","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+HTML,"ISO9660","http://users.telenet.be/it3.consultants.bvba/handouts/ISO9960.html"$$FG$ spec.
14) I used $FG,4$$TX+HTML,"MagicISO","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+HTML,"ISO9660","http://users.telenet.be/it3.consultants.bvba/handouts/ISO9960.html"$$FG$ spec.
14) I looked at bootable CD boot sects, but didn't learn anything, finding it easier to make my own.
15) I looked at bootable CD boot sects, but didn't learn anything, finding it easier to make my own.
15) I think I got my original PC speaker code from $FG,2$Borland C$FG$.
16) I think I got my original PC speaker code from $FG,2$Borland C$FG$.
16) I found PS/2 keyboard and mouse code on the net and documentation. My code is very different. I found VGA register info on the net.
17) I found PS/2 keyboard and mouse code on the net and documentation. My code is very different. I found VGA register info on the net.
17) Thanks to $FG,4$$TX+HTML,"http://www.osdev.org","http://www.osdev.org"$$FG$ for a couple tips.
18) Thanks to $FG,4$$TX+HTML,"http://www.osdev.org","http://www.osdev.org"$$FG$ for a couple tips.
18) 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.
19) God told me to stick with 640x480x16 color and kept me from blindly 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.
19) I got $FG,4$$TX+HTML,"Webster's Dictionary","http://www.templeos.org/files/DICTIONARY.TXT"$$FG$ and $FG,4$$TX+HTML,"The King James Bible","http://www.templeos.org/files/BIBLE.TXT"$$FG$ from $FG,4$$TX+HTML,"Project Gutenberg","http://promo.net/pg/"$$FG$.
20) I got $FG,4$$TX+HTML,"Webster's Dictionary","http://www.templeos.org/files/DICTIONARY.TXT"$$FG$ and $FG,4$$TX+HTML,"The King James Bible","http://www.templeos.org/files/BIBLE.TXT"$$FG$ from $FG,4$$TX+HTML,"Project Gutenberg","http://promo.net/pg/"$$FG$.
In short, I wrote every one of the $TX+D,"139,633","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.
In short, I wrote every one of the $TX+D,"129,624","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.
@@ -53,3 +49,4 @@ $FG,8$
* "VAX" is a trademark of Digital Equipment Corp.
* "Linux" is probably a trademark owned by Linus Torvalds.
* "VAXTMOS" is a trademark of Ticketmaster.
$FG$
+1 -2
View File
@@ -1,8 +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","MN:Spawn"$()ed which intercepts real user input and generates fake input. AutoFiles are $FG,2$C+$FG$ programs run by the child who's stdout goes to the parent's input buffer. $LK,"Msg","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$.
When an $FG,2$AutoFile$FG$ runs, a child task is $LK,"Spawn","MN:Spawn"$()ed which intercepts real user input and generates fake input. AutoFiles are $LK,"Holy C","FI:::/TempleOS/Doc/HolyC.TXT"$ programs run by the child who's stdout goes to the parent's input buffer. $LK,"Msg","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-A,"::/TempleOS/Demo/AutoFile/AFDir.AUT"$.
Note: $LK,"Auto","MN:Auto"$("") can be used if all you need is to send ASCII characters. It differs from $LK,"AutoStr","MN:AutoStr"$(). You'll probably use $LK,"Auto","MN:Auto"$() a lot and not $LK,"AutoStr","MN:AutoStr"$(). With $LK,"Auto","MN:Auto"$(), for example, you can place answers to the prompts for recompiling the $FG,2$Kernel$FG$ module during $LK,"MakeOSInstallPrtBootLoader","MN:MakeOSInstallPrtBootLoader"$().
+1 -3
View File
@@ -6,11 +6,9 @@ $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$$FG,5$Bit operations are "atomic" meaning they won't be interrupted between the testing of the bit and the alteration. This is important when multitasking. With multiprocessing, you should "Lock" these operations.$FG$
$FG$$FG,5$Bit operations are "atomic" meaning they won't be interrupted between the testing of the bit and the alteration. This is important when multitasking. With multicore processing, you should "Lock" these operations.$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.
+147 -1
View File
@@ -1,4 +1,150 @@
$WW,1$$FG,2$Use $LK,"R","MN:R"$() to rename if I change a label.$FG$
$IV,1$----03/15/13 21:13:02----$IV,0$
$IV,1$----07/07/13 11:58:10----$IV,0$
* Made graphics routines return I64, not Bool.
$IV,1$----06/30/13 00:41:54----$IV,0$
* $BK,1$TempleOS version 1.04 Released$BK,0$
* Fixed $LK-A,"::/TempleOS/Apps/Span/SpanMain.CPP.Z"$.
* Added $LK,"CTask","MN:CTask"$.border_src and $LK,"CTask","MN:CTask"$.title_src.
* Cleaned-up $LK,"CTask","MN:CTask"$.task_title.
$IV,1$----06/27/13 07:11:00----$IV,0$
* Cleaned-up $LK,"CTask","MN:CTask"$.text_attr and $LK,"CTask","MN:CTask"$.border_attr.
* Got rid of $LK,"CDoc","MN:CDoc"$.start_text_attr.
* Got rid of custom doc widget colors and custom syntax highlighting colors.
$IV,1$----06/18/13 06:54:12----$IV,0$
* Made $FG,2$/TempleOS/Adam/Utils$FG$ directory.
$IV,1$----06/16/13 17:46:40----$IV,0$
* $BK,1$TempleOS version 1.03 Released$BK,0$
* Made better $LK-A,"::/TempleOS/Demo/Graphics/PixelCollision.CPP"$.
* $LK,"R","MN:R"$("gr_dc2","gr_dc");
* Improved PSect code.
* $LK,"R","MN:R"$("CDate","Date");
* $LK,"R","MN:R"$("MPJob","JobQue");
* $LK,"R","MN:R"$("MPSpawn","Spawn");
* Changed args to $LK,"Spawn","MN:Spawn"$().
* Got rid of cpu_mask in multicore API.
$IV,1$----06/15/13 02:18:23----$IV,0$
* Worked on $LK-A,"::/TempleOS/Apps/ToTheFront/ToTheFront.CPP"$.
$IV,1$----06/14/13 17:12:47----$IV,0$
* Made so $LK,"JobQue","MN:JobQue"$() and $LK,"Spawn","MN:Spawn"$() can work with core#0.
* $LK,"R","MN:R"$("Servant","Srv");
* $LK,"R","MN:R"$("Execute","Exe");
* $LK,"R","MN:R"$("MPJobResult","$LK,"GetResult","MN:GetResult"$");
* $LK,"R","MN:R"$("GetRqstResult","$LK,"ScanResult","MN:ScanResult"$");
* Merged CMPCmd into $LK,"CSrvCmd","MN:CSrvCmd"$.
$IV,1$----06/12/13 13:29:08----$IV,0$
* Added coffins to $LK-A,"::/TempleOS/Demo/Games/CastleFrankenstein.CPP"$.
* Fixed MeshEditor bug.
$IV,1$----06/12/13 10:49:53----$IV,0$
* Renamed games.
* Added $FG,2$AddOutline$FG$ and $FG,2$Etch$FG$ to $FG,2$<CTRL-R>$FG$ bitmap edit menu.
* Changed $LK-A,"::/TempleOS/Demo/Games/BulgeBomber.CPP"$.
$IV,1$----06/02/13 21:25:49----$IV,0$
* Got rid of 3 arg in-line (built-in) functions.
* Got rid of $FG,2$? :$FG$ operator.
* Improved unassembler code.
* Improved compiler code.
$IV,1$----05/27/13 08:15:31----$IV,0$
* $BK,1$TempleOS version 1.02 Released$BK,0$
* Added help to $FG,2$<CTRL-R>$FG$.
* Added $FG,2$PopUp$FG$ flag for links.
* $LK,"R","MN:R"$("Triangle","Tri");
$IV,1$----05/25/13 13:47:35----$IV,0$
* $LK,"R","MN:R"$("PopUpDitherColor","PopUpColorDither");
* $LK,"R","MN:R"$("PopUpLightingColor","PopUpColorLighting");
* Changed sprite edit.
$IV,1$----05/24/13 20:15:47----$IV,0$
* Fixed compiler bug involving passing float array to function.
$IV,1$----05/16/13 07:09:21----$IV,0$
* Changed $LK,"DocPutLine","MN:DocPutLine"$().
* Moved tag to $LK,"CDocEntryBase","MN:CDocEntryBase"$.
$IV,1$----05/12/13 14:15:07----$IV,0$
* Improved documentation.
* Moved profiler from Adam2 to Adam3.
$IV,1$----05/11/13 03:31:59----$IV,0$
* $LK,"R","MN:R"$("MemPtAtPageTableEntry","MemPageTable");
* Removed CGrVectMap.
* Removed demos: WinMgr2, Bling, Noise, Layers3DJob, Rocks, MissileDefense, Chess and Pilgrim.
* Removed hooks for HD Audio.
* Removed accents and waveforms from $LK,"Play","MN:Play"$().
$IV,1$----05/08/13 13:04:22----$IV,0$
* $LK,"R","MN:R"$("NativeFS","RedSeaFS");
* $LK,"R","MN:R"$("C+","Holy C");
$IV,1$----04/30/13 06:15:35----$IV,0$
* $LK,"R","MN:R"$("GameStarters","Games");
$IV,1$----04/26/13 07:25:50----$IV,0$
* Fixed bug with Bible links.
$IV,1$----04/10/13 12:41:18----$IV,0$
* $FG,4$dft_drv$FG$ is now $FG,4$*sys_acct$FG$.
* Made so RAM drives are not reformatted at boot.
* $FG,4$$BK,1$WARNING$BK,0$$FG$: Added new prompt to RAM disk creation.
* Added $LK,"StreamExePutS","MN:StreamExePutS"$() and $LK,"StreamExePrintF","MN:StreamExePrintF"$().
$IV,1$----04/08/13 10:46:20----$IV,0$
* $BK,1$TempleOS version 1.01 Released$BK,0$
* Compiler optimization for $LK,"Bt","MN:Bt"$(), $LK,"Bts","MN:Bts"$(), $LK,"Btr","MN:Btr"$(), etc.
$IV,1$----04/06/13 07:39:53----$IV,0$
* Added $LK,"OptClassFwd","MN:OptClassFwd"$() and $LK,"OptLabelFwd","MN:OptLabelFwd"$().
$IV,1$----04/04/13 06:54:53----$IV,0$
* Cleaned-up $LK-A,"::/TempleOS/Apps/AfterEgypt/Horeb.CPP"$.
$IV,1$----04/04/13 03:31:30----$IV,0$
* Cleaned-up $FG,4$::/TempleOS/Demo/Games/Rocks.CPP.Z$FG$.
* Cleaned-up compiler code.
* Improved $LK-A,"::/TempleOS/Demo/Snd/WaterFowl.CPP"$.
$IV,1$----04/02/13 16:58:49----$IV,0$
* Redid $FG,2$ReIndent$FG$ in $FG,2$<CTRL-SHIFT-L>$FG$ menu. Got rid of old nasty indent code.
* Added $FG,2$CompileChk$FG$ to $FG,2$<CTRL-SHIFT-L>$FG$ menu.
* Changed $LK,"LexNew","MN:LexNew"$() filename arg.
* Added $LK,"LexAttachDoc","MN:LexAttachDoc"$() to replace $FG,4$LexIncludeDoc$FG$().
* Fixed registry bug.
$IV,1$----04/02/13 03:09:24----$IV,0$
* Warning: Changed $LK,"CDFileCreate","MN:CDFileCreate"$().
* Improved $LK-A,"::/TempleOS/Adam/Boot/DskCDDVD.CPP"$.
* Improved $LK-A,"::/TempleOS/Adam/WallPaper.CPP"$.
$IV,1$----03/31/13 20:15:32----$IV,0$
* Added background to $LK-A,"::/TempleOS/Demo/Games/Squirt.CPP"$.
* Added background to $LK-A,"::/TempleOS/Demo/Games/ZoneOut.CPP"$.
* Added option to edit sprite bitmap extents as text. $LK,"PopUpExtents","MN:PopUpExtents"$().
* Added background to $LK-A,"::/TempleOS/Demo/Graphics/Camp.CPP"$, Quail and Clouds.
$IV,1$----03/30/13 16:32:31----$IV,0$
* Changed $LK,"CDoc","MN:CDoc"$ que to $FG,4$put_doc$FG$, $FG,4$display_doc$FG$, and $FG,4$border_doc$FG$.
* Got rid of HDAudio support -- never worked for very many people.
$IV,1$----03/27/13 04:18:15----$IV,0$
* Changed $MA+A,"Tour","Cd(\"::/TempleOS/Misc/Tour\");;AutoFile(\"Tour\");\n"$.
$IV,1$----03/24/13 14:44:28----$IV,0$
* Made $LK,"PutChar","MN:PutChar"$('Hello') accept multiple chars. This is tricky. My compiler allows multi-byte char constants.
$IV,1$----03/19/13 16:18:53----$IV,0$
* Added $LK,"DocType","MN:DocType"$() and $LK,"DocNewLine","MN:DocNewLine"$().
* Added option for extra new_lines to $LK,"Type","MN:Type"$().
$IV,1$----03/19/13 00:38:44----$IV,0$
* $BK,1$TempleOS version 1.00 Released$BK,0$
+1 -2
View File
@@ -1,6 +1,6 @@
$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, ASCII 28 is $FG,2$<SHIFT-ESC>$FG$ and ASCII #31 is a $FG,2$<SHIFT-SPACE>$FG$. See $LK,"Char Definitions","MN:CH_SHIFT_SPACE"$.
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","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","MN:SCF_CTRL"$ and $LK,"Scan Codes","MN:SC_INS"$.
@@ -13,4 +13,3 @@ TempleOS stores scan codes in 8 bytes.
Run the program $LK-A,"::/TempleOS/Demo/MsgLoop.CPP"$ to examine scan code.
A $FG,2$String$FG$ is a bunch of ASCII characters terminated with a zero.
+9 -14
View File
@@ -1,9 +1,6 @@
$FG,5$$WW,1$$TX+CX,"TempleOS Charter"$$FG$
The goal of TempleOS is to provide an ideal environment for recreational programming and not imitate $FG,2$Linux$FG$. TempleOS is orders of magnitude simpler than $FG,2$Linux$FG$ to better fulfill the promise of $FG,2$open source$FG$. The vision for TempleOS is a 64-bit, souped-up, multitasking, multicore $FG,2$Commodore 64$FG$ with a $FG,2$C+$FG$ shell instead of $FG,2$BASIC$FG$ that runs $FG,4$$TX+HTML,"x86_64","http://en.wikipedia.org/wiki/Amd64#AMD64"$$FG$ code.
TempleOS holds no standards sacred -- everything is freshly designed from scratch. This is not a 1970's main frame operating system and, no, it has nothing to do with $FG,2$Commodore 64$FG$ emulation -- it's $FG,4$$TX+HTML,"x86_64","http://en.wikipedia.org/wiki/Amd64#AMD64"$$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!
1) 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.
@@ -15,20 +12,18 @@ TempleOS holds no standards sacred -- everything is freshly designed from scratc
5) TempleOS will always have one video mode, $FG,2$640x480$FG$ by 16 colors, unless that mode becomes unavailable on computers in the future.
6) TempleOS will always be $FG,2$free$FG$. I might sell applications, support, or, possibly, do adware.
6) TempleOS will always just have PC Speaker sound.
7) 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.
7) TempleOS will always be $FG,2$free$FG$. I might sell applications, support, or, possibly, do adware.
8) All function args and returns will be 64-bit. No plans for C++.
8) 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.
9) 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 ASCII.
9) All function args and returns will be 64-bit. No plans for C++.
10) 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.
10) 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 ASCII.
11) 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.
11) 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.
12) $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 I can add members to classes, reorder members in classes, add default args to existing functions, change $FG,2$#define$FG$ values, etc. all without breaking compatibility.
12) 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.
$FG,8$
* "Commodore 64" was a trademark of Commodore Business Machines.
* "Linux" is probably a trademark owned by Linus Torvalds.
13) $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 I can add members to classes, reorder members in classes, add default args to existing functions, change $FG,2$#define$FG$ values, etc. all without breaking compatibility.
+1 -1
View File
@@ -1,4 +1,4 @@
$WW,1$The cmd line feeds into a $FG,2$C+$FG$ compiler as you type. A statement outside a function executes immediately. Remember to add a semicolon.$WW,1$
$WW,1$The cmd line feeds into the $LK,"Holy C","FI:::/TempleOS/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.
+4 -3
View File
@@ -1,6 +1,6 @@
$WW,1$$FG,5$$TX+CX,"Clearing-up Confusions"$$FG$
* I, Terry A. Davis, wrote every one of the $TX+D,"139,633","DD_TEMPLEOS_LOC"$ lines of TempleOS over the past $TX+D,"9.6","DD_TEMPLEOS_AGE"$ years (full-time). It runs on bare hardware with no layering, libraries, tools, modules or anything from other sources. It's 100% independent and stands alone. It has no networking and certainly doesn't call home. Every line of TempleOS src code is including in all distro's, from the kernel to the compiler to the boot loaders.
* I, Terry A. Davis, wrote every one of the $TX+D,"123,088","DD_TEMPLEOS_LOC"$ lines of TempleOS over the past $TX+D,"9.9","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.
@@ -18,13 +18,13 @@ $WW,1$$FG,5$$TX+CX,"Clearing-up Confusions"$$FG$
* $LK,"Fs","MN:Fs"$ is a segment register, 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 registers, more or less.
* TempleOS uses a flavor of C/C++. It is not PASCAL. I altered the syntax making parenthesis optional on function calls with no paramaters.
* TempleOS uses a dialect of C/C++ called $LK,"Holy C","FI:::/TempleOS/Doc/HolyC.TXT"$. It is not PASCAL. I altered the syntax making parenthesis optional on function calls with no paramaters.
* $LK,"Sleep","MN:Sleep"$() makes a program pause. It is not hybernation for a laptop.
* $LK,"Yield","MN:Yield"$() saves the current task's registers (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","MN:Yield"$() involves no disk activity. A swap takes half a microsecond. See $LK-A,"::/TempleOS/Demo/Lectures/Spinning.CPP"$.
* I use the term "JIT compilation". This means it is compiled and executable code placed into mem, ready to be called.
* I use the term $LK,"JIT Compile Mode","FF:::/TempleOS/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","MN:Copy"$() or rename them with $LK,"Move","MN:Move"$() to store them uncompressed.
@@ -47,3 +47,4 @@ $WW,1$$FG,5$$TX+CX,"Clearing-up Confusions"$$FG$
$FG,8$
* "Linux" is probably a trademark owned by Linus Torvalds.
$FG$
-2
View File
@@ -1,3 +1 @@
$WW,1$To create a TempleOS graphic ctrl, you define call-back functions and insert a $LK,"CCtrl","MN:CCtrl"$ structure in the $LK,"CTask","MN:CTask"$ queue. See $LK-A,"::/TempleOS/Demo/Graphics/SliderCtrl.CPP"$, $LK-A,"::/TempleOS/Demo/Graphics/ScrollBars.CPP"$ and $LK,"TermButtonNew","FF:::/TempleOS/Adam/WallPaper.CPP,TermButtonNew"$. There is a managed-code ctrl generator, if you press $FG,2$<CTRL-SHIFT-L>$FG$.
-3
View File
@@ -3,7 +3,4 @@ $WW,1$* You can adjust the mouse movement rate by setting global vars in your st
* 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","MN:CDATE_FREQ"$. See $LK,"local time","FF:HOME/Adam3aLocalize.CPP,local_time"$. See $LK,"DateTime.CPP","FI:::/TempleOS/Demo/DateTime.CPP"$ for changing date/time format maps.
* If sound doesn't work, run $LK-A,"::/TempleOS/Adam/Snd/HDCfg.CPP"$ or, comment-out $LK,"#include \"HDAudio\"","FF:HOME/Adam3cSnd.CPP,HDAudio"$ to revert to PC Speaker.
* Get rid of this msg $LK,"here","FF:HOME/DoItOnce.CPP,Customize.TXT"$.
+1 -1
View File
@@ -4,7 +4,7 @@ There are a few places where I cut corners in the interest of not junking-up cod
* 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","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 a TempleOS native, 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.
* TempleOS does not figure-out $FG,2$FAT32$FG$ short name alias numbers. $LK,"FAT32DirNew","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 $FG,2$RedSea$FG$ 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","FI:::/TempleOS/Compiler/OpCodes.TXT"$ names to remove the ambiguity between instructions with different numbers of arguments, making my $LK,"assembler","FI:::/TempleOS/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","FI:::/TempleOS/Adam/Boot/BootCD.CPP"$.
+1 -2
View File
@@ -1,4 +1,3 @@
$WW,1$TempleOS has a class for 3 dimensional points consisting of F64s. TempleOS's compiler is not C++, so 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.
$WW,1$TempleOS has a class for 3 dimensional points consisting of F64s. Holy C 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.
+2 -2
View File
@@ -2,7 +2,7 @@ $WW,1$* You can enter the debugger with $LK,"Dbg","MN:Dbg"$() or $FG,2$<CTRL-ALT
* I use $LK,"progress1","MN:progress1"$-$LK,"progress4","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 $FG,2$C+$FG$ function names with $FG,2$&$FG$ before functions as in $FG,2$&PrintF+0x10$FG$.
* While debugging, you specify addresses of assembly routines with just the label, as in $FG,2$_MALLOC+0x20$FG$. You specify $LK,"Holy C","FI:::/TempleOS/Doc/HolyC.TXT"$ function names with $FG,2$&$FG$ before functions as in $FG,2$&PrintF+0x10$FG$.
* You can use $LK,"AdamLog","MN:AdamLog"$() to send text to the Adam task window. It works like $LK,"PrintF","MN:PrintF"$(). I never use this. Instead I use $LK,"DbgI64","MN:DbgI64"$().
@@ -30,7 +30,7 @@ $LK,"Echo","MN:Echo"$() turns on or off raw data going into the lexical analyzer
$LK,"LTrace","MN:LTrace"$() shows the tokens coming out of the lexical analyzer.
$LK,"CTrace","MN:CTrace"$() unassembles code generated from the C+ compiler.
$LK,"CTrace","MN:CTrace"$() unassembles code generated from the Holy C compiler.
$LK,"PTrace","MN:PTrace"$() shows $FG,2$intermediate code$FG$ comming out of the first stage of the compiler (it's not 100% valid because it hasn't been fixed-up).
-1
View File
@@ -3,4 +3,3 @@ $WW,1$To allow different languages and customization, TempleOS uses strings to i
Each task can load it's own Define strings. If a string is not found, the parent task's table is searched.
See $LK-A,"::/TempleOS/Demo/Define.CPP"$.
+37 -62
View File
@@ -10,42 +10,38 @@ $ID,2$$LK-A,"::/TempleOS/Demo/Graphics/DotNet.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/LowPassFilter.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/MathAudioDemo.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/Lines.CPP"$
$LK-A,"::/TempleOS/Demo/GameStarters/TicTacToe.CPP"$
$LK-A,"::/TempleOS/Demo/Games/TicTacToe.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/SpritePlot.CPP"$
$LK-A,"::/TempleOS/Demo/MsgLoop.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/SpritePut.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/SpritePutExt.CPP"$
$LK-A,"::/TempleOS/Demo/Snd/ASCIIOrgan.CPP"$
$LK-A,"::/TempleOS/Demo/MsgLoop.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/Doodle.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/Speedline.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/Bounce.CPP"$
$LK-A,"::/TempleOS/Demo/KeyBitMap.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/WinZBuf.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/Golf.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/Mountain.CPP"$
$LK-A,"::/TempleOS/Demo/GameStarters/Coach.CPP"$
$LK-A,"::/TempleOS/Demo/Games/Coach.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/WallPaperFish.CPP"$
$LK-A,"::/TempleOS/Demo/Digits.CPP"$
$LK-A,"::/TempleOS/Demo/Games/Digits.CPP"$
$LK-A,"::/TempleOS/Demo/Progress.CPP"$ //has some ASM, just ignore
$LK-A,"::/TempleOS/Demo/Graphics/CPUPlot.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/Dither.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/Symmetry.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/SpritePut.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/SpritePutExt.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/Blot.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/CaptureScreen.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/EdCSprite.CPP"$
$LK-A,"::/TempleOS/Demo/PullDownMenu.CPP"$
$MA+A-X+PU,"::/TempleOS/Demo/GameStarters/Stadium","Cd(\"::/TempleOS/Demo/GameStarters/Stadium\");Dir;View;\n"$
$MA+A-X+PU,"::/TempleOS/Demo/Games/Stadium","Cd(\"::/TempleOS/Demo/Games/Stadium\");Dir;View;\n"$
$LK-A,"::/TempleOS/Demo/Graphics/Palette.CPP"$
$LK-A,"::/TempleOS/Demo/GameStarters/CircleTrace.CPP"$
$LK-A,"::/TempleOS/Demo/GameStarters/Halogen.CPP"$
$LK-A,"::/TempleOS/Demo/GameStarters/TheDead.CPP"$
$LK-A,"::/TempleOS/Demo/GameStarters/Bomber.CPP"$
$LK-A,"::/TempleOS/Demo/GameStarters/RainDrops.CPP"$
$LK-A,"::/TempleOS/Demo/Games/CircleTrace.CPP"$
$LK-A,"::/TempleOS/Demo/Games/Halogen.CPP"$
$LK-A,"::/TempleOS/Demo/Games/TheDead.CPP"$
$LK-A,"::/TempleOS/Demo/Games/RainDrops.CPP"$
$LK-A,"::/TempleOS/Demo/Snd/MorseCode.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/PixelCollision.CPP"$
$LK-A,"::/TempleOS/Demo/GameStarters/BlackDiamond.CPP"$
$LK-A,"::/TempleOS/Demo/GameStarters/SpaceShip.CPP"$
$LK-A,"::/TempleOS/Demo/GameStarters/Wenceslas.CPP"$
$LK-A,"::/TempleOS/Demo/Games/BlackDiamond.CPP"$
$LK-A,"::/TempleOS/Demo/Games/Wenceslas.CPP"$
$ID,-2$$TR,"Intermediate"$
$ID,2$$LK-A,"::/TempleOS/Demo/Graphics/Box.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/Pick.CPP"$
@@ -55,79 +51,68 @@ $LK-A,"::/TempleOS/Demo/Graphics/Extents.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/SpritePlot3D.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/Logo.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/RotateTank.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/Pic2ASCII.CPP"$
$LK-A,"::/TempleOS/Demo/ScreenCodes.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/NeatTrick.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/CharGraphics.CPP"$
$LK-A,"::/TempleOS/Demo/Maze.CPP"$
$LK-A,"::/TempleOS/Demo/Games/Maze.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/FontEd.CPP"$
$LK-A,"::/TempleOS/Demo/ExtendedChars.CPP"$
$LK-A,"::/TempleOS/Demo/TimeIns.CPP"$
$LK-A,"::/TempleOS/Demo/Snd/WaterFowl.CPP"$
$MA+A-X+PU,"::/TempleOS/Apps/MusicOrgan/Examples","Cd(\"::/TempleOS/Apps/MusicOrgan/Examples\");Dir;View;\n"$
$LK-A,"::/TempleOS/Demo/MultiCore/MPPrintF.CPP"$
$LK-A,"::/TempleOS/Demo/MultiCore/Layers3DJob.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/PredatorPrey.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/Cartesian.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/Hanoi.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/Life.CPP"$
$LK-A,"::/TempleOS/Demo/GameStarters/Zing.CPP"$
$LK-A,"::/TempleOS/Demo/GameStarters/ChessNet.CPP"$
$LK-A,"::/TempleOS/Demo/GameStarters/Chess.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/Flowers.CPP"$
$LK-A,"::/TempleOS/Demo/Games/Zing.CPP"$
$LK-A,"::/TempleOS/Demo/Games/ChessNet.CPP"$
$LK-A,"::/TempleOS/Demo/MultiCore/Palindrome.CPP"$
$LK-A,"::/TempleOS/Demo/MultiCore/MPAdd.CPP"$
$LK-A,"::/TempleOS/Demo/MultiCore/Lock.CPP"$
$LK-A,"::/TempleOS/Demo/MultiCore/LayersSpawn.CPP"$
$LK-A,"::/TempleOS/Demo/MultiCore/Clouds.CPP"$
$LK-A,"::/TempleOS/Demo/MultiCore/Noise.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/SliderCtrl.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/Bling.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/ScrollBars.CPP"$
$LK-A,"::/TempleOS/Demo/RegistryDemo.CPP"$
$LK-A,"::/TempleOS/Demo/GameStarters/BirdLand.CPP"$
$LK-A,"::/TempleOS/Demo/GameStarters/MissileDefense.CPP"$
$LK-A,"::/TempleOS/Demo/GameStarters/WarGame.CPP"$
$LK-A,"::/TempleOS/Demo/GameStarters/BigGuns.CPP"$
$LK-A,"::/TempleOS/Demo/GameStarters/Navy.CPP"$
$LK-A,"::/TempleOS/Demo/GameStarters/RawHide.CPP"$
$LK-A,"::/TempleOS/Demo/GameStarters/DunGen.CPP"$
$MA+A-X+PU,"::/TempleOS/Apps/Timeout","Cd(\"::/TempleOS/Apps/Timeout\");Dir;View;\n"$
$LK-A,"::/TempleOS/Demo/GameStarters/Collision.CPP"$
$LK-A,"::/TempleOS/Demo/Games/BugBird.CPP"$
$LK-A,"::/TempleOS/Demo/Games/BattleLines.CPP"$
$LK-A,"::/TempleOS/Demo/Games/BigGuns.CPP"$
$LK-A,"::/TempleOS/Demo/Games/FlatTops.CPP"$
$LK-A,"::/TempleOS/Demo/Games/RawHide.CPP"$
$LK-A,"::/TempleOS/Demo/Games/DunGen.CPP"$
$MA+A-X+PU,"::/TempleOS/Apps/TimeOut","Cd(\"::/TempleOS/Apps/TimeOut\");Dir;View;\n"$
$LK-A,"::/TempleOS/Demo/Games/Collision.CPP"$
$ID,-2$$TR,"Advanced"$
$ID,2$$LK-A,"::/TempleOS/Demo/MultiCore/LoadTest.CPP"$
$LK-A,"::/TempleOS/Demo/MultiCore/Primes.CPP"$
$LK-A,"::/TempleOS/Demo/MultiCore/Sort.CPP"$
$LK-A,"::/TempleOS/Demo/MultiCore/RadixSort.CPP"$
$LK-A,"::/TempleOS/Demo/MultiCore/Interrupts.CPP"$
$MA+A-X+PU,"::/TempleOS/Apps/Pilgrims","Cd(\"::/TempleOS/Apps/Pilgrims\");Dir;View;\n"$
$MA+A-X+PU,"::/TempleOS/Apps/AfterEgypt","Cd(\"::/TempleOS/Apps/AfterEgypt\");Dir;View;\n"$
$LK-A,"::/TempleOS/Demo/GameStarters/Varoom.CPP"$
$LK-A,"::/TempleOS/Demo/Games/Varoom.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/Shading.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/Transform.CPP"$
$LK-A,"::/TempleOS/Demo/Games/BulgeBomber.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/Shadow.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/Pick3D.CPP"$
$MA+A-X+PU,"::/TempleOS/Apps/Tanks","Cd(\"::/TempleOS/Apps/Tanks\");Dir;View;\n"$
$MA+A-X+PU,"::/TempleOS/Apps/ToTheFront","Cd(\"::/TempleOS/Apps/ToTheFront\");Dir;View;\n"$
$LK-A,"::/TempleOS/Demo/Graphics/SpriteText.CPP"$
$MA+A-X+PU,"::/TempleOS/Apps/GrModels","Cd(\"::/TempleOS/Apps/GrModels\");Dir;View;\n"$
$MA+A-X+PU,"::/TempleOS/Apps/KeepAway","Cd(\"::/TempleOS/Apps/KeepAway\");Dir;View;\n"$
$LK-A,"::/TempleOS/Demo/Graphics/Camp.CPP"$
$LK-A,"::/TempleOS/Demo/GameStarters/Rocket.CPP"$
$LK-A,"::/TempleOS/Demo/GameStarters/RocketScience.CPP"$
$LK-A,"::/TempleOS/Demo/GameStarters/MassSpring.CPP"$
$LK-A,"::/TempleOS/Demo/GameStarters/Whap.CPP"$
$LK-A,"::/TempleOS/Demo/GameStarters/Rocks.CPP"$
$LK-A,"::/TempleOS/Demo/GameStarters/Squirt.CPP"$
$LK-A,"::/TempleOS/Demo/Games/Rocket.CPP"$
$LK-A,"::/TempleOS/Demo/Games/RocketScience.CPP"$
$LK-A,"::/TempleOS/Demo/Games/MassSpring.CPP"$
$LK-A,"::/TempleOS/Demo/Games/Whap.CPP"$
$LK-A,"::/TempleOS/Demo/Games/Squirt.CPP"$
$MA+A-X+PU,"::/TempleOS/Apps/X-Caliber","Cd(\"::/TempleOS/Apps/X-Caliber\");Dir;View;\n"$
$LK-A,"::/TempleOS/Demo/GameStarters/ZoneOut.CPP"$
$LK-A,"::/TempleOS/Demo/GameStarters/FPS.CPP"$
$LK-A,"::/TempleOS/Demo/GameStarters/EagleDive.CPP"$
$LK-A,"::/TempleOS/Demo/Games/ZoneOut.CPP"$
$LK-A,"::/TempleOS/Demo/Games/CastleFrankenstein.CPP"$
$LK-A,"::/TempleOS/Demo/Games/EagleDive.CPP"$
$MA+A-X+PU,"::/TempleOS/Apps/Strut","Cd(\"::/TempleOS/Apps/Strut\");Dir;View;\n"$
$MA+A-X+PU,"::/TempleOS/Apps/Span","Cd(\"::/TempleOS/Apps/Span\");Dir;View;\n"$
$MA+A-X+PU,"::/TempleOS/Apps/MusicOrgan","Cd(\"::/TempleOS/Apps/MusicOrgan\");Dir;View;\n"$
$ID,-2$
$ID,-2$$TR,"Non-Game Skills"$
$ID,2$$LK-A,"::/TempleOS/Demo/MakeDistro.CPP.Z"$
$ID,2$$LK-A,"::/TempleOS/Demo/MakeDistro.CPP"$
$LK-A,"::/TempleOS/Demo/DbgDemo.CPP"$
$LK-A,"::/TempleOS/Demo/PhoneNumWords.CPP"$
$LK-A,"::/TempleOS/Demo/SuggestSpelling.CPP"$
@@ -141,7 +126,6 @@ $LK-A,"::/TempleOS/Demo/Dsk/UnusedSpaceRep.CPP"$
$LK-A,"::/TempleOS/Demo/Lectures/MiniGrLib.CPP"$
$LK-A,"::/TempleOS/Demo/Lectures/MiniCompiler.CPP"$
$LK-A,"::/TempleOS/Demo/MagicPairs.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/Circuit.CPP"$
$LK-A,"::/TempleOS/Demo/Graphics/PoleZeros.CPP"$
$LK-A,"::/TempleOS/Demo/WebLogExample/WebLogRep.CPP"$
$LK-A,"::/TempleOS/Demo/WebLogExample/WebLogScramble.CPP"$
@@ -173,7 +157,6 @@ $LK-A,"::/TempleOS/Demo/Doc/FileRead.CPP"$
$LK-A,"::/TempleOS/Demo/Doc/Data.CPP"$
$LK-A,"::/TempleOS/Demo/Doc/DefineStr.CPP"$
$LK-A,"::/TempleOS/Demo/Doc/CallBack.CPP"$
$LK-A,"::/TempleOS/Demo/Doc/CallBackAux2.CPP"$
$LK-A,"::/TempleOS/Demo/Define.CPP"$
$LK,"EdRenumAsm","MN:EdRenumAsm"$
$LK-A,"::/TempleOS/Demo/Doc/UnusedDefine.CPP"$
@@ -185,15 +168,7 @@ $LK-A,"::/TempleOS/Demo/Asm/DivByHand.CPP"$
$LK-A,"::/TempleOS/Demo/Asm/AsmAndC.CPP"$
$LK-A,"::/TempleOS/Demo/Asm/AsmAndC2.CPP"$
$LK-A,"::/TempleOS/Demo/GlblVars.CPP"$
$LK-A,"::/TempleOS/Demo/WinMgr2.CPP"$
$LK-A,"::/TempleOS/Misc/OSTestSuite.CPP"$
$MA+A-X+PU,"::/TempleOS/Adam","Cd(\"::/TempleOS/Adam\");Dir;View;\n"$
$ID,-2$$TR,"HD Audio"$
$ID,2$$LK-A,"::/TempleOS/Demo/Snd/BeatFreq.CPP"$
$LK-A,"::/TempleOS/Demo/Snd/PolyPhonic.CPP"$
$LK-A,"::/TempleOS/Demo/Snd/SndScope.CPP"$
$LK-A,"::/TempleOS/Demo/Snd/Synth.CPP"$
$LK-A,"::/TempleOS/Demo/Snd/Record.CPP"$
$LK-A,"::/TempleOS/Demo/Snd/Echo.CPP"$
$ID,-2$
$ID,-2$
+1 -1
View File
@@ -23,7 +23,7 @@ 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 C+ expressions.
$FG,2$$$$FG$ Current compiler output pos (instruction ptr). Even works in Holy C expressions.
$FG,2$$$$FG$ works in $FG,2$class$FG$es.
$FG,2$class MyFun
+2 -5
View File
@@ -1,8 +1,5 @@
$WW,1$A TempleOS document is a $LK,"Circular Queue","HI:Circular Queue"$ of cmds and graphics. See $LK,"CDocEntry","MN:CDocEntry"$ for the entry structure. See $LK,"TipOfDay","MN:TipOfDay"$() for a nice example.
$WW,1$A TempleOS document is a $LK,"Circular Queue","HI:Data Types/Circular Queue"$ of cmds and graphics. See $LK,"Dollar Cmds","FI:::/TempleOS/Doc/Dollar.TXT"$ and $LK,"ST_DOC_CMDS","MN:ST_DOC_CMDS"$. See $LK,"CDocEntry","MN:CDocEntry"$ for the entry structure. See $LK,"TipOfDay","MN:TipOfDay"$() for a nice example.
There is one document format for the editor/ viewer/ browser/ cmd line.
Each task has a $LK,"CDoc","MN:CDoc"$ queue. There is one $LK,"CDoc","MN:CDoc"$ for the border, called "auxiliary" and one for the main window. The aux is at $FG,4$Fs->next_doc$FG$ and the main at $FG,4$Fs->last_doc$FG$. When dbl buffering, there are two main's. See $LK-A,"::/TempleOS/Demo/Spy.CPP"$. It is possible to define multiple aux's. To insert a additional aux, use $LK,"DocQueInsRev","MN:DocQueInsRev"$(doc,Fs->next_doc).
See$LK-A,"::/TempleOS/Demo/Doc/CallBack.CPP"$ and $LK-A,"::/TempleOS/Demo/Doc/CallBackAux2.CPP"$.
There is one $LK,"CDoc","MN:CDoc"$ for the border, and a pair for double buffering. See $LK-A,"::/TempleOS/Demo/Spy.CPP"$.
+8 -18
View File
@@ -1,17 +1,17 @@
$WW,1$$FG,5$$TX+CX,"Dollar Sign Cmds"$$FG$
TempleOS supports rich-text type cmds which 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.
TempleOS supports rich-text type cmds which 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. The flags often determine how many and what args the cmd takes.
See $LK-A,"::/TempleOS/Doc/CtrlL.TXT"$ and $LK-A,"::/TempleOS/Demo/Doc/DemoDoc.TXT"$.
See $LK-A,"::/TempleOS/Doc/Widget.TXT"$ and $LK-A,"::/TempleOS/Demo/Doc/DemoDoc.TXT"$.
See $LK,"Doc Type Defines","MN:DOCT_TEXT"$ and $LK,"Doc Type Codes","FF:::/TempleOS/Adam/Doc/Doc.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 if they are bracketed by "$$" unless you toggle to plain text mode with <CTRL-T>.
$ID,-2$$TR,"CR Hard Carriage Return"$
$ID,-2$$TR,"CR Hard Carriage Return (New Line)"$
$ID,2$Carriage returns are normally specified without being bracketed with "$$".
$ID,-2$$TR,"SR Soft Carriage Return"$
$ID,-2$$TR,"SR Soft Carriage Return (New Line)"$
$ID,2$Word wrap uses soft carriage returns which are not saved. You never place soft carriage returns by yourself.
$ID,-2$$TR,"TB Tab"$
$ID,2$Tabs are normally not bracketed with "$$", but are stored as ASCII#9.
@@ -30,22 +30,12 @@ $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
$FG,5$F2$FG$ Alt Foreground Color (Paren & Brace coloring)
$FG,5$FL$FG$ Foreground of Links
$FG,5$FM$FG$ Foreground of Macros/Menu-Values
$FG,5$FA$FG$ Foreground of Anchors
$FG,5$FH$FG$ Foreground of Hidden widgets
$FG,5$FE$FG$ Foreground of Trees
$FG,5$FU$FG$ Foreground of User Text
$FG,5$FB$FG$ Foreground of Binary Tags
$FG,5$FY$FG$ Foreground of Keywords
$FG,5$FR$FG$ Foreground of Keywords2
$FG,5$FC$FG$ Foreground of Comments
$FG,5$FQ$FG$ Foreground of Quotes
$ID,-2$$TR,"FU,BU User Prompts"$
$ID,2$special color changing cmds. They are used when the user is prompted for text at the cmd line. They rst the cursor pos if the cursor is posed before them on the line. They are also used to indicate the start of a prompted str.
$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","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"$
@@ -121,7 +111,7 @@ $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","MN:DOCEf1_AUX_STR"$ and $LK,"Doc Flag Codes","FF:::/TempleOS/Adam/Doc/Doc.CPP,ST_DOC_FLAGS"$
$FE,4$See $LK+S,"dft_flags","FF:::/TempleOS/Adam/Doc/DocPlain.CPP,doc_dft_flags1"$.
See $LK+S,"dft_flags","FF:::/TempleOS/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.
@@ -151,7 +141,7 @@ $ID,-2$$TR,"+AL Alias"$
$ID,2$An alias flag on a tree entry ($FG,4$+TR$FG$) will cause the text of the current entry the cursor is on to be copied to this entry. This creates something similar to a drop-down window, but it doesn't work well yet.
$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$$FE,5$
$ID,-2$$ID,-2$
$FG,5$EXAMPLES:
+2 -2
View File
@@ -12,9 +12,9 @@ $WW,1$$FG,5$$TX+CX,"TempleOS' Features"$$FG$
* Keyboard & mouse support.
* Hard drives, support for $FG,2$FAT32$FG$ and TempleOS native file systems with file compression.
* Hard drives, support for $FG,2$FAT32$FG$ and $FG,2$RedSea$FG$ file systems with file compression.
* $LK,"Partitionming","MN:PrtDsk"$ tool.
* $LK,"Partitioning","MN:PrtDsk"$ tool.
* $FG,2$Boot loaders$FG$ for CD-ROM and hard disk.
+2 -2
View File
@@ -56,5 +56,5 @@ $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","MN:Mount"$.
$LK,"Making Your Own Distro","FI:::/TempleOS/Demo/MakeDistro.CPP.Z"$
$ID,-2$
$LK,"Making Your Own Distro","FI:::/TempleOS/Demo/MakeDistro.CPP"$
$ID,-2$
+51 -30
View File
@@ -95,12 +95,14 @@ $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$$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
@@ -124,21 +126,21 @@ $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","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","MN:OPTf_GLBLS_ON_DATA_HEAP"$ is used. When programs call $LK,"MAlloc","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","MN:Spawn"$() or $LK,"PopUp","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 that when one task is $LK,"Kill","MN:Kill"$()ed the helper tasks disappear, too. You can get a report on current system tasks with $LK+S,"TaskRep","MN:TaskRep"$(). There is just one possible window per task, so child tasks are needed.
$ID,2$Often a task will $LK,"Spawn","MN:Spawn"$() or $LK,"PopUp","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","MN:Kill"$()ed the helper tasks disappear, too. You can get a report on current system tasks with $LK+S,"TaskRep","MN:TaskRep"$(). There is just one possible window per task, so child tasks are needed.
$ID,-2$$TR,"C+"$
$ID,2$The language used by TempleOS is more than $FG,2$C$FG$ and less than $FG,2$C++$FG$, so it's just $FG,2$C+$FG$, perhaps. See $LK,"Differences","FI:::/TempleOS/Doc/Differences.TXT"$. It has the default arg feature 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 a slightly different operator precedence. See $LK,"OP_precedence","FA:::/TempleOS/Doc/Differences.TXT,OP_precedence"$ It has the $FG,2$PASCAL$FG$-like feature of function calls with no parens, but requires an "$FG,2$&$FG,2$$FG$" when referring to function addresses.
$ID,-2$$TR,"Holy C"$
$ID,2$The language used by TempleOS is more than $FG,2$C$FG$ and less than $FG,2$C++$FG$. See $LK,"Holy C","FI:::/TempleOS/Doc/HolyC.TXT"$. It has the default arg feature 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 a slightly different operator precedence. See $LK,"OP_precedence","FA:::/TempleOS/Doc/HolyC.TXT,OP_precedence"$ It has the $FG,2$PASCAL$FG$-like feature of 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$I coined this term to refer to conventional AOT compilation mode, but it is not the preferred mode for this operating system and is discouraged. $FG,2$.SP?$FG$ files are compiled to $FG,2$.BI?$FG$ files, skipping $FG,2$.OBJ$FG$ files. After compiling, you do a $LK,"Load","MN:Load"$() cmd which is available from right-clicking on a link (like from $LK,"Dir","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","MN:Cmp"$() routine or right-click on a link. The $FG,2$Kernel$FG$ modules and compiler are made in $FG,2$AOT$FG$ compiled mode and stored in $FG,2$Kernel.BIN.C$FG$ and $FG,2$Compiler.BIN.Z$FG$, respectively.
$ID,2$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","MN:Load"$() cmd which is available by right-clicking on a link (like from $LK,"Dir","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","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-A,"::/TempleOS/Demo/GameStarters/EagleDive.CPP"$ for an example of an $FG,2$AOT$FG$ module.
See $LK-A,"::/TempleOS/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","MN:ExeFile"$() routine is the same as $FG,2$#include$FG$ but can be placed in programs. $LK,"ExePutS","MN:ExePutS"$() 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,"PTrace","MN:PTrace"$() or $LK,"OTrace","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","MN:CTrace"$() routine, or afterward with $LK,"U","MN:U"$().
$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,"PTrace","MN:PTrace"$() or $LK,"OTrace","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","MN:CTrace"$() routine, or afterward with $LK,"U","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$'.
@@ -147,6 +149,9 @@ $ID,2$There is no distinction between "partition" or "drive." They are specifie
For commands taking a drive letter as an argument, $FG,2$0$FG$ is the current drive.
$ID,-2$$TR,"RedSea File System"$
$ID,2$This is a simple, 64-bit, file system which is, basically, FAT32 with nice fixed-size directory entries and no FAT table, just an allocation bitmap. Files cannot grow in size. Directory entries have compressed and uncompressed size and file check-sums.
$ID,-2$$LK,"AutoFile","HI:AutoFile"$
$LK,"Sprite","HI:Graphics/CSprite"$
$LK,"Hash Table","HI:Hash"$
@@ -168,11 +173,11 @@ $FG,5$*.???.C$FG$
$FG,5$*.TXT.Z;*.TXT;*.LOG.Z;*.LOG$FG$
Text Files
$FG,5$*.CPP.Z;*.CPP$FG$
C+ src files. The default C+ compiler type is "$FG,2$.CPP.Z$FG$".
Holy C src files. The default Holy C compiler type is "$FG,2$.CPP.Z$FG$".
$FG,5$*.PRJ.Z;*.PRJ$FG$
C+ src files to be compiled $FG,2$AOT$FG$.
Holy C src files to be compiled $FG,2$AOT$FG$.
$FG,5$*.HPP.Z;*.HPP$FG$
C+ src header files.
Holy C src header files.
$FG,5$*.MAP.Z;*.MAP$FG$
Compiler "map" files
$FG,5$*.BIN.Z;*.BIN.C;*.BIN$FG$
@@ -182,7 +187,7 @@ $FG,5$*.DAT.Z;*.DAT$FG$
$FG,5$*.ISO$FG$
CD-ROM image file--ISO9660.
$FG,5$*.AUT.Z;*.AUT$FG$
"AutoFile" Basically a C+ program who's stdout goes to the input of a task when $LK,"AutoFile","MN:AutoFile"$() is called.
"AutoFile" Basically a Holy C program who's stdout goes to the input of a task when $LK,"AutoFile","MN:AutoFile"$() is called.
$FG,5$*.GRA.Z;*.GRA$FG$
Graphics file
@@ -198,35 +203,51 @@ $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 $FG,2$C+$FG$ callible should have a leading underscore.
Asm routines which are $LK,"Holy C","FI:::/TempleOS/Doc/HolyC.TXT"$ callible should have a leading underscore.
$FG,5$MixedCaps$FG$
$FG,2$C+$FG$ Functions and class names are MixedCaps.
$LK,"Holy C","FI:::/TempleOS/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 register. This register points to the current task's $LK,"CTask","MN:CTask"$.
$ID,-2$$TR,"Gs"$
$ID,2$The CPU GS segment register. This register points to the $LK,"CCPU","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","MN:MAlloc"$(). They must $LK,"Free","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$
$AN,"Fs","Fs"$ The CPU FS segment register. This register points to the current task's $LK,"CTask","MN:CTask"$.
$AN,"Gs","Gs"$ The CPU GS segment register. This register points to the $LK,"CCPU","MN:CCPU"$.
$AN,"Bt,Bts,Btr,Btc,LBts,LBtr,LBtc","Bt,LBts,LBtr,LBtc"$
These are bit manipulation functions named after Intel instructions. They stand for "Bit Test", "Bit Test and Set", "Bit Test and Rst" and "Bit Test and Compliment". An $FG,2$'L'$FG$ means locked.
$AN,"Cli,Sti","Cli,Sti"$ Turn on or off interrupts. They are named after the x86 instructions. "Cli" turns off interrupts.
$AN,"Heap","Heap"$ Programs can dynamically request chunks of memory allocated from a "heap" using $LK,"MAlloc","MN:MAlloc"$(). They must $LK,"Free","MN:Free"$() it when finished. Ptrs are used to refer to it. The "heap" is dynamically allocated mem.
$AN,"Root","root"$ The base of a binary tree or the head of a queue. (I don't like the word "head.")
$AN,"Join","Join"$ When two parts of a program have a common low-level routine, that routine is often labeled SomethingJoin.
$AN,"user_data","user_data"$ 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.
$AN,"BSP/AP","BSP/AP"$ Boot-strap Processor/Application Processor
Binary file not shown.
-1
View File
@@ -21,4 +21,3 @@ menuentry "TempleOS I" {
set root=(hd1,msdos5)
chainloader +1
}
+55 -19
View File
@@ -1,16 +1,34 @@
$WW,1$$FG,5$$TX+CX,"ACCT FILES"$$FG$
$WW,1$$FG,5$$TX+CX,"DIRECTORY STRUCTURE"$$FG$
You can add and remove accts by making or removing directories in the $FG,2$::/TempleOS/Accts$FG$ directory. An empty account directory should be valid because it will get default files from the parent directory.
$FG,2$/TempleOS/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.
See $LK-A,"HOME/PersonalMenu.TXT"$ for a personal menu which can be viewed at the cmd line with the $FG,2$<CTRL-M>$FG$ key or by clicking "$FG,2$MENU$FG$" in the upper left border area of a window.
$FG,2$/TempleOS/Apps$FG$ Applications are placed in subdirectories of $FG,2$/TempleOS/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.
See $LK-A,"HOME/PersonalNotes.TXT"$ for a personal note file which can be viewed with the $FG,2$<CTRL-SHIFT-M>$FG$ key.
$FG,2$/TempleOS/Demo$FG$ Here you can find lots of sample code to do various things.
See $LK-A,"HOME/DoItOnce.CPP"$ for a file which is invoked at the start-up of the first user.
$FG,2$/TempleOS/Doc$FG$ Here you can find documentation.
See $LK-A,"HOME/Adam3.CPP"$ for the user files that get loaded into the adam task at start-up. These are only loaded once.
$FG,2$/TempleOS/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,"MakeOSInstallPrtBootLoader","MN:MakeOSInstallPrtBootLoader"$(). It is loaded by the boot loader and must fit in 640K.
$LK-A,"HOME/Registry.CPP"$ can be edited by hand or deleted to rst to defaults. Takes affect next boot.
$FG,2$/TempleOS/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,"MakeOSInstallPrtBootLoader","MN:MakeOSInstallPrtBootLoader"$().
$FG,2$/TempleOS/Adam$FG$ The non-kernel part of the operating system is found here. It is JIT 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$::/TempleOS/Accts$FG$ directory. An empty account directory should be valid because it will get default files from the parent directory. Compile the $LK,"Kernel","MN:MakeOSInstallPrtBootLoader"$ to set the active acct or cause it to prompt an account at boot.
$LK-A,"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-A,"HOME/PersonalNotes.TXT"$ a personal note file viewed with the $FG,2$<CTRL-SHIFT-M>$FG$ key.
$LK-A,"HOME/DoItOnce.CPP"$ a file invoked at the start-up of the first user. Customize this!
$LK-A,"HOME/Adam3.CPP"$ files invoked when the adam task starts-up. Customize these!
$LK-A,"HOME/Registry.CPP"$ can be edited by hand or deleted to reset to defaults. Takes affect next boot.
@@ -28,37 +46,55 @@ $FG,5$$TX+CX,"APPLICATION POLICIES"$$FG$
$FG,5$$TX+CX,"OS PROGRAMMING GUIDELINES:"$$FG$
$FG,5$$TX+CX,"PROGRAMMING GUIDELINES"$$FG$
* Virtual mem is not used (It is identity mapped in EM64T mode). The stk does not grow, so allocate enough when the task (process) is $LK,"Spawn","MN:Spawn"$ed and use the heap for most things. (The "heap" refers to $LK,"MAlloc","MN:MAlloc"$() and $LK,"Free","MN:Free"$().)
* 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","MN:Spawn"$ed and use the heap for most things. (The "heap" refers to $LK,"MAlloc","MN:MAlloc"$() and $LK,"Free","MN:Free"$().)
* See $LK,"Naming convention","FF:::/TempleOS/Doc/Glossary.TXT,Naming convention"$.
* See $LK,"Naming Convention","FF:::/TempleOS/Doc/Glossary.TXT,Naming Convention"$ and $LK,"Abbreviations","FF:::/TempleOS/Doc/Glossary.TXT,Abbreviations"$.
* There are two modes of compiling $LK,"AOT Compiled Mode","FF:::/TempleOS/Doc/Glossary.TXT,AOT Compiled Mode"$ and $LK,"JIT Mode","FF:::/TempleOS/Doc/Glossary.TXT,JIT"$. Actual compilation is done in both -- nothing is "interpreted".
* There are two modes of compiling $LK,"AOT Compile Mode","FF:::/TempleOS/Doc/Glossary.TXT,AOT Compile Mode"$ and $LK,"JIT Compile Mode","FF:::/TempleOS/Doc/Glossary.TXT,JIT Compile Mode"$. Actual compilation is done in both -- nothing is "interpreted".
* $LK,"Differences from C/C++","FI:::/TempleOS/Doc/Differences.TXT"$
* $LK,"Holy C","FI:::/TempleOS/Doc/HolyC.TXT"$
* $LK,"System Programming Guidelines","FI:::/TempleOS/Doc/SysPgmGuide.TXT"$
* I often use 64-bit values when smaller would be more appropriate because the compiler generally is more efficient with 64-bit values. (All value get promoted to 64-bit by the TempleOS compiler, when fetched.)
$FG,5$$TX+CX,"Hash sym tables:"$$FG$
* I use signed ints unless absolutely necessary. I would like to move toward a language with one type of integer more like $FG,2$BASIC$FG$ or something. I think one type of integer is more friendly to new programmers, but I have no plans to actually switch to one type of int.
* Short circuit logic is assumed.
* I generally 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 int -- nothing forces it to 1 or 0. There is a $LK,"ToBool","MN:ToBool"$() function that will, however.
* If you use floats in your interrupt routine, save and restore the fpu state with $LK,"Fxsave","MN:Fxsave"$() and $LK,"Fxrstor","MN:Fxrstor"$(). The timer interrupt does this. The keyboard and mouse don't use floats.
* Bracketing code with $FG,2$$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","MN:SysDbg"$() and $LK,"IsSysDbg","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 would be weird for ptr arithmetic. The size of "$FG,2$U0$FG$" is zero.
$FG,5$$TX+CX,"HASH SYM TABLES"$$FG$
* See $LK-A,"::/TempleOS/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 C/C++ syms loaded in on start-up.
* $FG,2$adam_task->hash_table$FG$ holds the Holy C syms loaded in on start-up.
* $FG,2$Fs->hash_table$FG$ holds user C+ 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 unless you have done $LK,"OptOn","MN:OptOn"$($LK,"OPTf_REPLACE_SYMS","MN:OPTf_REPLACE_SYMS"$). 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","MN:PopUp"$() a task to run the application and kill it when it's done.
* $FG,2$Fs->hash_table$FG$ holds user Holy C 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 unless you have done $LK,"OptOn","MN:OptOn"$($LK,"OPTf_REPLACE_SYMS","MN:OPTf_REPLACE_SYMS"$). 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","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,"HashRep","MN:HashRep"$() routine or the varients. $LK,"HashDepthRep","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,5$$TX+CX,"ASSEMBLY LANGUAGE CONCERNS"$$FG$
* $FG,2$FS$FG$ must always point to the $LK,"CTask","MN:CTask"$.
* $FG,2$GS$FG$ must always point to the $LK,"CCPU","MN:CCPU"$.
* Don't change the segment registers unless interrupts are off.
* Don't change the segment registers unless interrupts are off. It's hard to do, anyway. $LK,"SET_FS_BASE","MN:SET_FS_BASE"$ and $LK,"_SET_GS_BASE","MN:_SET_GS_BASE"$.
* When interacting with compiled code, preserve $FG,2$RBP, RSI, RDI, R10-R15$FG$ because the compiler uses these for register vars. You are free to clobber $FG,2$RAX, RBX, RCX, RDX$FG$, $FG,2$R8$FG$ and $FG,2$R9$FG$.
* When interacting with compiled code, preserve $FG,2$RBP, RSI, RDI, R10-R15$FG$ because the compiler uses these for register 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","MN:CREG_VARS_MASK"$.
* I recommend using the standard stk frame for functions because $LK,"Caller","MN:Caller"$() is used to display the call stk, such as for the wallpaper.
$FG,2$ ENTER nnnn
+1 -2
View File
@@ -1,4 +1,3 @@
$WW,1$There are sym(hash) tables maintained by each task. When a sym is not found, the parent task's sym table is checked. All process chain back to the $FG,2$Adam$FG$ task.
$WW,1$There 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","MN:HTT_EXPORT_SYS_SYM"$.
Binary file not shown.
-1
View File
@@ -3,4 +3,3 @@ The help index preprocessor compiler directive sets the topics for syms subseque
$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.
@@ -1,4 +1,4 @@
$WW,1$$FG,5$$TX+CX,"TempleOS C+"$$FG$
$WW,1$$FG,5$$TX+CX,"Holy C"$$FG$
* See $LK,"Scoping and Linkages","FI:::/TempleOS/Doc/ImportExports.TXT"$ for details on $FG,2$extern$FG$, $FG,2$import$FG$, $FG,2$_extern$FG$, $FG,2$_import$FG$, etc.
@@ -84,9 +84,11 @@ $FG$$ID,-2$
* Type casting is postfix. To typecast int or F64, use $LK,"ToI64","MN:ToI64"$(), $LK,"ToBool","MN:ToBool"$() or $LK,"ToF64","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$.
* The "$FG,2$`$FG$" operator raises a base to a power.
* A single quote can encompass multiple characters. $FG,2$'ABC'$FG$ is equal to $FG,2$0x434241$FG$.
* There is no question-colon operator.
* $AN,"","OP_precedence"$TempleOS $LK,"operator precedence","FA:::/TempleOS/Compiler/CmpInit.CPP,OP_precedence"$
$FG,2$`$FG$,$FG,2$>>$FG$,$FG,2$<<$FG$
@@ -100,7 +102,6 @@ $FG$$ID,-2$
$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$,$FG,2$+=$FG$,$FG,2$-=$FG$
* You can use $LK,"OptOn","MN:OptOn"$($LK,"OPTf_WARN_PAREN","MN:OPTf_WARN_PAREN"$) to find unnecessary parentheses in code.
@@ -117,7 +118,7 @@ $FG$$ID,-2$
* Can't use $FG,2$<>$FG$ with $FG,2$#include$FG$, use $FG,2$""$FG$.
* "$FG,2$$$$FG$" is an escape character. Two dollar signs signify an ordinary $$. See $LK-A,"::/TempleOS/Doc/Dollar.TXT"$. In $FG,2$asm$FG$ or $FG,2$C+$FG$ code, it also refers to the instruction's addr.
* "$FG,2$$$$FG$" is an escape character. Two dollar signs signify an ordinary $$. See $LK-A,"::/TempleOS/Doc/Dollar.TXT"$. In $FG,2$asm$FG$ or $LK,"Holy C","FI:::/TempleOS/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","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-A,"::/TempleOS/Demo/SubIntAccess.CPP"$.
@@ -223,4 +224,4 @@ $ID,-2$
* $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$
$ID,-2$
+33 -34
View File
@@ -1,8 +1,8 @@
$FG,5$$TX+CX,"Details of Scoping and Linkages"$$FG$
$WW,1$
$LK,"Just-In-Time Compilation","FF:::/TempleOS/Doc/Glossary.TXT,JIT"$ 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,"JIT Compile Mode","FF:::/TempleOS/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 Compilation","FF:::/TempleOS/Doc/Glossary.TXT,AOT Compiled"$ creates a new, empty, sym table which you must populate by $FG,2$#include$FG$ing $LK-A,"::/TempleOS/Kernel/AOTAdam.HPP"$ or whatever to import syms.
$LK,"AOT Compile Mode","FF:::/TempleOS/Doc/Glossary.TXT,AOT Compile Mode"$ creates a new, empty, sym table which you must populate by $FG,2$#include$FG$ing $LK-A,"::/TempleOS/Kernel/AOTAdam.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, unless you use the compiler option $LK,"OPTf_REPLACE_SYMS","MN:OPTf_REPLACE_SYMS"$. 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.
@@ -16,7 +16,7 @@ $FG,2$_extern$FG$ binds a new $LK,"HTT_FUN","MN:HTT_FUN"$ or $LK,"HTT_GLBL_VAR",
$FG,2$_import$FG$ binds a new $LK,"HTT_FUN","MN:HTT_FUN"$ or $LK,"HTT_GLBL_VAR","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","MN:Load"$() time. If no sym exists to bind to at $LK,"Load","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$S$FG$taticModule/$FG,2$J$FG$ustInTime
$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$
@@ -27,32 +27,32 @@ $WW,0$$FG,2$S$FG$taticModule/$FG,2$J$FG$ustInTime
| | | | | | || $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
S G A C label:: S MG N
S G A C label: MG N
S G A C @@label: AL N
S G A IMPORT C label; MR N
S F A C label:: S BG N
S F A C label: BG N
S F A C @@label: AL N
S F A IMPORT C label; BR N
S x x #define MR D
S G C C function S MR D
S F C R var FR N
S F C S var FR N
S F C static C var FR D N
S F C goto C label: FG N
S G C C var S MR D D
S G C D var MR N D
S G C class MR D
S G C class member MR P
S G C extern class MR D
S G C extern C function MR W
S G C import C function MR D
S G C import C var MR D
S G C _extern C function MR D
S G C _extern C var MR D
S G C _import C function MR D
S G C _import C var MR D
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
@@ -75,8 +75,8 @@ 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
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.
@@ -84,7 +84,7 @@ $WW,1$
* Use $FG,2$reg$FG$ or $FG,2$noreg$FG$ in front of local var names to override automatic register var allocation. You can, optionally, specify a reg after the "$FG,2$reg$FG$" keyword.
* Local nonregister function vars can be accessed in asm blks with $FG,2$&i[RBP]$FG$ for example.
* Local non-register 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]
@@ -95,7 +95,7 @@ $WW,1$
* All offspring tasks of a task inherit syms.
* The $FG,2$sizeof()$FG$ and C+ structure members can be used in asm blks.
* The $FG,2$sizeof()$FG$ and Holy C structure members can be used in asm blks.
* No register vars are used in functions with a try/catch. They will be force to $FG,2$noreg$FG$.
@@ -106,4 +106,3 @@ $WW,1$
* 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","MN:OPTf_GLBLS_ON_DATA_HEAP"$$FG$. They may in the future.
* $LK,"OPTf_EXTERNS_TO_IMPORTS","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.
$WW,0$
+1 -1
View File
@@ -2,6 +2,6 @@ $WW,1$"Input Ptr" is the mouse at this point.
$LK,"ipx","MN:ipx"$ and $LK,"ipy","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","MN:ipz"$ is the wheel.
$LK,"iptx","MN:iptx"$ and $LK,"ipty","MN:ipty"$ are the text column and row of the input ptr. See $LK-A,"::/TempleOS/Demo/Maze.CPP"$.
$LK,"iptx","MN:iptx"$ and $LK,"ipty","MN:ipty"$ are the text column and row of the input ptr. See $LK-A,"::/TempleOS/Demo/Games/Maze.CPP"$.
You can make the input ptr snap to a grid by adjusting $FG,4$Fs->snap$FG$.
+2 -1
View File
@@ -24,7 +24,7 @@ $BK,1$WARNING:$BK,0$ This command erases everything on a hard drive. It repart
$BK,1$WARNING:$BK,0$ This command doesn't play well with other operating systems. You'll need to do a $LK,"MasterBootZero","MN:MasterBootZero"$() to restore your drive to a state where other operating systems can partition it.
$ID,-2$
$ID,-2$2) $LK,"Fmt","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 TempleOS native file system type. Use the drive letter of the partition in place of $FG,2$'D'$FG$.
$ID,2$This command formats a partition with $FG,2$FAT32$FG$ or the $FG,2$RedSea$FG$ 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$.
@@ -46,3 +46,4 @@ $ID,-2$
$FG,8$
* "Windows" is a trademark of MicroSoft Corp.
* "Linux" is probably a trademark owned by Linus Torvalds.
$FG$
-1
View File
@@ -1,4 +1,3 @@
$WW,1$The compiler's lexical analyzer can be used in your programs to simplify parsing. See $LK,"Doc Parsing","FF:::/TempleOS/Adam/Doc/DocPlain.CPP,LexNew"$ or $LK,"Parse Opcode File","FF:::/TempleOS/Compiler/CmpInit.CPP,Opcodes.TXT"$.
See $LK,"Tokens","MN:TK_IDENT"$.
Binary file not shown.
-1
View File
@@ -24,4 +24,3 @@ $FG$
The first arg is the msg code and it is optional with the default being $LK,"MSG_KEY_DOWN_UP","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","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","MN:MSG_KEY_DOWN"$.
See $LK-A,"::/TempleOS/Demo/PullDownMenu.CPP"$.
+1 -1
View File
@@ -6,7 +6,7 @@ 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,"MPJob","MN:MPJob"$() and get the result with $LK,"MPJobResult","MN:MPJobResult"$(). You spawn a task on another core with $LK,"MPSpawn","MN:MPSpawn"$().
You give a job to a seth task with $LK,"JobQue","MN:JobQue"$() and get the result with $LK,"GetResult","MN:GetResult"$(). You spawn a task on another core with $LK,"Spawn","MN:Spawn"$().
Note: you must use the $FG,2$LOCK$FG$ asm prefix when changing shared structures in a multicore environment. The $LK,"LBts","MN:LBts"$(), $LK,"LBtr","MN:LBtr"$() and $LK,"LBtc","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-A,"::/TempleOS/Demo/MultiCore/Lock.CPP"$.
+1 -1
View File
@@ -19,4 +19,4 @@ You can turn-on and off interrupts, in your user programs. This is part of the
I saw no reason to make the hard drive or CD-ROM drive 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 sure is simpler, though... smaller... simpler to maintain... and understandable by a layman! The disk code does not break-up requests, if you are curious why one task must wait until another finishes an operation.
See $LK-A,"::/TempleOS/Demo/Lectures/Spinning.CPP"$.
See $LK-A,"::/TempleOS/Demo/Lectures/Spinning.CPP"$.
+4 -5
View File
@@ -17,8 +17,6 @@ $WW,1$$FG,5$This is to clearify how several mysterious things happen in TempleOS
* The boot-loaders must be patched by you running $LK,"MakeOSInstallPrtBootLoader","MN:MakeOSInstallPrtBootLoader"$() or $LK,"InstallMasterBootLoader","MN:InstallMasterBootLoader"$(). Those will write the block address into the boot-loader because the boot-loaders do not navigate file systems to find the $LK,"Stage2","FI:::/TempleOS/Kernel/KStart.CPP"$ if you relocate it.
* The $FG,2$/0000Boot$FG$ directory and the $FG,2$0000Kernel.BIN.C$FG$ file are named so that they are first in alphabetical order and, therefore, at a predictable block address. The $LK,"CD/DVD Boot Loader","FI:::/TempleOS/Adam/Boot/BootCD.CPP"$ will find $FG,2$0000Kernel.BIN.C$FG$ at $LK,"Block #0x16","MN:CDBootFileCreate"$. The TempleOS boot loader can be used with $FG,4$$TX+HTML,"http://www.magiciso.com","http://www.magiciso.com"$$FG$ if you place $FG,2$0000Kernel.BIN.C$FG$ in the right spot.
* 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+HTML,"PCI BIOS","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","FI:::/TempleOS/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.
@@ -31,7 +29,7 @@ $WW,1$$FG,5$This is to clearify how several mysterious things happen in TempleOS
* 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,"MakeOSInstallPrtBootLoader","MN:MakeOSInstallPrtBootLoader"$(). TempleOS is $TX+D,"139,633","DD_TEMPLEOS_LOC"$ lines. Roughly 50,000 is compiled AOT and 50,000 during boot JIT. The rest is JIT demos and applications.
* There are no OBJ or EXE files. There are only two files compiled ahead-of-time -- $FG,2$Kernel.BIN.C$FG$ and $FG,2$Compiler.BIN.Z$FG$. You can delete them and recompile with $LK,"MakeOSInstallPrtBootLoader","MN:MakeOSInstallPrtBootLoader"$(). TempleOS is $TX+D,"142,999","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.
@@ -45,7 +43,7 @@ $WW,1$$FG,5$This is to clearify how several mysterious things happen in TempleOS
* When compilation takes place, the structures used by the compiler stick around. Data on classes can be accessed by code. See $LK,"ClassRep","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. You can view uncompressed size with $LK,"Dir","MN:Dir"$("*",TRUE); if you use the native TempleOS filesystem. See $LK-A,"::/TempleOS/Doc/TSZ.TXT"$ for uncompressing from $FG,2$WINDOWS$FG$.
* Filenames ending in "$FG,2$.Z$FG$" are automatically compressed and uncompressed when writing to disk. File size in directory listing is the compressed size. You can view uncompressed size with $LK,"Dir","MN:Dir"$("*",TRUE); if you use the $FG,2$RedSea$FG$ TempleOS filesystem. See $LK-A,"::/TempleOS/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","HI:Memory"$. $MA+A-X+PU,"Click Here","MemRep;View;"$ for a $LK,"MemRep","MN:MemRep"$.
@@ -59,9 +57,10 @@ $WW,1$$FG,5$This is to clearify how several mysterious things happen in TempleOS
* 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 a native TempleOS file system type. The native TempleOS 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.
* TempleOS supports $FG,2$FAT32$FG$ and $FG,2$RedSea$FG$ file systems. The $FG,2$RedSea$FG$ 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","FI:::/TempleOS/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$
-1
View File
@@ -1,2 +1 @@
$WW,1$If you require separate global vars for multiple instances of a routine, you can use $FG,4$NamedFrame$FG$s. See $LK,"CSpriteMesh","MN:CSpriteMesh"$(), $LK-A,"::/TempleOS/Demo/Graphics/Pick3D.CPP"$ or $LK,"Noise","MN:Noise"$().
-2
View File
@@ -3,5 +3,3 @@ $FG,5$$WW,1$$TX+CX,"Adding a New File System"$$FG$
If you want to add a support for a new file system, do a text search on "PT_FAT32". All the places where that occurs will require new entries for your file system type. $MA+A-X+PU,"Click here for search.","Grep(\"PT_FAT32\",\"/TempleOS/\" FILENAME_MASK_SRC);View;"$
You will also need to add an entry $LK,"here.","FF:::/TempleOS/Kernel/Define1a.CPP,ST_PRT_TYPES"$
+1 -2
View File
@@ -3,5 +3,4 @@ $WW,1$TempleOS has an advanced algorithm for integrating ordinary differential e
See $LK,"CMathODE","MN:CMathODE"$ and $LK,"ODEsUpdate","MN:ODEsUpdate"$ for an overview.
See $LK,"ODECallDerivative","MN:ODECallDerivative"$ to see what support there is for masses and springs.
See $LK-A,"::/TempleOS/Demo/GameStarters/Whap.CPP"$, $LK-A,"::/TempleOS/Demo/GameStarters/Rocket.CPP"$, $LK-A,"::/TempleOS/Demo/GameStarters/MassSpring.CPP"$, $LK-A,"::/TempleOS/Apps/Span/SpanMain.CPP"$ or $LK-A,"::/TempleOS/Apps/X-Caliber/X-Caliber.CPP"$ for a masses and springs examples, or $LK-A,"::/TempleOS/Demo/WinMgr2.CPP"$, or $LK-A,"::/TempleOS/Demo/GameStarters/Rocks.CPP"$.
See $LK-A,"::/TempleOS/Demo/Games/Whap.CPP"$, $LK-A,"::/TempleOS/Demo/Games/Rocket.CPP"$, $LK-A,"::/TempleOS/Demo/Games/MassSpring.CPP"$, $LK-A,"::/TempleOS/Apps/Span/SpanMain.CPP"$ or $LK-A,"::/TempleOS/Apps/X-Caliber/X-Caliber.CPP"$.
-2
View File
@@ -17,5 +17,3 @@ $LK,"OPTf_WARN_DUP_TYPES","MN:OPTf_WARN_DUP_TYPES"$ warning if dup local var typ
$LK,"OPTf_NO_REG_VAR","MN:OPTf_NO_REG_VAR"$ forces all function local vars to the stk not registers. Applied to functions.
$LK,"OPTf_NO_BUILTIN_CONST","MN:OPTf_NO_BUILTIN_CONST"$ Disable 10-byte float consts for ã, log2_10, log10_2, loge_2. Applied to functions.
-1
View File
@@ -7,4 +7,3 @@ When done collecting statistics, use $LK,"ProfRep","MN:ProfRep"$() for a report.
You can set the CPU to monitor with $LK,"ProfCPUSet","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.
-3
View File
@@ -1,6 +1,3 @@
$WW,1$A $FG,2$Queue$FG$ is a bunch of $LK,"MAlloc","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.
+1 -1
View File
@@ -12,7 +12,7 @@ $WW,1$* You run a risk of problems if you do file operations on the same files s
* Accessing CD-ROM's is flacky. Try $LK,"Drv","MN:Drv"$() or $LK,"ChgDsk","MN:ChgDsk"$() twice.
* You can only $FG,2$extern$FG$ something once. There is a varient called $FG,2$_extern$FG$ which binds a C+ definition to a asm sym. This, too, can only be done once.
* You can only $FG,2$extern$FG$ something once. There is a varient called $FG,2$_extern$FG$ which binds a Holy C definition to a asm sym. This, too, can only be done once.
* You must call $LK,"TaskInitExt","MN:TaskInitExt"$() in a task you $LK,"Spawn","MN:Spawn"$() before you can do file I/O. And, preemption is off by default, so use $LK,"Preempt","MN:Preempt"$(ON) if you wish.
+2 -4
View File
@@ -12,7 +12,7 @@ $FG,5$Supported Hardware$FG$
* Minimum 256 Meg RAM; Maximum $TX+D,"128 Gig","DD_MAPPED_MEM_SPACE_GIG"$ RAM (easily increased).
* HD Audio or internal PC Speakers.
* Internal PC Speakers.
* CD/DVD-ROMs (not SCSI). ISO9660 file system.
@@ -21,12 +21,10 @@ $FG,5$Supported Hardware$FG$
$FG,5$Unsupported Hardware$FG$
* No graphics acceleration.
* No sound cards besides HD Audio.
* 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.
$FG,8$
+5
View File
@@ -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,"Holy C","FI:::/TempleOS/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.
-6
View File
@@ -1,6 +0,0 @@
$WW,1$Uncomment $LK,"#include \"HDAudio\"","FF:HOME/Adam3cSnd.CPP,#include \"HDAudio\""$ in your $FG,2$/HOME/Adam3cSnd.CPP.Z$FG$ file to install a driver for HD Audio. Cfgure it with $LK-A,"::/TempleOS/Adam/Snd/HDCfg.CPP"$ and add the file created, $FG,4$HOME/HDAudioCfg.CPP.Z$FG$, to your start-up scripts. $BK,1$Comment it out everything if you get no snd -- the PC Speaker should still work.$BK,0$
If you don't have HDAudio, you'll have to live with the PC Speaker. You might write a driver for your snd card following the HDAudio template.
See $LK-A,"::/TempleOS/Demo/Snd/PolyPhonic.CPP"$, $LK,"SndFileFillBuf","MN:SndFileFillBuf"$() and $LK,"HDFillBuf","MN:HDFillBuf"$() for using HD Audio. The buffers are managed by $LK,"HDAudioTask","MN:HDAudioTask"$().
+1 -2
View File
@@ -1,5 +1,5 @@
TempleOS V1.00
$TX+CX+D,"TempleOS VDD_TEMPLEOS_VERSION","DD_OS_NAME_VERSION"$
@@ -28,4 +28,3 @@
Operating System
$LK,"Trivial Solutions","FI:::/TempleOS/Doc/TrivialSolutions.TXT"$
+1 -2
View File
@@ -1,8 +1,7 @@
$WW,1$A $FG,4$CSprite$FG$, is an ordered list of the $LK,"following","MN:GRST_END"$ elements, created with $FG,2$<CTRL-R>$FG$$FG$. Normally, they are packed together in a list and the addr of the first is passed to routines.
$WW,1$A $FG,4$CSprite$FG$, is an ordered list of $LK,"these","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-A,"::/TempleOS/Demo/Graphics/SpritePlot.CPP"$, $LK-A,"::/TempleOS/Demo/Graphics/SpritePlot3D.CPP"$ and $LK-A,"::/TempleOS/Demo/Graphics/SpritePut.CPP"$ and $LK,"CSpriteMesh","MN:CSpriteMesh"$().
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,"::/TempleOS/Adam/Gr/GrSpritePlot.CPP","FL:::/TempleOS/Adam/Gr/GrSpritePlot.CPP,1"$ for how CSprite are stored.$FG$
+3
View File
@@ -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.
+9
View File
@@ -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.
+7
View File
@@ -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","MN:CSprite"$.
Sadly, you cannot change the length of variable-length element types.
+9
View File
@@ -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.
+7
View File
@@ -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.
-2
View File
@@ -27,5 +27,3 @@ $ID,-2$
Remember to terminate cmds with a semicolon.
$LK,"Help Index","FI:::/TempleOS/Doc/HelpIndex.TXT"$ $LK,"Quick Start--Command Line","HI:Cmd Line (Typically)"$
-2
View File
@@ -44,5 +44,3 @@ The $FG,2$$TX+HTML,"trivial solution","http://en.wikipedia.org/wiki/Trivial_solu
* 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","FI:::/TempleOS/Doc/CutCorners.TXT"$ in the interest of keeping the code beautiful.
$FG,8$
-31
View File
@@ -1,31 +0,0 @@
$WW,1$$FG,5$$TX+CX,"System Programming Guide-Lines"$$FG$
* See $LK,"Naming convention","FF:::/TempleOS/Doc/Glossary.TXT,Naming convention"$.
* See $LK,"Abbreviations","FF:::/TempleOS/Doc/Glossary.TXT,Abbreviations"$.
* I avoid the '$FG,2$?$FG$' operator. It's not very efficient with my compiler since it executes both expressions and I just don't like it.
* I place "New", "Del", "Init", "Rst", ect. on the end of a function name instead of beginning. "$FG,4$RstMusicSettings$FG$" should be "$FG,4$MusicSettingsRst$FG$".
* I often use 64-bit values in function args when smaller would be more appropriate because the compiler generally is more efficient with 64-bit values. (All value get promoted to 64-bit by the TempleOS compiler, when fetched.)
* Short circuit logic is assumed.
* I generally avoid boolean expression assignments because $FG,2$TRUE$FG$ is dangerous with different compilers, though, the TempleOS compiler should use $FG,2$1$FG$ for TRUE values, not just nonzero. 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 int -- nothing forces it to 1 or 0. There is a $LK,"ToBool","MN:ToBool"$() function.
* If you use floats in your interrupt routine, save and restore the fpu state with $LK,"Fxsave","MN:Fxsave"$() and $LK,"Fxrstor","MN:Fxrstor"$(). The timer interrupt does this. The keyboard and mouse don't use floats.
* Bracketing code with $FG,2$$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 put an '$FG,2$_$FG$' on the front of the name of pass-by-ref fun args.
* I put an '$FG,2$_$FG$' on the front of C callable ASM routines.
* $LK,"SysDbg","MN:SysDbg"$() and $LK,"IsSysDbg","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 would be weird for ptr arithmetic.
* "$FG,2$result$FG$" is reserved for local variable that holds function return val.
* I use $FG,2$I64$FG$ instead of $FG,2$U64$FG$ unless necessary.
+4 -8
View File
@@ -3,23 +3,19 @@ $WW,1$$FG,5$$TX+CX,"Linux TSZ Utility"$$FG$
$FG,2$TSZ [-ascii] filename$FG$
Will uncompress a single file from 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.)
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$ is a Windows cmd line program which will assist transferring files from TempleOS to Windows. It will also uncompress TempleOS files you have gotten to Windows. There are three ways to get files from TempleOS to Windows -- via CD-ROM, a $FG,2$FAT32$FG$ partition or via a "file partition" you have created with $FG,2$TSZ$FG$ on a Windows partition.
$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 -expand [-ascii] dirname$FG$:
$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","MN:Move"$() or $LK,"Copy","MN:Copy"$() them to a name not ending in "$FG,2$.Z$FG$" and they will be stored uncompressed.
allocated by Windows and located by TempleOS, and if you don't mess with them, you can use them to transfer files between TempleOS and Windows. This is a little risky. It's pretty safe if you create this file on a partition dedicated for this purpose.
$BK,1$WARNING:$BK,0$ Do not run a defrag operation on a partition holding a file partition. If you store files to it after such an operation, you'll ruin data on your hard drive.
$FG,8$
* "Windows" is a trademark of MicroSoft Corp.
* "Linux" is probably a trademark owned by Linus Torvalds.
$FG$
-2
View File
@@ -1,3 +1 @@
$WW,1$Intel/AMD have an instruction that returns the num of CPU cycles since boot. This is not calibrated to an accurate real time value and, the CPU speed is throttled! TempleOS measures it and you can convert with $LK,"time_stamp_freq","MN:time_stamp_freq"$, a value continuously calibrated from other timers. This is the fastest timer available.
-2
View File
@@ -1,5 +1,3 @@
$WW,1$TempleOS uses a 64-bit value, $LK,"CDate","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","MN:CDate"$'s to get a time span.
Use $LK,"CDATE_FREQ","MN:CDATE_FREQ"$ to convert.
-2
View File
@@ -5,5 +5,3 @@ $LK,"SysTimerRead","MN:SysTimerRead"$ reads the timer ticks since boot. It's no
Use $LK,"JIFFY_FREQ","MN:JIFFY_FREQ"$ to convert $LK,"sys_jiffies","MN:sys_jiffies"$.
Use $LK,"SYS_TIMER_FREQ","MN:SYS_TIMER_FREQ"$ to convert $LK,"SysTimerRead","MN:SysTimerRead"$.
+4 -6
View File
@@ -23,13 +23,9 @@ $FG,5$M(\"D:/TempleOS/*\",\"E:/TempleOS/*\",\"+r+d\");$FG$ to check my changes.
* You can set your local time zone by setting the $LK,"local_time_offset","MN:local_time_offset"$ global var in a start-up file. It's units are $LK,"CDATE_FREQ","MN:CDATE_FREQ"$. See $LK,"local time","FF:HOME/Adam3aLocalize.CPP,local_time"$.
* Use $LK,"DocCurAttr","MN:DocCurAttr"$() in $LK,"UserStartUp","MN:UserStartUp"$() to set terminal window colors.
* See $MA+A-X+PU,"Key Map","KeyMap;View;\n"$ for a list of defined keys. Define your own keys in $LK,"MyPutKey","MN:MyPutKey"$(). See $LK-A,"::/TempleOS/Doc/KeyBoard.TXT"$.
* $FG,2$<CTRL-SHIFT-L>$FG$ in the editor to autoindent a $FG,2$C+$FG$ function or renumber an asm routine's local labels. If it does not have $FG,2$#exe$FG$ config stuff, select "recompile." Otherwise, don't recompile$FG$ and it will use the compiler info collected when it was most recently compiled. $BK,1$$FG,2$<CTRL-SHIFT-L>$FG$ can be used to test if a file will compile.$BK,0$
* While developing applications, keeping everything in one source file allows you to use the $FG,2$<CTRL-SHIFT-L>$FG$ compile check/autoindent feature. Alternatively, you can $FG,2$#include$FG$ the files in a project a file depends on before entering the editor and $FG,2$<CTRL-SHIFT-L>$FG$ it.
* $FG,2$<CTRL-SHIFT-L>$FG$ in the editor to reindent a $LK,"Holy C","FI:::/TempleOS/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$.
@@ -130,7 +126,7 @@ $FG,5$M(\"D:/TempleOS/*\",\"E:/TempleOS/*\",\"+r+d\");$FG$ to check my changes.
* You can delete the $FG,4$HOME/Registry.CPP.Z$FG$ file. The policy is that deleting it will restore defaults. It should plain text, if you want to edit it. Be careful of tree indentations.
* Study $LK-A,"::/TempleOS/Adam/MemRep.CPP"$ and $LK,"WallPaper","MN:WallPaper"$() to learn how the system resources are put together.
* Study $LK-A,"::/TempleOS/Adam/Utils/MemRep.CPP"$ and $LK,"WallPaper","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.
@@ -146,4 +142,6 @@ $FG,5$M(\"D:/TempleOS/*\",\"E:/TempleOS/*\",\"+r+d\");$FG$ to check my changes.
* Use $LK,"Fix","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","MN:DocOpt"$() to optimize links. (Mostly just removes .Z)
+1 -2
View File
@@ -10,5 +10,4 @@ The 4th dimension allows a neat trick where you can place pos shifts (translatio
Finally, $LK,"CDC","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","MN:CDC"$'s $FG,2$transform()$FG$ member. The default $FG,2$transfrom()$FG$ callback is $LK,"GrTransform","MN:GrTransform"$(). See $LK-A,"::/TempleOS/Demo/GameStarters/EagleDive.CPP"$ or $LK-A,"::/TempleOS/Demo/GameStarters/FPS.CPP"$ to see how to change the $FG,2$transfrom()$FG$ callback for foreshortening.
The transformation is implemented as a callback on the $LK,"CDC","MN:CDC"$'s $FG,2$transform()$FG$ member. The default $FG,2$transfrom()$FG$ callback is $LK,"GrTransform","MN:GrTransform"$(). See $LK-A,"::/TempleOS/Demo/Games/EagleDive.CPP"$ or $LK-A,"::/TempleOS/Demo/Games/CastleFrankenstein.CPP"$ to see how to change the $FG,2$transfrom()$FG$ callback for foreshortening.
+1 -1
View File
@@ -1,7 +1,7 @@
$WW,1$$FG,5$$TX+CX,"Trivial Solutions"$$FG$
The $FG,2$$TX+HTML,"trivial solution","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 another example. TempleOS uses many $LK,"trivial solutions","FI:::/TempleOS/Doc/Strategy.TXT"$.
The $FG,2$$TX+HTML,"trivial solution","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","FI:::/TempleOS/Doc/Strategy.TXT"$.
See $LK-A,"::/TempleOS/Doc/Acknowledgements.TXT"$.
-1
View File
@@ -5,4 +5,3 @@ To upgrade, you generally boot the new TempleOS CD/DVD, install on top of your p
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 delete the $FG,2$/TempleOS$FG$ directory.
See the $LK,"Installing","FI:::/TempleOS/Doc/Install.TXT"$ documentation.
+11 -10
View File
@@ -1,19 +1,20 @@
$WW,1$$FG,5$$TX+CX,"Welcome to TempleOS"$$FG$
$LK,"Trivial Solutions","FI:::/TempleOS/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$* Professional hobby projects
* Teenager projects
* Non-professional, older-person projects
$ID,-2$
Simplicity is a goal to $LK,"keep the line count down","FI:::/TempleOS/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+D,"139,633","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 Constitition","FI:::/TempleOS/Doc/Charter.TXT"$.
$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","FI:::/TempleOS/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+D,"129,156","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","FI:::/TempleOS/Doc/Charter.TXT"$.
Two things to know about TempleOS are that $UL,1$tasks$UL,0$ have $LK,"MAlloc","MN:MAlloc"$/$LK,"Free","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 $FG,2$C+$FG$ (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","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 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+HTML,"x86_64","http://en.wikipedia.org/wiki/Amd64#AMD64"$$FG$ and nothing is "interpreted".
In other operating systems, I hated learning one language for command line scripts and another for programming. With $FG,2$TempleOS$FG$, the command line feeds right into the $LK,"Holy C","FI:::/TempleOS/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","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+HTML,"x86_64","http://en.wikipedia.org/wiki/Amd64#AMD64"$$FG$ and nothing is "interpreted".
Statements at the global scope (outside the scope of $FG,2$C+$FG$ functions) execute immediately. There is no $FG,2$main()$FG$ function. Instead, you give meaningful names to what would be $FG,2$main()$FG$ functions and you invoke them by calling them with a statement in the global scope, usually at the bottom of your file.
Statements at the global scope (outside the scope of $LK,"Holy C","FI:::/TempleOS/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:
@@ -29,13 +30,13 @@ $FG$I didn't like that, so I made parentheses optional on calls with no args and
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 syntax, I decided to change everything I didn't like. Here are the new $LK,"operator precedence","FA:::/TempleOS/Doc/Differences.TXT,OP_precedence"$ rules. See $LK,"Departures from C/C++","FI:::/TempleOS/Doc/Differences.TXT"$. It's Biblical! See $LK,"Luke,5:37","BF:Luke,5:37"$.
Once I was no longer using standard C/C++ syntax, I decided to change everything I didn't like and call it $LK,"Holy C","FI:::/TempleOS/Doc/HolyC.TXT"$. Here are the new $LK,"operator precedence","FA:::/TempleOS/Doc/HolyC.TXT,OP_precedence"$ rules. It's Biblical! See $LK,"Luke,5:37","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","FL:::/TempleOS/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","FI:::/TempleOS/Doc/MultiTasking.TXT"$.
The TempleOS native file system is simple, so I don't get sued. There is an allocation bitmap for clusters and all files are stored contiguously. You can't grow files.
The TempleOS $FG,2$RedSea$FG$ file system is simple, so I don't get sued. There is an 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, checksums and compression are possible. Filenames ending in "$FG,2$.Z$FG$" are automatically compressed or uncompressed when stored or fetched. TempleOS supports direct block random access into files, however -- $LK,"FRBlks","MN:FRBlks"$() and $LK,"FWBlks","MN:FWBlks"$().
@@ -1,6 +1,8 @@
$WW,1$See $LK-A,"::/TempleOS/Doc/Dollar.TXT"$ for details on dollar sign cmds.
$WW,1$$FG,5$$TX+CX,"Text-Widget Help"$$FG$
$FG,2$"Expression"$FG$ a num or C+ algebraic term with operators and C+ syms can be entered.
See $LK-A,"::/TempleOS/Doc/Dollar.TXT"$ for details on dollar sign cmds.
$FG,2$"Expression"$FG$ a num or Holy C algebraic term with operators and Holy C 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","FF:::/TempleOS/Doc/Glossary.TXT,AutoFile"$. You can't have both an autostr and macro text defined.
-1
View File
@@ -5,4 +5,3 @@ It provides auto-complete typing and jump-to-code or jump-to-dictionary_definiti
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","MN:CLex"$ ptrs; $FG,2$doc$FG$ for $LK,"CDoc","MN:CDoc"$ ptrs; $FG,2$doc_e$FG$ or $FG,2$doc_ce$FG$ for $LK,"CDocEntry","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-A,"::/TempleOS/Adam/WordStat/WSDictGen.CPP"$.