TempleOSCDV4.05.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:47:13 +02:00
1 parent d1856315e0
commit 6fe38d2d9d
118 files changed
+4559 -5069

No files matched your search

+3 -3
View File
@@ -1,12 +1,12 @@
$WW,1$$FG,5$$TX+CX,"Assembler"$$FG$
See $LK,"::/Compiler/OpCodes.TXT"$ for opcodes. They're not standard. Some invalid instructions are not flagged and some valid instructions are not implemented. 16-bit asm support is limited.
See $LK,"::/Compiler/OpCodes.TXT"$ for opcodes. They're not standard. Some invalid insts are not flagged and some valid insts are not implemented. 16-bit asm support is limited.
Here are example instruction formats:
Here are example inst formats:
$HL,1$ ADD RAX,I64 FS:DISP[RSI+RDI*8]
$HL,0$$HL,1$ ADD RAX,I64 [DISP]
$HL,0$
$FG,2$$$$FG$ Current compiler output pos (instruction ptr). Even works in HolyC expressions.
$FG,2$$$$FG$ Current compiler output pos (inst ptr). Even works in HolyC expressions.
$FG,2$$$$FG$ works in $FG,2$class$FG$es.
$FG,2$class MyFun
+34 -1
View File
@@ -2,6 +2,39 @@ $WW,1$$FG,5$$TX+CX,"Change Log"$$FG$
Use $LK,"R",A="MN:R"$() to rename if I change a label.
$IV,1$----03/29/16 17:59:14----$IV,0$
$IV,1$----03/29/16 05:53:45----$IV,0$
* $BK,1$TempleOS version 4.05 Released$BK,0$
$IV,1$----03/24/16 16:26:50----$IV,0$
* Added $LK,"::/Demo/Games/CharDemo.CPP"$.
$IV,1$----03/22/16 16:58:25----$IV,0$
* Added $LK,"DOCEF_DFT_RAW_TYPE",A="MN:DOCEF_DFT_RAW_TYPE"$. Modified $LK,"DocForm",A="MN:DocForm"$() to look-up raw type automatically from the compiler's class information.
* Added $LK,"DOCEF_DFT_LEN",A="MN:DOCEF_DFT_LEN"$. Modified $LK,"DocForm",A="MN:DocForm"$() to look-up string length automatically from the compiler's class information.
$IV,1$----03/21/16 07:28:35----$IV,0$
* Added $LK,"OCF_ALIAS",A="MN:OCF_ALIAS"$.
* $LK,"R",A="MN:R"$("Integer","Int");
* Added aliases to $LK,"::/Compiler/OpCodes.TXT"$.
$IV,1$----03/21/16 02:12:08----$IV,0$
* Added $LK,"DOCT_MARKER",A="MN:DOCT_MARKER"$.
* Added $LK,"CICType",A="MN:CICType"$.
* Optimized $LK,"MDG_MASK",A="MN:MDG_MASK"$ and $LK,"RTG_MASK",A="MN:RTG_MASK"$ values.
$IV,1$----03/19/16 09:15:11----$IV,0$
* Fixed bug in $LK,"EdFindReplace",A="MN:EdFindReplace"$().
$IV,1$----03/19/16 06:22:36----$IV,0$
* Fixed $LK,"UAsm",A="MN:Ui"$() bug.
* Got rids of $FG,4$ICF_A1_FIRST$FG$.
* Cleaned-up compiler $LK,"REGG_CLOBBERED",A="MN:REGG_CLOBBERED"$ and $LK,"REGG_STK_TEMP",A="MN:REGG_STK_TEMP"$.
$IV,1$----03/18/16 09:53:33----$IV,0$
* Made $LK,"SpriteEd",A="MN:SpriteEd"$() select foreground elem.
$IV,1$----03/14/16 05:57:27----$IV,0$
* $BK,1$TempleOS version 4.04 Released$BK,0$
* Changed $FG,2$nobound_switch$FG$ so it uses [].
@@ -123,7 +156,7 @@ $IV,1$----01/06/16 11:01:57----$IV,0$
$IV,1$----01/03/16 17:15:41----$IV,0$
* Updated $LK,"::/Misc/PCIDevices.TXT"$.
* Added null case option. Next higher integer with "$FG,2$case:$FG$" in $FG,2$switch$FG$ stmts. See $LK,"::/Demo/NullCase.CPP"$.
* Added null case option. Next higher int with "$FG,2$case:$FG$" in $FG,2$switch$FG$ stmts. See $LK,"::/Demo/NullCase.CPP"$.
$IV,1$----12/31/15 00:44:44----$IV,0$
* Made $LK,"ASM_KEYWORD",A="FF:::/Compiler/OpCodes.TXT,ASM_KEYWORD"$s usable in HolyC outside asm{} blocks.
+1 -1
View File
@@ -6,7 +6,7 @@ There are a few places where I cut corners in the interest of not junking-up cod
* TempleOS does not figure-out $FG,2$FAT32$FG$ short name alias numbers. $LK,"FAT32DirNew",A="MN:FAT32DirNew"$(). It can cause hard drive corruption, so I might have to do it. It would really take a lot of junky code for this hatefully, detestable, legacy issue. "Please don't make me ruin my beautiful shiny-new TempleOS with that!" I am also not enthused about $FG,2$FAT32$FG$ because it is in patent limbo. $FG,2$FAT32$FG$ might get removed from TempleOS. There is the $LK,"RedSea",A="FI:::/Doc/RedSea.TXT"$ 64-bit file system that works perfectly well. $FG,2$FAT32$FG$ is useful, however, because it assists in transferring between dual booted operating systems.
* I changed the $LK,"asm opcodes",A="FI:::/Compiler/OpCodes.TXT"$ names to remove the ambiguity between instructions with different numbers of arguments, making my $LK,"assembler",A="FI:::/Compiler/Asm.CPP"$ simpler and I did minimal 16-bit asm support, since 64-bit is what you should be using, unless you're doing a $LK,"boot loader",A="FI:::/Adam/Opt/Boot/BootDVD.CPP"$.
* I changed the $LK,"asm opcodes",A="FI:::/Compiler/OpCodes.TXT"$ names to remove the ambiguity between insts with different numbers of arguments, making my $LK,"assembler",A="FI:::/Compiler/Asm.CPP"$ simpler and I did minimal 16-bit asm support, since 64-bit is what you should be using, unless you're doing a $LK,"boot loader",A="FI:::/Adam/Opt/Boot/BootDVD.CPP"$.
* There are no user-controlled file-sharing locks. However, the drive and file system have locks and concurrent operations should be fine.
+1 -1
View File
@@ -1 +1 @@
$WW,1$Dates are 32-bit signed integers representing the number of days since the birth of Christ. Negative values represent B.C.E. dates.
$WW,1$Dates are 32-bit signed ints representing the number of days since the birth of Christ. Negative values represent B.C.E. dates.
+1 -1
View File
@@ -6,7 +6,7 @@ $WW,1$$FG,5$$TX+CX,"Debugging Overview"$$FG$
* While debugging, you specify addresses of assembly routines with just the label, as in $FG,2$_MALLOC+0x20$FG$. You specify $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ function names with $FG,2$&$FG$ before functions as in $FG,2$&Print+0x10$FG$.
* I use $LK,"progress1",A="MN:progress1"$-$LK,"progress4",A="MN:progress4"$ for debugging because they show on the wallpaper. They're just global integer vars.
* I use $LK,"progress1",A="MN:progress1"$-$LK,"progress4",A="MN:progress4"$ for debugging because they show on the wallpaper. They're just global int vars.
* You can use $LK,"AdamLog",A="MN:AdamLog"$() to send text to the Adam task window. It works like $LK,"Print",A="MN:Print"$(). I never use that. Instead, I use $LK,"RawPrint",A="MN:RawPrint"$().
+6 -6
View File
@@ -6,9 +6,9 @@ $HC,"<object width=\"640\" height=\"520\"><param name=\"movie\" value=\"http://w
* Windows, Linux and VMware (because of mounted drives) must support $LK,"RedSea",A="FI:::/Doc/RedSea.TXT"$ file system so I can get rid of 2,000 lines of redundant, blemished code -- FAT32 and ISO9660. God's temple must be perfect. Redundant code for multiple file systems is imperfect. For this operating system, we want low line count. More than one file system type is actually bad, just as more than one driver for the same type of device is bad.
$LK,"::/Kernel/BlkDev/FileSysRedSea.CPP"$
$LK,"::/Kernel/BlkDev/FileSysFAT.CPP"$ :965 lines for FAT32 gets eliminated.
$LK,"::/Kernel/BlkDev/FileSysISO.CPP"$ :284 lines for ISO9660 gets eliminated.
$LK,"::/Adam/Opt/Boot/DskISOFile.CPP"$ :536 lines for making ISO files gets reduced.
$LK,"::/Kernel/BlkDev/FileSysFAT.CPP"$ :973 lines for FAT32 gets eliminated.
$LK,"::/Kernel/BlkDev/FileSysISO.CPP"$ :293 lines for ISO9660 gets eliminated.
$LK,"::/Adam/Opt/Boot/DskISOFile.CPP"$ :535 lines for making ISO files gets reduced.
$LK,"::/Kernel/BlkDev/DskCluster.CPP"$ :152 All the cluster operations become blk.
* Microsoft must cancel SecureBoot because it makes dual booting impossible. TempleOS is an additional operating system that must be used along-side Windows or Linux, not as a replacement. It must dual boot because it has no networking. Real hardware as opposed to VMware is like the difference between looking in a telescope eye piece vs just looking at an off-line image. God said the C64/Apple II generation owned ancestral lands. VMware is like being taken off of our land and moved onto a reservation. In this case, however, it will not stand.
@@ -17,19 +17,19 @@ $LK,"::/Kernel/BlkDev/DskCluster.CPP"$ :152 All the cluster operations become bl
* VMware has a bug stretching 640x480 16 color to full screen.
* VMware has a bug starting-up multicore, sometimes. $LK,"APIC MP Start",A="FF:::/Kernel/MultiProc.CPP,IPI"$
* VMware has a bug starting-up multicore, sometimes. $LK,"APIC MP Start",A="FF:::/Kernel/MultiProc.CPP,IPI"$ Fixed?
* VMware PC speaker's distortion is a good idea, but it is too much for hymns.
* VMware and others must list TempleOS as an official 64-bit operating system.
* Until super simple block devices are available, hard disk should be placed at IDE primary master 1F0/3F6 and CD/DVD/Blu-ray should be placed at the IDE secondary master 170/376.
$LK,"/Kernel/BlkDev/DskATAId.CPP",A="FI:::/Kernel/BlkDev/DskATAId.CPP"$ :280 lines to figure-out I/O ports is gone.
$LK,"/Kernel/BlkDev/DskATAId.CPP",A="FI:::/Kernel/BlkDev/DskATAId.CPP"$ :285 lines to figure-out I/O ports is gone.
$LK,"/Kernel/PCIBIOS.CPP",A="FI:::/Kernel/PCIBIOS.CPP"$ :290 could be eliminated, but maybe we will keep it so people can play with PCI devices.
* Until super simple serial ports are available, PS/2 emulated keyboard and mouse must work. The BIOS must enable these.
* The x86 IN/OUT port instructions, normally have a delay. Perhaps, VMware & Intel can enable faster x86 IN/OUT instruction timing for ATA/ATAPI PIO, so bandwidth isn't bad when doing port I/O. See $LK,"ATAGetResult",A="MN:ATAGetResult"$(). Perhaps, x86 CPU chips need a new TempleOS mode for fast IN/OUT instructions?
* The x86 IN/OUT port instructions, normally have a delay. Perhaps, VMware & Intel can enable faster x86 IN/OUT instruction timing for ATA/ATAPI PIO, so bandwidth isn't bad when doing port I/O. See $LK,"ATAGetResult",A="MN:ATAGetResult"$(). We don't want to do DMA. Perhaps, x86 CPU chips need a new TempleOS mode for fast IN/OUT instructions?
* Perhaps, a new interrupt descriptor table entry type or a new x86 CPU mode can be made that cause fast software interrupts, doing exactly what the CALL REL32 does, but with IDT as indirection. We don't need to change privilege levels or stacks.
+2 -1
View File
@@ -59,8 +59,9 @@ $LK,"::/Demo/Graphics/RotateTank.CPP"$
$LK,"::/Demo/Games/Wenceslas.CPP"$
$LK,"::/Demo/ScreenCodes.CPP"$
$LK,"::/Demo/Graphics/PanText.CPP"$
$LK,"::/Demo/Graphics/CharGraphics.CPP"$
$LK,"::/Demo/Graphics/CharAnimation.CPP"$
$LK,"::/Demo/Games/Maze.CPP"$
$LK,"::/Demo/Games/CharDemo.CPP"$
$LK,"::/Demo/Graphics/FontEd.CPP"$
$LK,"::/Demo/ExtendedChars.CPP"$
$LK,"::/Demo/TimeIns.CPP"$
+22 -10
View File
@@ -123,21 +123,29 @@ Examples: <CTRL-t> to see
$ID,-2$$TR,"BT Button"$
$ID,2$See $LK,"::/Demo/DolDoc/MenuButton.CPP"$.
$ID,-2$$TR,"DA Data"$
$ID,2$Used for forms that prompt for data. Use $FG,2$<CTRL-l>$FG$ as a text widgets editor to help you generate the text you need in your "$FG,2$fmtstr$FG$" cmd in a $FG,2$class$FG$. If you add it directly with $LK,"DocPrint",A="MN:DocPrint"$(), you'll need to fill-in the data addr. See $LK,"DocForm",A="MN:DocForm"$() and $LK,"::/Demo/DolDoc/Form.CPP"$.
$ID,2$Used for forms that prompt for data or just displaying a value. Use $FG,2$<CTRL-l>$FG$ to help you generate the DolDoc command text you need in your $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ $FG,2$class$FG$ member's $FG,2$fmtstr$FG$ meta-data for $LK,"DocForm",A="MN:DocForm"$(). See $LK,"::/Demo/DolDoc/Form.CPP"$, $LK,"::/Demo/Dsk/DataBase.CPP"$, and $LK,"::/Adam/DolDoc/DocWidgetWiz.CPP"$.
The default data-type for the $FG,2$$$DA...$$$FG$ command is $FG,2$I64$FG$. You can change it to $FG,2$I8$FG$, $FG,2$U8$FG$, $FG,2$I16$FG$, $FG,2$U16$FG$, $FG,2$I32$FG$, $FG,2$U32$FG$, $FG,2$I64$FG$, $FG,2$U64$FG$, or $FG,2$F64$FG$. See $LK,"DocDataFmt",A="MN:DocDataFmt"$() and $LK,"DocDataScan",A="MN:DocDataScan"$().
If you are not using $LK,"DocForm",A="MN:DocForm"$(), make a $FG,2$$$DA...$$$FG$ statement with $LK,"DocPrint",A="MN:DocPrint"$() and fill-in the $FG,2$->data$FG$ addr. See $LK,"task_title",A="FF:::/Adam/DolDoc/DocEd.CPP,&Fs->task_title"$.
The $LK,"CDocEntry",A="MN:CDocEntry"$.aux_str arg $FG,2$A=""$FG$ is used for the format string.
The default raw data type for the $FG,2$$$DA...$$$FG$ command is $FG,2$RT=I64$FG$. $LK,"DocForm",A="MN:DocForm"$() will automatically reset the raw type to the value from the $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ $FG,2$class$FG$ member's definition if you leave it set to the default. Or, if not using $LK,"DocForm",A="MN:DocForm"$(), specify a raw data type of $FG,2$I8$FG$, $FG,2$U8$FG$, $FG,2$I16$FG$, $FG,2$U16$FG$, $FG,2$I32$FG$, $FG,2$U32$FG$, $FG,2$I64$FG$, $FG,2$U64$FG$, or $FG,2$F64$FG$. See $LK,"DocDataFmt",A="MN:DocDataFmt"$() and $LK,"DocDataScan",A="MN:DocDataScan"$().
If there is a ':', the space after the first ':' in the format string marks the first valid cursor pos. See $LK,"Data Tag Width",A="FA:::/Adam/DolDoc/DocPlain.CPP,DataTagWidth"$.
The $LK,"CDocEntry",A="MN:CDocEntry"$.aux_str arg $FG,2$A=""$FG$ is used for the print/scan format string.
The default field length is $FG,2$LEN=64$FG$ characters. For U8 arrays[], $LK,"DocForm",A="MN:DocForm"$() will automatically reset the field length to the string length from the $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ $FG,2$class$FG$ member's definition. The length measures starting after the ':' in the $FG,2$A=""$FG$ format string.
The space after the first ':' in the format string marks the first valid cursor pos. See $LK,"Data Tag Width",A="FA:::/Adam/DolDoc/DocPlain.CPP,DataTagWidth"$.
$ID,-2$$TR,"CB Check Box"$
$ID,2$Used for forms. Use $FG,2$<CTRL-l>$FG$ as a text widgets editor to help you generate the text you need in your "$FG,2$fmtstr$FG$" cmd in a $FG,2$class$FG$. If you add it directly with $LK,"DocPrint",A="MN:DocPrint"$(), you'll need to fill-in the data addr. See $LK,"DocForm",A="MN:DocForm"$(), $LK,"CEdFindText",A="MN:CEdFindText"$ and $LK,"::/Demo/DolDoc/Form.CPP"$.
$ID,2$Used for forms. Use $FG,2$<CTRL-l>$FG$ to help you generate the DolDoc command text you need in your $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ $FG,2$class$FG$ member's $FG,2$fmtstr$FG$ meta-data for $LK,"DocForm",A="MN:DocForm"$(). See $LK,"::/Demo/DolDoc/Form.CPP"$$FG$ and $LK,"CEdFindText",A="MN:CEdFindText"$.
The default data-type for the $FG,2$$$CB...$$$FG$ command is $FG,2$I8$FG$ which is $FG,2$Bool$FG$. You can change it to $FG,2$I8$FG$, $FG,2$U8$FG$, $FG,2$I16$FG$, $FG,2$U16$FG$, $FG,2$I32$FG$, $FG,2$U32$FG$, $FG,2$I64$FG$, or $FG,2$U64$FG$. See $LK,"DocDataFmt",A="MN:DocDataFmt"$() and $LK,"DocDataScan",A="MN:DocDataScan"$().
If you are not using $LK,"DocForm",A="MN:DocForm"$(), make a $FG,2$$$CB...$$$FG$ statement with $LK,"DocPrint",A="MN:DocPrint"$() and fill-in the $FG,2$->data$FG$ addr. See $LK,"task_title",A="FF:::/Adam/DolDoc/DocEd.CPP,&Fs->task_title"$.
The default raw data type for the $FG,2$$$CB...$$$FG$ command is $FG,2$RT=I8$FG$ which is $FG,2$Bool$FG$$FG$. $LK,"DocForm",A="MN:DocForm"$() will automatically reset the raw type to the value from the $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ $FG,2$class$FG$ member's definition if you leave it set to the default. Or, if not using $LK,"DocForm",A="MN:DocForm"$(), specify a raw data type of $FG,2$I8$FG$, $FG,2$U8$FG$, $FG,2$I16$FG$, $FG,2$U16$FG$, $FG,2$I32$FG$, $FG,2$U32$FG$, $FG,2$I64$FG$, $FG,2$U64$FG$, or $FG,2$F64$FG$. See $LK,"DocDataFmt",A="MN:DocDataFmt"$() and $LK,"DocDataScan",A="MN:DocDataScan"$().
$ID,-2$$TR,"LS List Widget"$
$ID,2$Used for forms that prompt for data. You must specify a define list, $FG,2$D=""$FG$. Use $FG,2$<CTRL-l>$FG$ as a text widgets editor to help you generate the text you need in your "$FG,2$fmtstr$FG$" cmd in a $FG,2$class$FG$. If you add it directly with $LK,"DocPrint",A="MN:DocPrint"$(), you'll need to fill-in the data addr. See $LK,"DocForm",A="MN:DocForm"$() and $LK,"::/Demo/DolDoc/Form.CPP"$.
$ID,2$Used for forms that prompt for data. You must specify a define list, $FG,2$D=""$FG$. Use $FG,2$<CTRL-l>$FG$ to help you generate the DolDoc command text you need in your $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ $FG,2$class$FG$ member's $FG,2$fmtstr$FG$ meta-data for $LK,"DocForm",A="MN:DocForm"$(). See $LK,"::/Demo/DolDoc/Form.CPP"$.
The default data-type for the $FG,2$$$LS...$$$FG$ command is $FG,2$I64$FG$. You can change it to $FG,2$I8$FG$, $FG,2$U8$FG$, $FG,2$I16$FG$, $FG,2$U16$FG$, $FG,2$I32$FG$, $FG,2$U32$FG$, $FG,2$I64$FG$, or $FG,2$U64$FG$. See $LK,"DocDataFmt",A="MN:DocDataFmt"$() and $LK,"DocDataScan",A="MN:DocDataScan"$().
If you are not using $LK,"DocForm",A="MN:DocForm"$(), make a $FG,2$$$LS...$$$FG$ statement with $LK,"DocPrint",A="MN:DocPrint"$() and fill-in the data addr. See $LK,"task_title",A="FF:::/Adam/DolDoc/DocEd.CPP,&Fs->task_title"$.
The default raw data type for the $FG,2$$$LS...$$$FG$ command is $FG,2$RT=I64$FG$. $LK,"DocForm",A="MN:DocForm"$() will automatically reset the raw type to the value from the $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ $FG,2$class$FG$ member's definition if you leave it set to the default. Or, if not using $LK,"DocForm",A="MN:DocForm"$(), specify a raw data type of $FG,2$I8$FG$, $FG,2$U8$FG$, $FG,2$I16$FG$, $FG,2$U16$FG$, $FG,2$I32$FG$, $FG,2$U32$FG$, $FG,2$I64$FG$, $FG,2$U64$FG$, or $FG,2$F64$FG$. See $LK,"DocDataFmt",A="MN:DocDataFmt"$() and $LK,"DocDataScan",A="MN:DocDataScan"$().
$ID,-2$$TR,"MA Macro"$
$ID,2$A left macro arg, $FG,2$LM=""$FG$, will send text when the left mouse is clicked.
@@ -215,6 +223,10 @@ $ID,-2$
<$LK,"ArgCode",A="FF:::/Adam/DolDoc/DocInit.CPP,ST_DOC_FLAGS"$> See $LK,"Arg Defines",A="MN:DOCEf_TAG"$.
$TR,"T=\"\" Tag Str"$
$ID,2$Some cmds have a tag by default. See $LK,"TX+T",A="FF:::/Adam/DolDoc/DocInit.CPP,TX+T"$. You can code $FG,2$T="tag_text"$FG$ as just $FG,2$"tag_text"$FG$ with no $FG,2$T=$FG$.
$ID,-2$$TR,"LEN=\"\" Field Length"$
$ID,2$The default field length for $FG,2$$$DA...$$$FG$ commands is $FG,2$LEN=64$FG$ characters. For U8 arrays[], $LK,"DocForm",A="MN:DocForm"$() will automatically reset the field length to the string length from the $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ $FG,2$class$FG$ member's definition. The length measures starting after the ':' in the $FG,2$A=""$FG$ format string.
The space after the first ':' in the format string marks the first valid cursor pos. See $LK,"Data Tag Width",A="FA:::/Adam/DolDoc/DocPlain.CPP,DataTagWidth"$.
$ID,-2$$TR,"A=\"\" Auxilliary Str"$
$ID,2$Some cmds need auxilliary strings. $FG,2$A="str"$FG$ means an $LK,"CDocEntry",A="MN:CDocEntry"$.aux_str is present. aux_str is used for song note text, link text, anchor text, and $FG,2$$$DA...$$$FG$ format string text.
$ID,-2$$TR,"D=\"\" Define Str"$
@@ -245,9 +257,9 @@ $ID,2$The BinPtrLink flags lets you specify a filename and bin num to import a b
$FG,2$$$SP,"<tag>",BI=1,BP="filename,1"$$$FG$ will import bin num "1" from filename.
$FG,2$$$SP,"<1>",BI=1,BP="::/Demo/Graphics/Mountain.CPP.Z,Mountain"$$$FG$ will import bin with tag name "Mountain" from "::/Demo/Graphics/Mountain.CPP.Z".
$ID,-2$$TR,"RT=<raw_data_type>"$
$ID,2$The default data-type for the $FG,2$$$DA...$$$FG$ command is $FG,2$I64$FG$. The default for the $FG,2$$$CB...$$$FG$ command is $FG,2$I8$FG$ which is $FG,2$Bool$FG$.
$ID,2$The default data-type for the $FG,2$$$DA...$$$FG$ and $FG,2$$$LS...$$$FG$ commands is $FG,2$RT=I64$FG$. If you do not specify a raw type and are using $LK,"DocForm",A="MN:DocForm"$(), it will use the $FG,2$class$FG$ member's raw type, automatically. The default for the $FG,2$$$CB...$$$FG$ command is $FG,2$RT=I8$FG$ which is $FG,2$Bool$FG$.
You can change it to $FG,2$I8$FG$, $FG,2$U8$FG$, $FG,2$I16$FG$, $FG,2$U16$FG$, $FG,2$I32$FG$, $FG,2$U32$FG$, $FG,2$I64$FG$, $FG,2$U64$FG$, or $FG,2$F64$FG$. See $LK,"DocDataFmt",A="MN:DocDataFmt"$() and $LK,"DocDataScan",A="MN:DocDataScan"$().
If not using $LK,"DocForm",A="MN:DocForm"$(), change it to $FG,2$I8$FG$, $FG,2$U8$FG$, $FG,2$I16$FG$, $FG,2$U16$FG$, $FG,2$I32$FG$, $FG,2$U32$FG$, $FG,2$I64$FG$, $FG,2$U64$FG$, or $FG,2$F64$FG$. See $LK,"DocDataFmt",A="MN:DocDataFmt"$() and $LK,"DocDataScan",A="MN:DocDataScan"$().
$ID,-2$$TR,"SX=<Exp> Shift X"$
$ID,2$Shift tag text $FG,2$+$FG$/$FG,2$- 7$FG$ X pixels off the grid.
$ID,-2$$TR,"SY=<Exp> Shift Y"$
+3 -3
View File
@@ -17,7 +17,7 @@ $ID,2$TempleOS compiles, doesn't $FG,2$interpret$FG$, and uses no $FG,2$byte cod
$ID,-2$$TR,"Are you a Creationist?"$
$ID,2$I am an evolutionist. $FG,2$Adam$FG$ is a better term for the first father of all tasks than $FG,2$root$FG$ was!
$ID,-2$$TR,"Is 'Bt()' in the code Bit Torrent?"$
$ID,2$$LK,"Bt",A="MN:Bt"$() is $FG,2$bit test$FG$, like the $FG,2$x86$FG$ instruction, not $FG,2$bit torrent$FG$.
$ID,2$$LK,"Bt",A="MN:Bt"$() is $FG,2$bit test$FG$, like the $FG,2$x86$FG$ inst, not $FG,2$bit torrent$FG$.
$ID,-2$$TR,"Is 'Fs->' in the code file system?"$
$ID,2$$LK,"Fs",A="MN:Fs"$ is a segment reg, not $FG,2$file system$FG$. ($LK,"Fs",A="MN:Fs"$ is kept pointing to the current task's record.) There is no memory segmentation. It is 64-bit and flat. FS and GS are used as general purpose regs, more or less.
$ID,-2$$TR,"Is it Pascal?"$
@@ -49,7 +49,7 @@ $ID,2$TempleOS identity-maps all memory, all the time. It is like paging is not
$ID,-2$$TR,"Why does it run code from stack addresses?"$
$ID,2$TempleOS puts all code in the lowest 2 Gig, known as the $LK,"Code Heap",A="FF:::/Doc/Glossary.TXT,Code and Data Heaps"$, so that the $FG,2$REL32$FG$ addressing mode can be used. TempleOS is 64-bit, but $FG,2$2 Gig$FG$ is enough for code. It actually puts global variables there, too, but you can turn that off with $LK,"OPTf_GLBLS_ON_DATA_HEAP",A="MN:OPTf_GLBLS_ON_DATA_HEAP"$. $LK,"MAlloc",A="MN:MAlloc"$() allocs higher memory.
$ID,-2$$TR,"How does it SYSCALL?"$
$ID,2$TempleOS doesn't use software interrupts or $FG,2$SYSCALL$FG$ instructions because it never needs to change out of ring-0, even running user programs. Calls are always $FG,2$CALL REL32$FG$ instructions.
$ID,2$TempleOS doesn't use software interrupts or $FG,2$SYSCALL$FG$ insts because it never needs to change out of ring-0, even running user programs. Calls are always $FG,2$CALL REL32$FG$ insts.
$ID,-2$$TR,"How do you fault-in stack?"$
$ID,2$The stack does not grow, so do not do deep recursion. In theory, memory gets fragmented, too.
$ID,-2$$TR,"How do I set the PATH?"$
@@ -62,7 +62,7 @@ $ID,-2$$TR,"Why is there some 16-Bit code?"$
$ID,2$TempleOS is 64-bit. Like all PC operating systems, the boot-loader starts in 16-bit real-mode. TempleOS calls a few $FG,2$BIOS$FG$ info routines, switches to VGA-640x480x4bit, switches to 32-bit, then, 64-bit mode. There is an odd thing called a $FG,2$$TX,"PCI BIOS",HTML="http://www.o3one.org/hwdocs/bios_doc/pci_bios_21.pdf"$$FG$ which is 32-bit used for $FG,2$PCI$FG$ config space access. TempleOS calls $LK,"that",A="FI:::/Kernel/PCIBIOS.CPP"$ a couple times. It must temporarily drop-out-of 64-bit mode for that and stop multi-tasking.
$ID,-2$$TR,"Why are you pushing 32-bit values on the stack?"$
$ID,2$$FG,2$PUSH EAX$FG$ : All stack operations in 64-bit mode are 64-bits.
$ID,-2$$TR,"Why are you using 32-bit instructions and not setting high 32-bits?"$
$ID,-2$$TR,"Why are you using 32-bit insts and not setting high 32-bits?"$
$ID,2$$FG,2$XOR EAX,EAX$FG$ : Operations on 32-bit regs clear the high 32-bits.
$ID,-2$$TR,"How do you use the FS and GS segment registers."$
$ID,2$$FG,2$MOV RAX,FS:[RAX]$FG$ : FS can be set with a $FG,2$WRMSR$FG$, but displacement is RIP relative, so it's tricky to use. FS is used for the current $LK,"CTask",A="MN:CTask"$, GS for $LK,"CCPU",A="MN:CCPU"$.
+1 -1
View File
@@ -30,7 +30,7 @@
* $FG,2$64-bit pointers$FG$. All memory, even more than 4 Gig, can be directly accessed by all tasks on all cores at all times.
* $FG,2$Ring-0-only$FG$. Highest CPU privileged mode at all times. No off-limits instructions. No time lost changing modes or address maps. Switches tasks in half a microsecond.
* $FG,2$Ring-0-only$FG$. Highest CPU privileged mode at all times. No off-limits insts. No time lost changing modes or address maps. Switches tasks in half a microsecond.
* $FG,2$2D/3D$FG$ graphics library
+1 -1
View File
@@ -9,7 +9,7 @@ $FG,2$"/*.TXT*;~*/Bible*"$FG$ BaseDir: $FG,2$Root$FG$ Mask: $FG,2$*.TXT*$FG$ bu
See $LK,"FilesFindMatch",A="MN:FilesFindMatch"$().
Flags are either text or integer values.
Flags are either text or int values.
$LK,"FUF_RECURSE",A="MN:FUF_RECURSE"$ $FG,2$+r$FG$ Recurse
$LK,"FUF_SINGLE",A="MN:FUF_SINGLE"$ $FG,2$+s$FG$ Single File (Optimization for one file in mask.)
+7 -5
View File
@@ -7,6 +7,7 @@ $FG,2$Acct$FG$ Account
$FG,2$ACD$FG$ AutoComplete Dictionary
$FG,2$Addr$FG$ Address
$FG,2$Alloc$FG$ Allocate
$FG,2$Alt$FG$ Alternate
$FG,2$AOT$FG$ Ahead-of-Time
$FG,2$AP$FG$ ApplicationProcessor (Core1 - Core7)
$FG,2$Arg$FG$ Argument
@@ -65,7 +66,8 @@ $FG,2$Ident$FG$ Identifier, Identity
$FG,2$IDT$FG$ Interrupt Descriptor Table
$FG,2$Init$FG$ Initialize
$FG,2$Ins$FG$ Insert
$FG,2$Int$FG$ Interrupt
$FG,2$Inst$FG$ Instruction
$FG,2$Int$FG$ Interrupt, Integer
$FG,2$ip_$FG$ Input Pointer. See $LK,"InputPointer.CPP",A="FI:::/Kernel/SerialDev/InputPointer.CPP"$.
$FG,2$Irq$FG$ Interrupt (Request)
$FG,2$JIT$FG$ Just-in-Time
@@ -148,11 +150,11 @@ $ID,2$This is Adam, as in Adam and Eve, the parent of all tasks and immortal. T
$ID,-2$$TR,"Seth Task"$
$ID,2$$FG,2$Seth$FG$ is Adam and Eve's child. Each CPU core has an executive task called $FG,2$Seth$FG$ that is immortal. The Adam task on $FG,2$CPU#0$FG$ is also it's $FG,2$Seth$FG$ task.
$ID,-2$$TR,"Code and Data Heaps"$
$ID,2$TempleOS uses the asm $FG,2$CALL$FG$ instruction, exclusively, and that instruction is limited to calling routines $FG,2$+/-2 Gig$FG$ from the current code location. To prevent out-of-range issues, I decided to separate code and data, placing all code within the lowest $FG,2$2 Gig$FG$ of memory, addresses $FG,2$00000000$FG$-$FG,2$7FFFFFFF$FG$. The compiler and $LK,"Load",A="MN:Load"$()er alloc memory from the code heap to store code and glbl vars, unless the compiler option $LK,"OPTf_GLBLS_ON_DATA_HEAP",A="MN:OPTf_GLBLS_ON_DATA_HEAP"$ is used. When programs call $LK,"MAlloc",A="MN:MAlloc"$() is from the data heap, which in not limited in size, except by physical RAM memory. You can alloc from any heap in any task at any time on any core, even making $LK,"independent",A="MN:Mem512Alloc"$ heaps.
$ID,2$TempleOS uses the asm $FG,2$CALL$FG$ inst, exclusively, and that inst is limited to calling routines $FG,2$+/-2 Gig$FG$ from the current code location. To prevent out-of-range issues, I decided to separate code and data, placing all code within the lowest $FG,2$2 Gig$FG$ of memory, addresses $FG,2$00000000$FG$-$FG,2$7FFFFFFF$FG$. The compiler and $LK,"Load",A="MN:Load"$()er alloc memory from the code heap to store code and glbl vars, unless the compiler option $LK,"OPTf_GLBLS_ON_DATA_HEAP",A="MN:OPTf_GLBLS_ON_DATA_HEAP"$ is used. When programs call $LK,"MAlloc",A="MN:MAlloc"$() is from the data heap, which in not limited in size, except by physical RAM memory. You can alloc from any heap in any task at any time on any core, even making $LK,"independent",A="MN:Mem512Alloc"$ heaps.
$ID,-2$$TR,"Parent, Child and PopUp Tasks"$
$ID,2$Often a task will $LK,"Spawn",A="MN:Spawn"$() or $LK,"PopUp",A="MN:PopUp"$() a task as a helper. The helper is known as a child Task, though you can $LK,"Spawn",A="MN:Spawn"$ a task and assign it a different parent... like $FG,2$Adam$FG$. Links are kept as to who's whose child, so when one task is $LK,"Kill",A="MN:Kill"$()ed the child helper tasks die, too. You can get a report of current system tasks with $LK,"TaskRep",A="MN:TaskRep"$(). There is just one window per task, so child tasks are needed for pop-ups.
$ID,-2$$TR,"HolyC"$
$ID,2$$LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ is more than $FG,2$C$FG$ and less than $FG,2$C++$FG$. It has the default args of $FG,2$C++$FG$ and uses $FG,2$class$FG$ in place of $FG,2$struct$FG$. It uses $FG,2$U0,U8,U16,U32,I64$FG$ and $FG,2$I0,I8,I16,I32,I64$FG$ for signed and unsigned integers. It has different $LK,"operator precedence",A="FF:::/Doc/HolyC.TXT,operator precedence"$. It has $FG,2$PASCAL$FG$-like function calls with no parens, but requires an $FG,2$&$FG,2$$FG$ when referring to function addresses.
$ID,2$$LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ is more than $FG,2$C$FG$ and less than $FG,2$C++$FG$. It has the default args of $FG,2$C++$FG$ and uses $FG,2$class$FG$ in place of $FG,2$struct$FG$. It uses $FG,2$U0,U8,U16,U32,I64$FG$ and $FG,2$I0,I8,I16,I32,I64$FG$ for signed and unsigned ints. It has different $LK,"operator precedence",A="FF:::/Doc/HolyC.TXT,operator precedence"$. It has $FG,2$PASCAL$FG$-like function calls with no parens, but requires an $FG,2$&$FG,2$$FG$ when referring to function addresses.
$ID,-2$$TR,"AOT Compile Mode"$
$ID,2$$FG,2$Ahead-of-Time$FG$ compiling is conventional compilation mode. Do not use $FG,2$AOT$FG$, use $FG,2$JIT$FG$ compiling.
@@ -162,7 +164,7 @@ There is no $FG,2$main()$FG$ routine. Instead, stmts outside functions are auto
$ID,-2$$TR,"JIT Compile Mode"$
$ID,2$In $FG,2$just-in-time$FG$ mode, the compiler places code and data in memory alloced from the heap, incrementally, making them immediately ready for in-place execution. This mode is used during cmd line operations. When you $FG,2$#include$FG$ a file, it is compiled function by function and code ends-up all over in the memory, at least in the first 2Gig of memory. The $LK,"ExeFile",A="MN:ExeFile"$() routine is the same as $FG,2$#include$FG$ but can be used in programs. $LK,"ExePrint",A="MN:ExePrint"$() routine will compile and run a string.
$ID,-2$$TR,"Compiler Intermediate Code"$
$ID,2$The compiler generates instructions one step before making actual assembly (machine) language instructions. This code is reverse polish stack machine in nature and can be viewed with $LK,"PassTrace",A="MN:PassTrace"$(). The compiler does not $FG,2$interpret$FG$ code, except in the process of optimization to make the final machine code. Assembly language output can be viewed when code is compiled with the $LK,"Trace",A="MN:Trace"$(), or, afterward, with $LK,"U",A="MN:U"$() or $LK,"Uf",A="MN:Uf"$("").
$ID,2$The compiler generates insts one step before making actual assembly (machine) language insts. This code is reverse polish stack machine in nature and can be viewed with $LK,"PassTrace",A="MN:PassTrace"$(). The compiler does not $FG,2$interpret$FG$ code, except in the process of optimization to make the final machine code. Assembly language output can be viewed when code is compiled with the $LK,"Trace",A="MN:Trace"$(), or, afterward, with $LK,"U",A="MN:U"$() or $LK,"Uf",A="MN:Uf"$("").
$ID,-2$$TR,"Drive/Partition"$
$ID,2$There is no distinction between $FG,2$drive$FG$ or $FG,2$partition$FG$. They are specified with a single letter from $FG,2$A$FG$-$FG,2$Z$FG$.
@@ -179,7 +181,7 @@ $LK,"Hash Table",A="HI:Hash"$
$LK,"RedSea File System",A="FI:::/Doc/RedSea.TXT"$
$LK,"Sprite",A="HI:Graphics/Sprite"$
$TR,"CLI, STI, PUSHFD, POPFD"$
$ID,2$These are x86 assembly instructions.
$ID,2$These are x86 assembly insts.
$FG,2$CLI$FG$ disable interrupts.
$FG,2$STI$FG$ enable interrupts.
$FG,2$PUSHFD$FG$ pushes the CPU flags.
+1 -1
View File
@@ -114,7 +114,7 @@ See $LK,"::/Doc/Asm.TXT"$.
* Don't change the segment regs unless interrupts are off. It's hard to do, anyway. $LK,"SET_FS_BASE",A="MN:SET_FS_BASE"$ and $LK,"SET_GS_BASE",A="MN:SET_GS_BASE"$.
* When interacting with $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ compiled code, preserve $FG,2$RBP, RSI, RDI, R10-R15$FG$ because the compiler uses these for reg vars. You are free to clobber $FG,2$RAX, RBX, RCX, RDX$FG$, $FG,2$R8$FG$ and $FG,2$R9$FG$. See $LK,"Compiler Reg Masks",A="MN:REGG_C_LOCAL_VARS"$, $LK,"PUSH_C_REGS",A="MN:PUSH_C_REGS"$ and $LK,"POP_C_REGS",A="MN:POP_C_REGS"$
* When interacting with $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ compiled code, preserve $FG,2$RBP, RSI, RDI, R10-R15$FG$ because the compiler uses these for reg vars. You are free to clobber $FG,2$RAX, RBX, RCX, RDX$FG$, $FG,2$R8$FG$ and $FG,2$R9$FG$. See $LK,"Compiler Reg Masks",A="MN:REGG_LOCAL_VARS"$, $LK,"PUSH_C_REGS",A="MN:PUSH_C_REGS"$ and $LK,"POP_C_REGS",A="MN:POP_C_REGS"$
* I recommend using the standard stk frame for functions because $LK,"Caller",A="MN:Caller"$() is used to display the call stk, such as for the wallpaper.
$FG,2$ PUSH RBP
+1 -1
View File
@@ -58,7 +58,7 @@ asm {
_HELLO_WORLD::
//You can only clobber RAX,RBX,RCX,RDX
MOV RAX,'Hello '
CALL PUT_CHARS //Up to 8 chars packed into one 64-bit integer.
CALL PUT_CHARS //Up to 8 chars packed into one 64-bit int.
MOV RAX,'World\n'
CALL PUT_CHARS
RET
+4 -4
View File
@@ -112,7 +112,7 @@ $FG$$ID,-2$
* Allows ranges like "$FG,2$case 4...7:$FG$" in $FG,2$switch$FG$ stmts.
* A no case number causes next higher integer case in $FG,2$switch$FG$ stmts. See $LK,"::/Demo/NullCase.CPP"$.
* A no case number causes next higher int case in $FG,2$switch$FG$ stmts. See $LK,"::/Demo/NullCase.CPP"$.
$ID,2$$FG,2$I64 i;
for (i=0;i<20;i++)
@@ -153,7 +153,7 @@ $ID,-2$
$ID,2$$FG,2$U0 Main()
{
//Only use $LK,"REGG_C_LOCAL_VARS",A="MN:REGG_C_LOCAL_VARS"$ or $LK,"REGG_C_LOCAL_NON_PTR_VARS",A="MN:REGG_C_LOCAL_NON_PTR_VARS"$ for reg vars or else clobbered.
//Only use $LK,"REGG_LOCAL_VARS",A="MN:REGG_LOCAL_VARS"$ or $LK,"REGG_LOCAL_NON_PTR_VARS",A="MN:REGG_LOCAL_NON_PTR_VARS"$ for reg vars or else clobbered.
I64 reg R15 i=5, noreg j=4;
nounusedwarn i;
asm {
@@ -219,7 +219,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,"DolDoc",A="FI:::/Doc/DolDocOverview.TXT"$. In $FG,2$asm$FG$ or $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ code, it also refers to the instruction's address or the offset in a $FG,2$class$FG$ definition.
* "$FG,2$$$$FG$" is an escape character. Two dollar signs signify an ordinary $$. See $LK,"DolDoc",A="FI:::/Doc/DolDocOverview.TXT"$. In $FG,2$asm$FG$ or $LK,"HolyC",A="FI:::/Doc/HolyC.TXT"$ code, it also refers to the inst's address or the offset in a $FG,2$class$FG$ definition.
* $FG,2$union$FG$ is more like a class, so you don't reference it with a $FG,2$union$FG$ label after you define it. Some common unions are declared in $LK,"KernelA.HPP",A="MN:U16"$ for 1,2,4 and 8 byte objects. If you place a type in front of a union declaration, that is the type when used by itself. See $LK,"::/Demo/SubIntAccess.CPP"$.
@@ -233,7 +233,7 @@ $FG$$ID,-2$
* There is no $FG,2$continue$FG$ stmt. Use $FG,2$goto$FG$.
* $FG,2$lock{}$FG$ can be used to apply asm $FG,2$LOCK$FG$ prefixes to code for safe multicore read-modify-write accesses. The code bracked with have $FG,2$LOCK$FG$ asm prefix's applied to relevant instructions within. It's a little shoddy. See $LK,"::/Demo/MultiCore/Lock.CPP"$.
* $FG,2$lock{}$FG$ can be used to apply asm $FG,2$LOCK$FG$ prefixes to code for safe multicore read-modify-write accesses. The code bracked with have $FG,2$LOCK$FG$ asm prefix's applied to relevant insts within. It's a little shoddy. See $LK,"::/Demo/MultiCore/Lock.CPP"$.
* There is a function called $LK,"MSize",A="MN:MSize"$() which gives the size of an object alloced off the heap. For larger size allocations, the system rounds-up to a power of two, so $FG,2$MSize()$FG$ lets you know the real size and you can take full advantage of it.
+1 -1
View File
@@ -2,7 +2,7 @@ $WW,1$$FG,5$$TX+CX,"Memory Overview"$$FG$
Paging is practically not used. 64-bit mode requires paging, however, so it is identity-mapped, virtual identical to physical. All tasks on all cores use the same page table map, just as though all addresses are physical addresses. 2 Meg page table entries are used, except the first 2 Meg, which uses 4K page tables entries. Nothing swaps to disk, either.
In TempleOS, the lowest 2 Gig of memory is called the $FG,2$code heap$FG$. TempleOS's compiler always uses 32-bit signed relative JMP & CALL instructions because 64-bit CALLs take two instructions. With signed +/- 32-bit values, code can only call a function within 2 Gig distance. Therefore, TempleOS keeps all code in the lowest 2 Gig memory addresses including what would normally be called "the kernel". Two Gig is plenty for code, don't worry.
In TempleOS, the lowest 2 Gig of memory is called the $FG,2$code heap$FG$. TempleOS's compiler always uses 32-bit signed relative JMP & CALL insts because 64-bit CALLs take two insts. With signed +/- 32-bit values, code can only call a function within 2 Gig distance. Therefore, TempleOS keeps all code in the lowest 2 Gig memory addresses including what would normally be called "the kernel". Two Gig is plenty for code, don't worry.
You can create new, independent heaps using $LK,"HeapCtrlInit",A="MN:HeapCtrlInit"$(). Then, use the $LK,"CHeapCtrl",A="MN:CHeapCtrl"$ as the 2nd arg to $LK,"MAlloc",A="MN:MAlloc"$(). See $LK,"HeapLog",A="MN:HeapLog"$() for an example.
+1 -1
View File
@@ -8,7 +8,7 @@ Each core has an executive $FG,2$seth task$FG$ which is the father of all tasks
You give a job to a seth task with $LK,"JobQue",A="MN:JobQue"$() and get the result with $LK,"JobResultGet",A="MN:JobResultGet"$(). You spawn a task on another core with $LK,"Spawn",A="MN:Spawn"$().
Note: You must use the $FG,2$LOCK$FG$ asm prefix when changing shared structures in a multicore environment. The $LK,"LBts",A="MN:LBts"$(), $LK,"LBtr",A="MN:LBtr"$() and $LK,"LBtc",A="MN:LBtc"$() instructions have $FG,2$LOCK$FG$ prefixes. The compiler has a $FG,2$lock{}$FG$ feature but it doesn't work well. See $LK,"::/Demo/MultiCore/Lock.CPP"$.
Note: You must use the $FG,2$LOCK$FG$ asm prefix when changing shared structures in a multicore environment. The $LK,"LBts",A="MN:LBts"$(), $LK,"LBtr",A="MN:LBtr"$() and $LK,"LBtc",A="MN:LBtc"$() insts have $FG,2$LOCK$FG$ prefixes. The compiler has a $FG,2$lock{}$FG$ feature but it doesn't work well. See $LK,"::/Demo/MultiCore/Lock.CPP"$.
See $LK,"::/Demo/Graphics/Transform.CPP"$.
See $LK,"::/Kernel/MultiProc.CPP"$.
+1 -1
View File
@@ -42,6 +42,6 @@ $FG,2$$ID,2$$ID,2$U0 Main()
U16 *_w=0xA0000;
*_w|=0x8000;
}
$ID,-2$$FG$The $FG,2$|=$FG$ will be coded as a $FG,2$U32 Bts$FG$ instruction resulting in a $FG,2$U32$FG$ access instead of a $FG,2$U16$FG$ access. This affects some hardware operations.
$ID,-2$$FG$The $FG,2$|=$FG$ will be coded as a $FG,2$U32 Bts$FG$ inst resulting in a $FG,2$U32$FG$ access instead of a $FG,2$U16$FG$ access. This affects some hardware operations.
$ID,-2$
* Compiler warning or error message line numbers will be off if you have a block of word-wrapped comments. You might press $FG,2$<CTRL-t>$FG$ before doing an editor goto-line-number command.
+1 -1
View File
@@ -1 +1 @@
$WW,1$Intel/AMD have an instruction that returns the num of CPU cycles since boot. This is not a steady, calibrated real time value. TempleOS measures it and you can convert with $LK,"cnts.time_stamp_freq",A="MN:CCntsGlbls"$, a value continuously calibrated from other cnts.
$WW,1$Intel/AMD have an inst that returns the num of CPU cycles since boot. This is not a steady, calibrated real time value. TempleOS measures it and you can convert with $LK,"cnts.time_stamp_freq",A="MN:CCntsGlbls"$, a value continuously calibrated from other cnts.
+1 -1
View File
@@ -1,6 +1,6 @@
$WW,1$$LK,"CDC",A="MN:CDC"$'s have a 4x4 matrix for rotating, scaling, skewing and shifting in 3 dimensions. To make the graphics routines use the transform, you must set the $LK,"DCF_TRANSFORMATION",A="MN:DCF_TRANSFORMATION"$ flag.
The matrix consists of integers that have been scaled 32 bits ($LK,"GR_SCALE",A="MN:GR_SCALE"$). See $LK,"::/Demo/Lectures/FixedPoint.CPP"$ to learn why.
The matrix consists of ints that have been scaled 32 bits ($LK,"GR_SCALE",A="MN:GR_SCALE"$). See $LK,"::/Demo/Lectures/FixedPoint.CPP"$ to learn why.
See $LK,"Mat4x4IdentEqu",A="MN:Mat4x4IdentEqu"$(), $LK,"Mat4x4IdentNew",A="MN:Mat4x4IdentNew"$(), $LK,"Mat4x4Equ",A="MN:Mat4x4Equ"$() and $LK,"Mat4x4New",A="MN:Mat4x4New"$(). See $LK,"Mat4x4RotX",A="MN:Mat4x4RotX"$(), $LK,"Mat4x4RotY",A="MN:Mat4x4RotY"$(), $LK,"Mat4x4RotZ",A="MN:Mat4x4RotZ"$() and $LK,"Mat4x4Scale",A="MN:Mat4x4Scale"$() to rotate about axes and scale. Combine them with $LK,"Mat4x4MulMat4x4Equ",A="MN:Mat4x4MulMat4x4Equ"$()/$LK,"Mat4x4MulMat4x4New",A="MN:Mat4x4MulMat4x4New"$() and assign them to the $LK,"CDC",A="MN:CDC"$.$FG,2$dc$FG$ with $LK,"DCMat4x4Set",A="MN:DCMat4x4Set"$(). See $LK,"::/Demo/Graphics/Box.CPP"$.