TempleOSCDV4.05.ISO
This commit is contained in:
1 parent
d1856315e0
commit
6fe38d2d9d
118 files changed
+4559
-5069
No files matched your search
@@ -7,7 +7,7 @@ Option(OPTf_WARN_DUP_TYPES,ON);
|
||||
KbdTypeMatic(0);
|
||||
|
||||
// Las Vegas is -7 during summer, -8 during winter
|
||||
local_time_offset=-8*60*60*CDATE_FREQ; //Pacific
|
||||
local_time_offset=-7*60*60*CDATE_FREQ; //Pacific
|
||||
// Remember you can set the time in the BIOS.
|
||||
|
||||
//$AN,"",A="mouse_move_scale"$adjust these to set mouse move scale
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
$WW,1$$FG,5$$TX+CX,"TODO"$$FG$
|
||||
|
||||
* Investigate why packet loss $LK,"Training Sleep(1)",A="FF:::/Adam/Training.CPP,Sleep(1)"$.
|
||||
|
||||
* Add AVL or red/black binary tree library support. We have fixed-size stack. Auto-balancing binary tree is very needed. I've done everything myself. I don't want to ruin a perfect record. I'm in no hurry.
|
||||
@@ -37,7 +37,6 @@ $WW,1$$FG,5$$TX+CX,"TODO"$$FG$
|
||||
|
||||
* Bug: Find-and-replace text on $$PT$$ line before it.
|
||||
* 12/25/2015 Copy-Paste index.html glitch if source window 40 columns.
|
||||
* 01/10/2016 find-replace editor hung on $LK,"CounterRenaissance",A="FI:::/Home/Web/TAD/CounterRenaissance.TXT"$ "Rennaisance"
|
||||
* 01/06/2016 Editor filter "str" applied to output from LineRep looks broken.
|
||||
|
||||
* Document, perhaps with video, $LK,"GetStr",A="MN:GetStr"$() all the way down into $LK,"PutKey",A="MN:PutKey"$() code.
|
||||
@@ -104,6 +103,8 @@ $FG,5$$TX+CX,"TODO: Too Hard, or Not Worth Doing."$$FG$
|
||||
|
||||
* Log-to-file is inefficient because we load and save whole file.
|
||||
|
||||
* $LK,"ICMov",A="MN:ICMov"$() $LK,"PUSH_CMP",A="FF:::/Compiler/BackLib.CPP,PUSH_CMP"$ and $LK,"MDf_STK",A="MN:MDf_STK"$? Perhaps, it's okay.
|
||||
|
||||
* Short FAT32 ~ names.
|
||||
|
||||
* Compiler: Inline functions?
|
||||
@@ -368,7 +369,7 @@ and blotted at the end.
|
||||
|
||||
* static var off of data heap.
|
||||
* could add "const" to not set CCF_NOT_CONST flag for trig, etc.
|
||||
* could make glblvar imports use TY_RIP_DISP32.
|
||||
* could make glblvar imports use MDF_RIP_DISP32.
|
||||
* PUSH_CMP allocs reg R9 or whatever
|
||||
* Might be problem with NOP in OPT pass1 for NO_PUSH in expressions besides
|
||||
assignments. Is ShiftNoPush fully implemented?
|
||||
@@ -387,14 +388,16 @@ Lord does not repeat $TX,"Job 33:14",HTML="http://www.biblegateway.com/verse/e
|
||||
Offer only in approved place $TX,"Deuteronomy 12:13-18",HTML="http://www.biblegateway.com/passage/?search=Deuteronomy%2012:13-18&version=NIV"$
|
||||
Jesus' zeal for the Temple $TX,"John 2:14-19",HTML="http://www.biblegateway.com/passage/?search=John%202:14-19&version=NIV"$
|
||||
Famine not for bread $TX,"Amos 8:11-12",HTML="http://www.biblegateway.com/passage/?search=Amos%208:11-12&version=NIV"$
|
||||
To the honest, you are honest $TX,"Psalm 18:26",HTML="http://www.biblegateway.com/verse/en/Psalm%2018:26"$
|
||||
Meek and humble of heart $TX,"Matthew 11:29",HTML="http://www.biblegateway.com/verse/en/Matthew%2011:29"$
|
||||
MOses hgets Aaron $TX,"Exodus 4:10-16",HTML="http://www.biblegateway.com/passage/?search=Exodus%204:10-16&version=NIV"$
|
||||
There is no council against the Lord $TX,"Proverbs 21:30",HTML="http://www.biblegateway.com/verse/en/Proverbs%2021:30"$
|
||||
|
||||
Human help is worthless $TX,"Psalm 108:12",HTML="http://www.biblegateway.com/verse/en/Psalm%20108:12"$
|
||||
|
||||
$FG,5$$TX+CX,"Misc Notes"$$FG$
|
||||
Intel CEO's name: Brian Krzanich
|
||||
>$FG,2$lspci -v$FG$
|
||||
Size:$TX,"17364 KB",D="DD_TEMPLEOSCD_K_SIZE"$
|
||||
Size:$TX,"17362 KB",D="DD_TEMPLEOSCD_K_SIZE"$
|
||||
|
||||
$FG,5$$TX+CX,"My Web Bookmarks"$$FG$$WW,0$
|
||||
$TX,"My FireFox Bookmarks",HTML="http://www.templeos.org/Wb/Home/Downloads/Blog/Bookmarks"$
|
||||
@@ -407,6 +410,7 @@ Pew Pew Pew $HC,"<center><img src=\"http://i.imgur.com/sMpJ0ch.jpg\" width=\"640
|
||||
Iceberg $HC,"<center><img src=\"https://upload.wikimedia.org/wikipedia/commons/3/38/Blue_ice_in_South_Greenland_-_Visit_Greenland.jpg\" width=\"640\" height=\"480\" alt=\"\"></center>"$
|
||||
I made dis $HC,"<center><img src=\"http://i.imgur.com/cZKkxTX.jpg\" width=\"640\" height=\"800\" alt=\"\"></center>"$
|
||||
NIST Beacon $HC,"<center><img src=\"http://www.nist.gov/itl/csd/ct/images/beacon_architecture_2013.jpg\" width=\"550\" height=\"278\" alt=\"\"></center>"$
|
||||
Purple Frog $HC,"<center><img src=\"https://s-media-cache-ak0.pinimg.com/736x/fb/08/2a/fb082a53bd798f5957a474ff9095e6d4.jpg\" width=\"640\" height=\"420\" alt=\"\"></center>"$
|
||||
$TX,"SimStructure",HTML="http://www.templeos.org/files/SimStrSetUp.zip"$
|
||||
$TX,"ASU_Transcripts",HTML="http://www.templeos.org/files/ASU_Transcripts.pdf"$ $TX,"ASU Course Catalog (See page 261)",HTML="https://catalog.asu.edu/files/shared/archives/1994-1996/general/UG1994-1996.pdf/1994-1996-UG-241-267.pdf"$
|
||||
$TX,"Dr. David Pheanis",HTML="https://webapp4.asu.edu/directory/person/77201"$ $TX,"Dr. Konstantinos S. Tsakalis",HTML="http://ecee.engineering.asu.edu/directory/tenured-and-tenure-track-faculty/kostantinos-s-tsakalis"$ $TX,"Dr. Walter Higgins",HTML="https://webapp4.asu.edu/directory/directorysearch?cn=Walter+Higgins"$
|
||||
@@ -430,6 +434,7 @@ $TX,"Higgs 5-Sigma Proof",HTML="http://understandinguncertainty.org/explaining-5
|
||||
$TX,"Dwight: Nerd torture",HTML="http://www.noob.us/humor/the-office-dwight-faces-nerd-torture-of-the-highest-form"$
|
||||
$TX,"TOSZ Compression",HTML="http://www.templeos.org/Wb/Linux/TOSZ.CPP"$
|
||||
$TX,"ATA/ATAPI spec",HTML="http://www.t13.org/Documents/UploadedDocuments/docs2007/D1532v1r4b-AT_Attachment_with_Packet_Interface_-_7_Volume_1.pdf"$
|
||||
$TX,"Streaming Terry A. Davis",HTML="https://www.youtube.com/channel/UCdX4uJUwSFwiY3XBvu-F_-Q/live"$
|
||||
|
||||
$TX,"WWW.OSDEV.ORG",HTML="http://www.osdev.org"$
|
||||
$TX,"NIST Beacon",HTML="http://www.nist.gov/itl/csd/ct/nist_beacon.cfm"$
|
||||
|
||||
@@ -2,7 +2,7 @@ $TR-UL,"Adam"$
|
||||
$ID,2$$TR,"SysMsgFlags"$
|
||||
$ID,2$sys_msg_flags[0]=0xFF;
|
||||
$ID,-2$$TR,"SysRegVer"$
|
||||
$ID,2$registry_version=4.040;
|
||||
$ID,2$registry_version=4.050;
|
||||
$ID,-2$$ID,-2$$TR-UL,"TempleOS"$
|
||||
$ID,2$$TR,"TOS"$
|
||||
$ID,2$I64 tos_code_walk_thru=105,tos_after_egypt_in_action=46;
|
||||
@@ -26,8 +26,6 @@ $ID,-2$$TR,"FlapBat"$
|
||||
$ID,2$F64 best_score=16.4090;
|
||||
$ID,-2$$TR,"TimeOut"$
|
||||
$ID,2$I64 best_score=22202;
|
||||
$ID,-2$$TR,"RawHide"$
|
||||
$ID,2$F64 best_score=96.1279;
|
||||
$ID,-2$$TR,"KeepAway"$
|
||||
$ID,2$I64 best_score0=0,best_score1=9999;
|
||||
$ID,-2$$TR,"XCaliber"$
|
||||
@@ -37,9 +35,11 @@ $ID,-2$$TR,"Wenceslas"$
|
||||
$ID,2$F64 best_score=49.8074;
|
||||
$ID,-2$$TR,"BomberGolf"$
|
||||
$ID,2$I64 best_score=175;
|
||||
$ID,-2$$TR,"RawHide"$
|
||||
$ID,2$F64 best_score=96.1279;
|
||||
$ID,-2$$ID,-2$$TR,"DemoCompany"$
|
||||
$ID,2$$TR,"Game1"$
|
||||
$ID,2$F64 best_score=1344.86889;
|
||||
$ID,2$F64 best_score=481.84264;
|
||||
$TR,"SimpleVal"$
|
||||
$ID,2$1300;
|
||||
$ID,2$1309;
|
||||
$ID,-2$$ID,-2$$ID,-2$
|
||||
@@ -245,7 +245,7 @@ U0 MakeTOSDistro()
|
||||
ISOFileCreate(TOS_ISO_NAME,TOS_DISTRO_DIR "/*",,
|
||||
TOS_DISTRO_DIR BOOT_DIR_KERNEL_BIN_C);
|
||||
DefinePrint("DD_TEMPLEOSTS_SIZE",
|
||||
"Download $TX,"TempleOS V4.04",D="DD_OS_NAME_VERSION"$ - T.S. Company Internal Distro (%0.1f MB)",
|
||||
"Download $TX,"TempleOS V4.05",D="DD_OS_NAME_VERSION"$ - T.S. Company Internal Distro (%0.1f MB)",
|
||||
0.1*(10*Size(TOS_ISO_NAME,"+s")/1024/1024));
|
||||
Drv('C');
|
||||
}
|
||||
@@ -280,7 +280,7 @@ U0 MakeDbgDistro()
|
||||
ISOFileCreate(TOS_ISO_NAME,TOS_DISTRO_DIR "/*",,
|
||||
TOS_DISTRO_DIR BOOT_DIR_KERNEL_BIN_C);
|
||||
DefinePrint("DD_TEMPLEOSDBG_SIZE",
|
||||
"Download $TX,"TempleOS V4.04",D="DD_OS_NAME_VERSION"$ - Debug Distro (%0.1f MB)",
|
||||
"Download $TX,"TempleOS V4.05",D="DD_OS_NAME_VERSION"$ - Debug Distro (%0.1f MB)",
|
||||
0.1*(10*Size(TOS_ISO_NAME,"+s")/1024/1024));
|
||||
Drv('C');
|
||||
}
|
||||
@@ -328,7 +328,7 @@ U0 MakeLiteDistro()
|
||||
ISOFileCreate(TOS_ISO_NAME,TOS_DISTRO_DIR "/*",,
|
||||
TOS_DISTRO_DIR BOOT_DIR_KERNEL_BIN_C);
|
||||
DefinePrint("DD_TEMPLEOSLITE_SIZE",
|
||||
"Download $TX,"TempleOS V4.04",D="DD_OS_NAME_VERSION"$ - Lite Distro (%0.1f MB)",
|
||||
"Download $TX,"TempleOS V4.05",D="DD_OS_NAME_VERSION"$ - Lite Distro (%0.1f MB)",
|
||||
0.1*(10*Size(TOS_ISO_NAME,"+s")/1024/1024));
|
||||
Drv('C');
|
||||
}
|
||||
@@ -361,7 +361,7 @@ U0 MakeUltraDistro()
|
||||
ISOFileCreate(TOS_ISO_NAME,TOS_DISTRO_DIR "/*",,
|
||||
TOS_DISTRO_DIR BOOT_DIR_KERNEL_BIN_C);
|
||||
DefinePrint("DD_TEMPLEOSULTRA_SIZE",
|
||||
"Download $TX,"TempleOS V4.04",D="DD_OS_NAME_VERSION"$ - UltraLite Distro (%0.1f MB)",
|
||||
"Download $TX,"TempleOS V4.05",D="DD_OS_NAME_VERSION"$ - UltraLite Distro (%0.1f MB)",
|
||||
0.1*(10*Size(TOS_ISO_NAME,"+s")/1024/1024));
|
||||
Drv('C');
|
||||
}
|
||||
@@ -370,12 +370,12 @@ U0 UpdateISODocDefines()
|
||||
{
|
||||
try {
|
||||
DefinePrint("DD_TEMPLEOSCD_SIZE",
|
||||
"Download $TX,"TempleOS V4.04",D="DD_OS_NAME_VERSION"$ - Standard Distro (%0.1f MB)",
|
||||
"Download $TX,"TempleOS V4.05",D="DD_OS_NAME_VERSION"$ - Standard Distro (%0.1f MB)",
|
||||
0.1*(10*Size("D:/Wb/TempleOSCD.ISO","+s")/1024/1024));
|
||||
DefinePrint("DD_TEMPLEOSCD_K_SIZE",
|
||||
"%d KB",Size("D:/Wb/TempleOSCD.ISO","+s")/1024);
|
||||
DefinePrint("DD_TEMPLEOSULTRA_SIZE",
|
||||
"Download $TX,"TempleOS V4.04",D="DD_OS_NAME_VERSION"$ - UltraSmall Distro (%0.1f MB)",
|
||||
"Download $TX,"TempleOS V4.05",D="DD_OS_NAME_VERSION"$ - UltraSmall Distro (%0.1f MB)",
|
||||
0.1*(10*Size("D:/Wb/TempleOSUltra.ISO","+s")/1024/1024));
|
||||
DefinePrint("DD_TEMPLEOSULTRA_K_SIZE",
|
||||
"%d KB",Size("D:/Wb/TempleOSUltra.ISO","+s")/1024);
|
||||
|
||||
@@ -132,7 +132,7 @@ class CMetallicaForm
|
||||
|
||||
class CWebBookMarkForm
|
||||
{
|
||||
U8 tag[STR_LEN] fmtstr "$$DA-P,LEN=STR_LEN-1,A=\"Tag Text:%s\"$$\n";
|
||||
U8 tag[STR_LEN] fmtstr "$$DA-P,A=\"Tag Text:%s\"$$\n";
|
||||
U8 special[STR_LEN];
|
||||
I64 timestamp;
|
||||
I64 cert;
|
||||
@@ -142,8 +142,8 @@ class CWebBookMarkForm
|
||||
|
||||
class CWebBibleForm
|
||||
{
|
||||
U8 tag[STR_LEN] fmtstr "$$DA-P,LEN=STR_LEN-1,A=\"Tag Text:%s\"$$\n";
|
||||
U8 special[STR_LEN] fmtstr "$$DA-P,LEN=STR_LEN-1,A=\"Bible Passage:%s\"$$\n";
|
||||
U8 tag[STR_LEN] fmtstr "$$DA-P,A=\"Tag Text:%s\"$$\n";
|
||||
U8 special[STR_LEN] fmtstr "$$DA-P,A=\"Bible Passage:%s\"$$\n";
|
||||
I64 timestamp;
|
||||
I64 cert;
|
||||
I64 min;
|
||||
@@ -152,7 +152,7 @@ class CWebBibleForm
|
||||
|
||||
class CYouTubeForm
|
||||
{
|
||||
U8 tag[STR_LEN] fmtstr "$$DA-P,LEN=STR_LEN-1,A=\"Title:%s\"$$\n";
|
||||
U8 tag[STR_LEN] fmtstr "$$DA-P,A=\"Title:%s\"$$\n";
|
||||
U8 special[STR_LEN] fmtstr "$$DA-P-TRM,LEN=11,A=\"SerialNum:%11s\"$$\n";
|
||||
I64 timestamp;
|
||||
I64 cert;
|
||||
@@ -163,7 +163,7 @@ class CYouTubeForm
|
||||
class CImgurForm
|
||||
{
|
||||
U8 tag[STR_LEN];
|
||||
U8 special[STR_LEN] fmtstr "$$DA-P,LEN=STR_LEN-1,A=\"SerialNum:%s\"$$\n";
|
||||
U8 special[STR_LEN] fmtstr "$$DA-P,A=\"SerialNum:%s\"$$\n";
|
||||
I64 timestamp;
|
||||
I64 cert;
|
||||
I64 min fmtstr "$$DA,A=\"Width :%d\"$$\n";
|
||||
@@ -172,8 +172,8 @@ class CImgurForm
|
||||
|
||||
class CWikipediaForm
|
||||
{
|
||||
U8 tag[STR_LEN] fmtstr "$$DA-P,LEN=STR_LEN-1,A=\"Tag Text:%s\"$$\n";
|
||||
U8 special[STR_LEN] fmtstr "$$DA-P,LEN=STR_LEN-1,A=\"Index :%s\"$$\n";
|
||||
U8 tag[STR_LEN] fmtstr "$$DA-P,A=\"Tag Text:%s\"$$\n";
|
||||
U8 special[STR_LEN] fmtstr "$$DA-P,A=\"Index :%s\"$$\n";
|
||||
I64 timestamp;
|
||||
I64 cert;
|
||||
I64 min;
|
||||
@@ -183,7 +183,7 @@ class CWikipediaForm
|
||||
class CRandDecForm
|
||||
{
|
||||
U8 tag[STR_LEN];
|
||||
U8 special[STR_LEN] fmtstr "$$DA-P,LEN=STR_LEN-1,A=\"Line (Dec):%s\"$$\n";
|
||||
U8 special[STR_LEN] fmtstr "$$DA-P,A=\"Line (Dec):%s\"$$\n";
|
||||
I64 timestamp;
|
||||
I64 cert;
|
||||
I64 min;
|
||||
@@ -193,7 +193,7 @@ class CRandDecForm
|
||||
class CRandHexForm
|
||||
{
|
||||
U8 tag[STR_LEN];
|
||||
U8 special[STR_LEN] fmtstr "$$DA-P,LEN=STR_LEN-1,A=\"Line (Hex):%s\"$$\n";
|
||||
U8 special[STR_LEN] fmtstr "$$DA-P,A=\"Line (Hex):%s\"$$\n";
|
||||
I64 timestamp;
|
||||
I64 cert;
|
||||
I64 min;
|
||||
@@ -203,7 +203,7 @@ class CRandHexForm
|
||||
class CRandCertForm
|
||||
{
|
||||
U8 tag[STR_LEN];
|
||||
U8 special[STR_LEN] fmtstr "$$DA-P,LEN=STR_LEN-1,A=\"Line (Dec) :%s\"$$\n";
|
||||
U8 special[STR_LEN] fmtstr "$$DA-P,A=\"Line (Dec) :%s\"$$\n";
|
||||
I64 timestamp;
|
||||
I64 cert fmtstr "$$DA,A=\"Certificate:%d\"$$\n";
|
||||
I64 min;
|
||||
@@ -213,8 +213,7 @@ class CRandCertForm
|
||||
class CRandHexBeacon5Form
|
||||
{
|
||||
U8 tag[STR_LEN];
|
||||
U8 special[STR_LEN]
|
||||
fmtstr "$$DA-P-TRM,LEN=5,"
|
||||
U8 special[STR_LEN] fmtstr "$$DA-P-TRM,LEN=5,"
|
||||
"A=\"Line (5-Digit Hex):%5s\"$$\n";
|
||||
I64 timestamp fmtstr "$$DA,A=\"TimeStamp :%d\"$$\n";
|
||||
I64 cert;
|
||||
@@ -225,8 +224,7 @@ class CRandHexBeacon5Form
|
||||
class CRandHexBeacon8Form
|
||||
{
|
||||
U8 tag[STR_LEN];
|
||||
U8 special[STR_LEN]
|
||||
fmtstr "$$DA-P-TRM,LEN=8,"
|
||||
U8 special[STR_LEN] fmtstr "$$DA-P-TRM,LEN=8,"
|
||||
"A=\"Line (8-Digit Hex):%8s\"$$\n";
|
||||
I64 timestamp fmtstr "$$DA,A=\"TimeStamp :%d\"$$\n";
|
||||
I64 cert;
|
||||
@@ -427,7 +425,7 @@ public U0 GodBooksPassage(U8 *files_find_mask,I64 len=512,
|
||||
DirTreeDel(tempde1);
|
||||
}
|
||||
|
||||
#define NIST_TIME_OFFSET (-7900-local_time_offset/CDATE_FREQ)
|
||||
#define NIST_TIME_OFFSET (-7916-local_time_offset/CDATE_FREQ)
|
||||
#define NIST_TIME_TO_SWITCH 3
|
||||
|
||||
public U0 NISTSync()
|
||||
|
||||
@@ -241,7 +241,7 @@ U0 TOSRegWrite()
|
||||
|
||||
class CYouTubeForm2
|
||||
{
|
||||
U8 special[STR_LEN] fmtstr "$$DA-P,LEN=STR_LEN-1,A=\"SerialNum:%s\"$$\n";
|
||||
U8 special[STR_LEN] fmtstr "$$DA-P,A=\"SerialNum:%s\"$$\n";
|
||||
};
|
||||
|
||||
U8 *TOSYouTube()
|
||||
|
||||
@@ -150,7 +150,7 @@ public CDoc *Doc2Html(CDoc *doc_in,U8 *html_header=NULL,U8 *body_header=NULL,
|
||||
"<head>\n"
|
||||
"<meta http-equiv=\"Content-Type\" "
|
||||
"content=\"text/html;charset=US-ASCII\">\n"
|
||||
"<meta name=\"generator\" content=\"$TX,"TempleOS V4.04",D="DD_OS_NAME_VERSION"$\">\n";
|
||||
"<meta name=\"generator\" content=\"$TX,"TempleOS V4.05",D="DD_OS_NAME_VERSION"$\">\n";
|
||||
if (!body_header) body_header=
|
||||
"<body>\n"
|
||||
"<pre style=\"font-family:courier;font-size:10pt\">\n";
|
||||
@@ -372,7 +372,7 @@ U0 TOSWebFile(U8 *name)
|
||||
"<meta name=\"keywords\" "
|
||||
"content=\"Operating System,64-Bit,64 Bit,"
|
||||
"Temple,OS,TempleOS,Free,Open Source,Public Domain,x86_64\">\n"
|
||||
"<meta name=\"generator\" content=\"$TX,"TempleOS V4.04",D="DD_OS_NAME_VERSION"$\">\n",
|
||||
"<meta name=\"generator\" content=\"$TX,"TempleOS V4.05",D="DD_OS_NAME_VERSION"$\">\n",
|
||||
|
||||
"<body style=\"background-color:#55FFFF; border-style:solid;
|
||||
border-width:8px; border-color:#0000AA;
|
||||
|
||||
@@ -13,7 +13,7 @@ asm {
|
||||
|
||||
_BEEPS::
|
||||
//You can always clobber RAX,RBX,RCX,RDX,R8,R9. The compiler expects that.
|
||||
//See $LK,"REGG_C_CLOBBERED",A="MN:REGG_C_CLOBBERED"$ and $LK,"REGG_C_TEMP_CLOBBERED",A="MN:REGG_C_TEMP_CLOBBERED"$.
|
||||
//See $LK,"REGG_CLOBBERED",A="MN:REGG_CLOBBERED"$ and $LK,"REGG_STK_TEMP",A="MN:REGG_STK_TEMP"$.
|
||||
PUSH RBP
|
||||
MOV RBP,RSP
|
||||
MOV RCX,U64 SF_ARG1[RBP] //$LK,"SF_ARG1",A="FF:::/Kernel/KernelA.HPP,SF_ARG1"$
|
||||
|
||||
@@ -19,7 +19,7 @@ JIFFIES_MSG: DU8 "Jiffies:",0;
|
||||
|
||||
_BEEPS2::
|
||||
//You can clobber RAX,RBX,RCX,RDX,R8,R9. The compiler expects that.
|
||||
//See $LK,"REGG_C_CLOBBERED",A="MN:REGG_C_CLOBBERED"$ and $LK,"REGG_C_TEMP_CLOBBERED",A="MN:REGG_C_TEMP_CLOBBERED"$.
|
||||
//See $LK,"REGG_CLOBBERED",A="MN:REGG_CLOBBERED"$ and $LK,"REGG_STK_TEMP",A="MN:REGG_STK_TEMP"$.
|
||||
PUSH RBP
|
||||
MOV RBP,RSP
|
||||
MOV RCX,U64 SF_ARG1[RBP] //$LK,"SF_ARG1",A="FF:::/Kernel/KernelA.HPP,SF_ARG1"$
|
||||
@@ -34,7 +34,7 @@ _BEEPS2::
|
||||
POP RCX
|
||||
LOOP @@05
|
||||
|
||||
PUSH RSI //See $LK,"REGG_C_LOCAL_VARS",A="MN:REGG_C_LOCAL_VARS"$ & $LK,"REGG_C_LOCAL_NON_PTR_VARS",A="MN:REGG_C_LOCAL_NON_PTR_VARS"$
|
||||
PUSH RSI //See $LK,"REGG_LOCAL_VARS",A="MN:REGG_LOCAL_VARS"$ & $LK,"REGG_LOCAL_NON_PTR_VARS",A="MN:REGG_LOCAL_NON_PTR_VARS"$
|
||||
MOV RSI,JIFFIES_MSG
|
||||
CALL PUT_STR
|
||||
POP RSI
|
||||
|
||||
@@ -31,7 +31,7 @@ MY_WORLD_MSG:
|
||||
//My convention is to put an underscore
|
||||
//on C callable asm routines.
|
||||
_HELLO_WORLD::
|
||||
PUSH RSI //See $LK,"REGG_C_LOCAL_VARS",A="MN:REGG_C_LOCAL_VARS"$ & $LK,"REGG_C_LOCAL_NON_PTR_VARS",A="MN:REGG_C_LOCAL_NON_PTR_VARS"$
|
||||
PUSH RSI //See $LK,"REGG_LOCAL_VARS",A="MN:REGG_LOCAL_VARS"$ & $LK,"REGG_LOCAL_NON_PTR_VARS",A="MN:REGG_LOCAL_NON_PTR_VARS"$
|
||||
MOV RCX,10
|
||||
@@05: MOV RAX,RCX
|
||||
CALL PUT_HEX_U8
|
||||
|
||||
@@ -8,7 +8,7 @@ asm {
|
||||
_BUZZ_FIZZ::
|
||||
PUSH RBP
|
||||
MOV RBP,RSP //Always set-up stk frame. (Stack Gets Traced)
|
||||
PUSH RSI //See $LK,"REGG_C_LOCAL_VARS",A="MN:REGG_C_LOCAL_VARS"$ & $LK,"REGG_C_LOCAL_NON_PTR_VARS",A="MN:REGG_C_LOCAL_NON_PTR_VARS"$
|
||||
PUSH RSI //See $LK,"REGG_LOCAL_VARS",A="MN:REGG_LOCAL_VARS"$ & $LK,"REGG_LOCAL_NON_PTR_VARS",A="MN:REGG_LOCAL_NON_PTR_VARS"$
|
||||
PUSH RDI
|
||||
MOV RSI,FIZZ_SPAN-RANGE_START%FIZZ_SPAN+1
|
||||
MOV RDI,BUZZ_SPAN-RANGE_START%BUZZ_SPAN+1
|
||||
@@ -35,7 +35,7 @@ _BUZZ_FIZZ::
|
||||
CALL PUT_CHARS
|
||||
POP RAX
|
||||
INC RAX
|
||||
CMP RAX,RANGE_END //Actually only a 32-bit instruction.
|
||||
CMP RAX,RANGE_END //Actually only a 32-bit inst.
|
||||
JBE @@05
|
||||
|
||||
POP RDI
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*When I was a kid with a Commodore 64,
|
||||
the 6502 chip had no multiply instruction
|
||||
the 6502 chip had no multiply inst
|
||||
and this is how we had to do it, except,
|
||||
I used more regs in this example.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ PUT_DEC_U64::
|
||||
//but this function will be nice for ASM callers if it saves all regs.
|
||||
PUSH_C_REGS
|
||||
|
||||
PUSH RSI //See $LK,"REGG_C_LOCAL_VARS",A="MN:REGG_C_LOCAL_VARS"$&$LK,"REGG_C_LOCAL_NON_PTR_VARS",A="MN:REGG_C_LOCAL_NON_PTR_VARS"$
|
||||
PUSH RSI //See $LK,"REGG_LOCAL_VARS",A="MN:REGG_LOCAL_VARS"$&$LK,"REGG_LOCAL_NON_PTR_VARS",A="MN:REGG_LOCAL_NON_PTR_VARS"$
|
||||
LEA RSI,-1[RBP] //Load addr of end of buffer.
|
||||
//We picked RSI because of PUT_STR
|
||||
//We'll move bwd
|
||||
|
||||
+2
-2
@@ -6,8 +6,8 @@ U0 Directives()
|
||||
"Dir :%s\n",__DIR__;
|
||||
"Line :%d\n",__LINE__;
|
||||
"Depth:%d\n",__DEPTH__;
|
||||
"Instruction1:%P:%08X\n",$$,$$;
|
||||
"Instruction2:%P:%08X\n",$$,$$;
|
||||
"Inst1:%P:%08X\n",$$,$$;
|
||||
"Inst2:%P:%08X\n",$$,$$;
|
||||
}
|
||||
|
||||
Directives;
|
||||
@@ -20,7 +20,7 @@ U0 ClickCallBack()
|
||||
//Flags are explained here:
|
||||
//$LK,"::/Doc/DolDocOverview.TXT"$ $LK,"::/Doc/Widget.TXT"$
|
||||
//$LK,"Dollar Flags",A="MN:DOCEf_TAG"$ $LK,"ST_DOC_FLAGS",A="FF:::/Adam/DolDoc/DocInit.CPP,ST_DOC_FLAGS"$
|
||||
"(Not preserved when <CTRL-t> and back.)\n\n";
|
||||
"(Not preserved if you press <CTRL-t>.)\n\n";
|
||||
doc_e->left_cb=&MyLeftCB1;
|
||||
DocUnlock(DocPut);
|
||||
}
|
||||
@@ -32,15 +32,16 @@ I64 MyLeftCB2(CDoc *,CDocEntry *)
|
||||
return cnts.jiffies;
|
||||
}
|
||||
|
||||
U0 PopUpJiffiesCallBack()
|
||||
U0 PopUpJiffiesCallBack(I64 i)
|
||||
{
|
||||
CDoc *doc=DocNew;
|
||||
CDocEntry *doc_e=DocPrint(doc,"\n\n\n$$BT+LC,\"Jiffies\"$$\n\n\n");
|
||||
CDocEntry *doc_e=DocPrint(doc,
|
||||
"Click %d more times\n\n\n$$BT+LC,\"Jiffies\"$$\n\n\n",i);
|
||||
doc_e->left_cb=&MyLeftCB2;
|
||||
"Current Jiffies:%d\n",PopUpMenu(doc);
|
||||
DocDel(doc);
|
||||
}
|
||||
|
||||
PopUpJiffiesCallBack;
|
||||
PopUpJiffiesCallBack;
|
||||
PopUpJiffiesCallBack;
|
||||
PopUpJiffiesCallBack(3);
|
||||
PopUpJiffiesCallBack(2);
|
||||
PopUpJiffiesCallBack(1);
|
||||
+7
-10
@@ -1,15 +1,12 @@
|
||||
class FDStruct
|
||||
{//Use <CTRL-l> and select "Data" to generate the fmtstrs
|
||||
|
||||
//The number is the field from after the ':' to the end.
|
||||
//See $LK,"Data Tag Width",A="FA:::/Adam/DolDoc/DocPlain.CPP,DataTagWidth"$.
|
||||
|
||||
F64 num1 fmtstr "$$DA-TRM,RT=F64,A=\"F64 1:%12.8f\"$$\n";
|
||||
F64 num2 fmtstr "$$DA-TRM,RT=F64,A=\"F64 2:%12e\"$$\n";
|
||||
I64 num3 fmtstr "$$DA-TRM,A=\"I64 1:0x%016X\"$$\n";
|
||||
I64 num4 fmtstr "$$DA-TRM,A=\"I64 2:%12d\"$$\n";
|
||||
{//Use <CTRL-l> and select "Data", "List" or "Check Box"
|
||||
//to generate the fmtstrs.
|
||||
F64 num1 fmtstr "$$DA-TRM,A=\"Float 1:%12.8f\"$$\n";
|
||||
F64 num2 fmtstr "$$DA-TRM,A=\"Float 2:%12e\"$$\n";
|
||||
I64 num3 fmtstr "$$DA-TRM,A=\"Int 1:0x%016X\"$$\n";
|
||||
I64 num4 fmtstr "$$DA-TRM,A=\"Int 2:%12d\"$$\n";
|
||||
I64 type fmtstr "$$LS,D=\"ST_PERSON_TYPE\"$$\n";
|
||||
U8 name[32] fmtstr "$$DA-P,LEN=31,A=\"Name :%s\"$$\n";
|
||||
U8 name[32] fmtstr "$$DA-P,A=\"Name :%s\"$$\n";
|
||||
U8 *address1 fmtstr "$$DA+M,A=\"Address:%s\"$$\n"; //+M is unlimited len U8 *.
|
||||
U8 *address2 fmtstr "$$DA+M,A=\"Address:%s\"$$\n"; //+M is unlimited len U8 *.
|
||||
CDate datetime fmtstr "$$DA-TRM,A=\"Date :%8D\"$$\n";
|
||||
|
||||
@@ -30,7 +30,7 @@ U0 SrcExample()
|
||||
}
|
||||
|
||||
SrcExample;
|
||||
//See $LK,"::/Demo/ScreenCodes.CPP"$, $LK,"::/Demo/Graphics/CharGraphics.CPP"$,
|
||||
//and $LK,"::/Demo/Graphics/FontEd.CPP"$.
|
||||
//See $LK,"::/Demo/ScreenCodes.CPP"$, $LK,"::/Demo/Graphics/CharAnimation.CPP"$,
|
||||
//$LK,"::/Demo/Games/CharDemo.CPP"$ and $LK,"::/Demo/Graphics/FontEd.CPP"$.
|
||||
|
||||
//See $LK,"chars_bmp_alpha",A="MN:chars_bmp_alpha"$ and $LK,"chars_bmp_alpha_numeric",A="MN:chars_bmp_alpha_numeric"$.
|
||||
Binary file not shown.
@@ -0,0 +1,191 @@
|
||||
/*
|
||||
Char graphics are how games on the C64 were made. You don't need to do it
|
||||
this way, unless for fun. You can just make device context bigger than
|
||||
the screen and scroll around.
|
||||
|
||||
See $LK,"::/Demo/Games/RawHide.CPP"$ or $LK,"::/Demo/Games/BigGuns.CPP"$.
|
||||
|
||||
The nice thing about character graphics are the animations.
|
||||
*/
|
||||
|
||||
#define MAP_WIDTH (TEXT_COLS*2)
|
||||
#define MAP_HEIGHT (TEXT_ROWS*2)
|
||||
|
||||
#define CH_WATER '^'
|
||||
#define CH_LAND CH_SPACE
|
||||
#define CH_TREE '*'
|
||||
|
||||
U16 map[MAP_HEIGHT][MAP_WIDTH];
|
||||
|
||||
I64 screen_pix_x,screen_pix_y;
|
||||
|
||||
U0 DrawIt(CTask *task,CDC *)
|
||||
{
|
||||
U16 *ptr;
|
||||
I64 i,j,y=screen_pix_y>>3;
|
||||
gr.hide_col=gr.hide_row=TRUE;
|
||||
gr.pan_text_x=7-screen_pix_x&7;
|
||||
gr.pan_text_y=7-screen_pix_y&7;
|
||||
for (i=0;i<task->win_height;i++) {
|
||||
ptr=&map[y++][screen_pix_x>>3];
|
||||
for (j=0;j<task->win_width;j++)
|
||||
//By the time you clip to window and handle Fs->scroll_x,Fs->scroll_y,
|
||||
//it is too much trouble to do raw access to gr.text_base like we do
|
||||
//in $LK,"::/Demo/Games/Maze.CPP"$.
|
||||
TextChar(task,FALSE,j,i,*ptr++);
|
||||
}
|
||||
}
|
||||
|
||||
U8 *old_font=text.font;
|
||||
U64 waves[4]={
|
||||
0x0011AA440011AA44,0x0022558800225588,
|
||||
0x0044AA110044AA11,0x0088552200885522};
|
||||
|
||||
U0 AnimateEndCB()
|
||||
{
|
||||
text.font=old_font;
|
||||
Exit;
|
||||
}
|
||||
|
||||
U0 AnimateTask(I64)
|
||||
{
|
||||
I64 i;
|
||||
U64 *font=MAlloc(256*8);
|
||||
Fs->task_end_cb=&AnimateEndCB;
|
||||
MemCpy(font,text.font,256*8);
|
||||
text.font=font;
|
||||
font[CH_TREE]=0x18187E7E3C3C18;
|
||||
while (TRUE) {
|
||||
font[CH_WATER]=waves[i++&0x3];
|
||||
Sleep(200);
|
||||
WinMgrSync;
|
||||
}
|
||||
}
|
||||
|
||||
U0 ScrollTaskX(I64 sign)
|
||||
{
|
||||
I64 i;
|
||||
for (i=0;i<32;i++) {
|
||||
screen_pix_x=ClampI64(screen_pix_x+sign,0,
|
||||
(MAP_WIDTH-TEXT_COLS+1)*FONT_WIDTH);
|
||||
WinMgrSync;
|
||||
}
|
||||
}
|
||||
|
||||
U0 ScrollTaskY(I64 sign)
|
||||
{
|
||||
I64 i;
|
||||
for (i=0;i<32;i++) {
|
||||
screen_pix_y=ClampI64(screen_pix_y+sign,0,
|
||||
(MAP_HEIGHT-TEXT_ROWS+2)*FONT_HEIGHT);
|
||||
WinMgrSync;
|
||||
}
|
||||
}
|
||||
|
||||
U0 Init()
|
||||
{
|
||||
I64 i,j,x,y;
|
||||
screen_pix_x=(MAP_WIDTH-TEXT_COLS)>>1*FONT_WIDTH;
|
||||
screen_pix_y=(MAP_HEIGHT-TEXT_ROWS)>>1*FONT_HEIGHT;
|
||||
|
||||
MemSetU16(map,CH_WATER+(BLUE<<4+LTBLUE)<<8,MAP_WIDTH*MAP_HEIGHT);
|
||||
for (i=1;i<MAP_WIDTH-1;i++)
|
||||
map[0][i]=map[MAP_HEIGHT-1][i]='Í'+(BLUE<<4+RED)<<8;
|
||||
for (i=1;i<MAP_HEIGHT-1;i++)
|
||||
map[i][0]=map[i][MAP_WIDTH-1]='º'+(BLUE<<4+RED)<<8;
|
||||
map[0][0] ='É'+(BLUE<<4+RED)<<8;
|
||||
map[0][MAP_WIDTH-1] ='»'+(BLUE<<4+RED)<<8;
|
||||
map[MAP_HEIGHT-1][0] ='È'+(BLUE<<4+RED)<<8;
|
||||
map[MAP_HEIGHT-1][MAP_WIDTH-1]='¼'+(BLUE<<4+RED)<<8;
|
||||
|
||||
for (i=0;i<20;i++) {
|
||||
x=MAP_WIDTH*Rand;
|
||||
y=MAP_HEIGHT*Rand;
|
||||
for (j=0;j<1000;j++) {
|
||||
map[y][x]=CH_LAND+(YELLOW<<4+BLACK)<<8;
|
||||
x=ClampI64(x+RandU16%3-1,0,MAP_WIDTH-1);
|
||||
y=ClampI64(y+RandU16%3-1,0,MAP_HEIGHT-1);
|
||||
}
|
||||
}
|
||||
for (i=0;i<100;i++) {
|
||||
do {
|
||||
x=MAP_WIDTH*Rand;
|
||||
y=MAP_HEIGHT*Rand;
|
||||
} while (map[y][x].u8[0]!=CH_LAND);
|
||||
for (j=0;j<100;j++) {
|
||||
map[y][x]=CH_TREE+(YELLOW<<4+GREEN)<<8;
|
||||
x=ClampI64(x+RandU16%3-1,0,MAP_WIDTH-1);
|
||||
y=ClampI64(y+RandU16%3-1,0,MAP_HEIGHT-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
U0 CleanUp()
|
||||
{
|
||||
gr.pan_text_x=gr.pan_text_y=0;
|
||||
gr.hide_col=gr.hide_row=FALSE;
|
||||
}
|
||||
|
||||
U0 CharDemo()
|
||||
{
|
||||
I64 sc;
|
||||
SettingsPush; //See $LK,"SettingsPush",A="MN:SettingsPush"$
|
||||
Fs->text_attr=YELLOW<<4+BLUE;
|
||||
AutoComplete;
|
||||
WinBorder;
|
||||
WinMax;
|
||||
DocCursor;
|
||||
|
||||
MenuPush(
|
||||
"File {"
|
||||
" Abort(,CH_SHIFT_ESC);"
|
||||
" Exit(,CH_ESC);"
|
||||
"}"
|
||||
"Play {"
|
||||
" Restart(,'\n');"
|
||||
" Left(,,SC_CURSOR_LEFT);"
|
||||
" Right(,,SC_CURSOR_RIGHT);"
|
||||
" Up(,,SC_CURSOR_UP);"
|
||||
" Down(,,SC_CURSOR_DOWN);"
|
||||
"}"
|
||||
);
|
||||
Init;
|
||||
Fs->animate_task=Spawn(&AnimateTask,NULL,"Animate",,Fs);
|
||||
Fs->draw_it=&DrawIt;
|
||||
try {
|
||||
while (TRUE) {
|
||||
switch (GetKey(&sc)) {
|
||||
case 0:
|
||||
switch (sc.u8[0]) {
|
||||
case SC_CURSOR_LEFT:
|
||||
Spawn(&ScrollTaskX,-1,"Scroll",,Fs);
|
||||
break;
|
||||
case SC_CURSOR_RIGHT:
|
||||
Spawn(&ScrollTaskX,1,"Scroll",,Fs);
|
||||
break;
|
||||
case SC_CURSOR_UP:
|
||||
Spawn(&ScrollTaskY,-1,"Scroll",,Fs);
|
||||
break;
|
||||
case SC_CURSOR_DOWN:
|
||||
Spawn(&ScrollTaskY,1,"Scroll",,Fs);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case '\n':
|
||||
CleanUp;
|
||||
Init;
|
||||
break;
|
||||
case CH_SHIFT_ESC:
|
||||
case CH_ESC:
|
||||
goto sq_done;
|
||||
}
|
||||
}
|
||||
sq_done: //Don't goto out of try
|
||||
} catch
|
||||
PutExcept;
|
||||
SettingsPop;
|
||||
CleanUp;
|
||||
MenuPop;
|
||||
}
|
||||
|
||||
CharDemo;
|
||||
@@ -27,7 +27,7 @@ RegExeBranch("TempleOS/EagleDive");
|
||||
class Panel
|
||||
{
|
||||
Panel *next;
|
||||
I32 n, //num polygon sides
|
||||
I32 n, //num polygon sides
|
||||
num; //panel number
|
||||
CD3I32 *pts;
|
||||
I64 color,cnt;
|
||||
@@ -49,15 +49,6 @@ $SP,"<1>",BI=1$
|
||||
|
||||
|
||||
I64 critical_section_flag;
|
||||
U0 CriticalSectionStart()
|
||||
{
|
||||
while (LBts(&critical_section_flag,0))
|
||||
Yield;
|
||||
}
|
||||
U0 CriticalSectionEnd()
|
||||
{
|
||||
LBtr(&critical_section_flag,0);
|
||||
}
|
||||
|
||||
/*These are $BK,1$NOT$BK,0$ dealloced after the program ends,
|
||||
but I did them this way for your benefit
|
||||
@@ -181,9 +172,10 @@ U0 MPDoPanels(CTask *task)
|
||||
tempf->p.x=(i+w/2)*MAP_SCALE;
|
||||
tempf->p.y=(j+h/2)*MAP_SCALE;
|
||||
tempf->p.z=l;
|
||||
CriticalSectionStart;
|
||||
while (LBts(&critical_section_flag,0))
|
||||
Yield;
|
||||
QueIns(tempf,fish_root.last);
|
||||
CriticalSectionEnd;
|
||||
LBtr(&critical_section_flag,0);
|
||||
}
|
||||
} else {
|
||||
if (RandI16&1) {
|
||||
@@ -242,11 +234,12 @@ U0 MPDoPanels(CTask *task)
|
||||
}
|
||||
}
|
||||
if (end_ptr) {
|
||||
CriticalSectionStart;
|
||||
while (LBts(&critical_section_flag,0))
|
||||
Yield;
|
||||
if (end_ptr)
|
||||
end_ptr->next=panel_root;
|
||||
panel_root=start_ptr;
|
||||
CriticalSectionEnd;
|
||||
LBtr(&critical_section_flag,0);
|
||||
}
|
||||
LBtr(&mp.init_not_done_flags,Gs->num);
|
||||
}
|
||||
@@ -443,7 +436,7 @@ U0 MPDrawIt(CTask *task,CDC *dc)
|
||||
yy+=y3;
|
||||
}
|
||||
|
||||
if (Gs->num&1) {//alternate left-right,right-left
|
||||
if (Gs->num&1) {//alt left-right,right-left
|
||||
yh2=-yh;
|
||||
xh2=-xh;
|
||||
} else {
|
||||
|
||||
@@ -3,11 +3,9 @@ U8 *old_font=text.font;
|
||||
// See $LK,"::/Kernel/Font8x8.CPP"$, $LK,"::/Demo/ScreenCodes.CPP"$,
|
||||
//$LK,"::/Demo/ExtendedChars.CPP"$, and $LK,"::/Demo/Graphics/FontEd.CPP"$.
|
||||
|
||||
U8 waves[8*4]={
|
||||
0x00,0x11,0xAA,0x44,0x00,0x11,0xAA,0x44,
|
||||
0x00,0x22,0x55,0x88,0x00,0x22,0x55,0x88,
|
||||
0x00,0x44,0xAA,0x11,0x00,0x44,0xAA,0x11,
|
||||
0x00,0x88,0x55,0x22,0x00,0x88,0x55,0x22};
|
||||
U64 waves[4]={
|
||||
0x0011AA440011AA44,0x0022558800225588,
|
||||
0x0044AA110044AA11,0x0088552200885522};
|
||||
|
||||
U0 AnimateEndCB()
|
||||
{
|
||||
@@ -18,12 +16,12 @@ U0 AnimateEndCB()
|
||||
U0 AnimateTask(I64)
|
||||
{
|
||||
I64 i;
|
||||
U8 *font=MAlloc(256*8);
|
||||
U64 *font=MAlloc(256*8);
|
||||
Fs->task_end_cb=&AnimateEndCB;
|
||||
MemCpy(font,text.font,256*8);
|
||||
text.font=font;
|
||||
while (TRUE) {
|
||||
MemCpy(font+CH_SPACE*FONT_HEIGHT,waves+8*(i++&0x3),8);
|
||||
font[CH_SPACE]=waves[i++&0x3];
|
||||
Sleep(100);
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,8 @@ save to a file with this font editor program
|
||||
and cut and paste the code into $LK,"::/Kernel/Font8x8.CPP"$.
|
||||
You will need to recompile Kernel by calling $LK,"MakeOSDrvBootInstall",A="MN:MakeOSDrvBootInstall"$().
|
||||
|
||||
See $LK,"::/Demo/ExtendedChars.CPP"$ and $LK,"::/Demo/ScreenCodes.CPP"$.
|
||||
See $LK,"::/Demo/ExtendedChars.CPP"$, $LK,"::/Demo/Games/CharDemo.CPP"$,
|
||||
$LK,"::/Demo/Graphics/CharAnimation.CPP"$ and $LK,"::/Demo/ScreenCodes.CPP"$.
|
||||
*/
|
||||
|
||||
#define BLOW_UP_CHAR_X (18*FONT_WIDTH)
|
||||
|
||||
@@ -33,7 +33,7 @@ U0 SunMoon()
|
||||
gr.dc->dither_probability_u16=2*i; //U16 can be [0,65535]
|
||||
GrFloodFill(gr.dc,x-0.75*radius,y);
|
||||
|
||||
WinMgrSync; //Typically 30 fps or 33S
|
||||
WinMgrSync; //Typically 30 fps
|
||||
DCFill;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*"Fixed point" means you use integers
|
||||
/*"Fixed point" means you use ints
|
||||
that are scaled by a value. A common
|
||||
example would be using number of pennies
|
||||
instead of dollars with a float.
|
||||
@@ -10,7 +10,7 @@ and my compiler used to do floats poorly.
|
||||
It's a little better.
|
||||
|
||||
I often use 64-bit ints with upper 32-bits
|
||||
as integer and lower 32-bits as fraction.
|
||||
as int and lower 32-bits as fraction.
|
||||
|
||||
See $LK,"::/Demo/SubIntAccess.CPP"$ for how
|
||||
to access upper or lower 32-bits.
|
||||
@@ -29,7 +29,7 @@ U0 Main()
|
||||
t0=tS;
|
||||
for (i=1000000000;i;i--)
|
||||
i_sum+=i_val;
|
||||
"Integer Sum:%.9f Time:%7.3fs\n",i_sum/ToF64(0x100000000),tS-t0;
|
||||
"Int Sum:%.9f Time:%7.3fs\n",i_sum/ToF64(0x100000000),tS-t0;
|
||||
|
||||
f_val= 2.0000002;
|
||||
t0=tS;
|
||||
@@ -47,7 +47,7 @@ U0 DoIt2()
|
||||
"i&0xFFFFFFFF=%X\n",i&0xFFFFFFFF;
|
||||
"i>>32 =%X\n",i>>32;
|
||||
|
||||
/* Standard integer types are declared
|
||||
/* Standard int types are declared
|
||||
with a special compiler feature which
|
||||
allows a structure to be accessed as a
|
||||
whole. That's why the i variable can
|
||||
@@ -87,7 +87,7 @@ DoIt2;
|
||||
/*Program Output$HL,0$$WW+H,1$$FD,1$
|
||||
|
||||
8 Cores 2.660GHz
|
||||
Integer Sum:2000000199.768689408 Time: 0.787s
|
||||
Int Sum:2000000199.768689408 Time: 0.787s
|
||||
Float Sum:2000000225.656126208 Time: 3.918s
|
||||
|
||||
i =123456789ABCDEF0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*"Fixed point" means you use integers
|
||||
/*"Fixed point" means you use ints
|
||||
that are scaled by a value. A common
|
||||
example would be using number of pennies
|
||||
instead of dollars with a float.
|
||||
@@ -9,7 +9,7 @@ floats. It also depends on the compiler
|
||||
and my compiler used to do floats poorly.
|
||||
|
||||
I often use 64-bit ints with upper 32-bits
|
||||
as integer and lower 32-bits as fraction.
|
||||
as int and lower 32-bits as fraction.
|
||||
|
||||
See $LK,"::/Demo/SubIntAccess.CPP"$ for how
|
||||
to access upper or lower 32-bits.
|
||||
|
||||
@@ -11,7 +11,7 @@ $ID,-2$
|
||||
$TR,"Mini Compiler"$
|
||||
$ID,2$For this mini compiler, some things you should know about 64-bit asm:
|
||||
|
||||
* Putting a 0x48, known as the REX byte, in front of an instruction makes it 64-bit size.
|
||||
* Putting a 0x48, known as the REX byte, in front of an inst makes it 64-bit size.
|
||||
|
||||
* "PUSH EAX", "POP EAX" and "XOR EAX,EAX" will behave as 64-bit even without REX because the stk is always 64 bit and because the XOR clears the upper 32-bits.
|
||||
|
||||
@@ -112,7 +112,7 @@ U0 PrsTerm(U8 **_src,U8 **_dst,I64 prec)
|
||||
|
||||
I64 Parse(U8 **_src,U8 **_dst)
|
||||
{//See $LK,"PrsExpression",A="MN:PrsExpression"$().
|
||||
//See $LK,"Opcode Fmts",A="FF:::/Compiler/OpCodes.TXT,IDIV"$ for details on asm instructions.
|
||||
//See $LK,"Opcode Fmts",A="FF:::/Compiler/OpCodes.TXT,IDIV"$ for details on asm insts.
|
||||
I64 i;
|
||||
U8 *dst=*_dst;
|
||||
switch (Lex(_src,&i)) {
|
||||
@@ -204,7 +204,7 @@ U0 Main()
|
||||
|
||||
while (TRUE) {
|
||||
"This will compile an expression\n"
|
||||
"consisting of integers, parentheses\n"
|
||||
"consisting of ints, parentheses\n"
|
||||
"and the operators +,-,* and /.\n";
|
||||
src=GetStr;
|
||||
if (*src) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/*The moral of this story is simple
|
||||
instruction level optimizations
|
||||
inst level optimizations
|
||||
don't matter much on a modern Intel CPU
|
||||
because they convert complex instructions
|
||||
to a stream of RISC instructions.
|
||||
because they convert complex insts
|
||||
to a stream of RISC insts.
|
||||
|
||||
I learned this the hard way when I thought
|
||||
I was greatly improving my compiler by
|
||||
@@ -61,7 +61,7 @@ _WELL_OPTIMIZED3::
|
||||
XOR RAX,RAX
|
||||
MOV RCX,SAMPLES-1
|
||||
@@05: ADD RAX,RCX
|
||||
LOOP @@05 //Instruction sucks in speed, but saves code size.
|
||||
LOOP @@05 //Inst sucks in speed, but saves code size.
|
||||
RET
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/*lock{} is a compiler stmt
|
||||
which places asm LOCK instruction
|
||||
which places asm LOCK inst
|
||||
prefixes on code. Only use it on
|
||||
read-modify-write stmts.
|
||||
It will generate invalid instructions
|
||||
It will generate invalid insts
|
||||
if you misuse it and it will crash.
|
||||
$LK,"U",A="MN:U"$() to see what code was generated.
|
||||
*/
|
||||
|
||||
@@ -1 +1 @@
|
||||
8ý!/Û␍˜?"v¬ùâ°»?äÌq¡À?jAÊ?õŸƒ¶3Í?¬ax“Ø?]¦"Þ?L–o`öÞ?ŠìÁxÅß? Ñ”ìžë?
|
||||
Кь'^╩≥?ЪS■aтд?┤u∙кj^о?*П╗╔y╖р?Пe╒Щё┴з?аhYВвъ?mКc|≤Д?┴-еiU╟Е?в│v÷WбХ?ч/PдAК?
|
||||
@@ -1,11 +1,11 @@
|
||||
//This is sorted.
|
||||
0.256505
|
||||
0.347373
|
||||
0.349509
|
||||
0.367545
|
||||
0.563530
|
||||
0.626343
|
||||
0.703852
|
||||
0.753115
|
||||
0.897487
|
||||
0.941150
|
||||
0.014631
|
||||
0.073055
|
||||
0.074138
|
||||
0.078977
|
||||
0.245686
|
||||
0.393559
|
||||
0.554134
|
||||
0.570852
|
||||
0.856893
|
||||
0.981828
|
||||
@@ -1 +1 @@
|
||||
jAÊ?¬ax“Ø?]¦"Þ?"v¬ùâ°»?äÌq¡À?ŠìÁxÅß?õŸƒ¶3Í?8ý!/Û␍˜?L–o`öÞ? Ñ”ìžë?
|
||||
Þ/PÄAë?‰-ÅiU°å?ðe¢ý£‰Ú?ÁhY÷×ß?×�vŸWÂè?mëc|˜ä?‡u•Ëj^Ï?ëØ'^»™?ÿS”aÔÄ?*ð¨¥y§Ò?
|
||||
@@ -1,11 +1,11 @@
|
||||
//This is unsorted.
|
||||
0.941150
|
||||
0.347373
|
||||
0.626343
|
||||
0.256505
|
||||
0.753115
|
||||
0.367545
|
||||
0.897487
|
||||
0.563530
|
||||
0.703852
|
||||
0.349509
|
||||
0.981828
|
||||
0.554134
|
||||
0.570852
|
||||
0.393559
|
||||
0.014631
|
||||
0.856893
|
||||
0.245686
|
||||
0.074138
|
||||
0.073055
|
||||
0.078977
|
||||
@@ -1,6 +1,6 @@
|
||||
/*TempleOS has a feature that allows
|
||||
access to bytes and words of larger
|
||||
integers.
|
||||
ints.
|
||||
|
||||
See $LK,"U64i union",A="FF:::/Kernel/KernelA.HPP,U64i union"$.
|
||||
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/*Allows you to time instructions.
|
||||
/*Allows you to time insts.
|
||||
Results vary because the CPU does
|
||||
parallel and out-of-order execution.
|
||||
*/
|
||||
@@ -20,7 +20,7 @@ U0 TimeIns()
|
||||
start=GetTSC;
|
||||
for (i=0;i<SAMPLE_SIZE;i++) {
|
||||
#exe {PassTrace(0b10000000000);};
|
||||
//Time these instructions
|
||||
//Time these insts
|
||||
d*=1.00001;
|
||||
#exe {PassTrace(0);};
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ public CDoc *Doc2Html(CDoc *doc_in,U8 *html_header=NULL,U8 *body_header=NULL,
|
||||
"<head>\n"
|
||||
"<meta http-equiv=\"Content-Type\" "
|
||||
"content=\"text/html;charset=US-ASCII\">\n"
|
||||
"<meta name=\"generator\" content=\"$TX,"TempleOS V4.04",D="DD_OS_NAME_VERSION"$\">\n";
|
||||
"<meta name=\"generator\" content=\"$TX,"TempleOS V4.05",D="DD_OS_NAME_VERSION"$\">\n";
|
||||
if (!body_header) body_header=
|
||||
"<body>\n"
|
||||
"<pre style=\"font-family:courier;font-size:10pt\">\n";
|
||||
|
||||
@@ -182,6 +182,7 @@ U0 BlockIPNums(LogStruct *root)
|
||||
BlockedStructAdd(&blocked_root,68<<24+96<<16+100<<8+126);
|
||||
BlockedStructAdd(&blocked_root,68<<24+96<<16+110<<8+213);
|
||||
BlockedStructAdd(&blocked_root,68<<24+96<<16+242<<8+108);
|
||||
BlockedStructAdd(&blocked_root,68<<24+227<<16+61<<8+11);
|
||||
|
||||
//pass 1: collect robot lst
|
||||
while (templg!=root) {
|
||||
|
||||
@@ -584,7 +584,7 @@
|
||||
52.53.176.137 - - [10/Feb/2015:13:44:27 -0800] "GET /files/?D=A HTTP/1.1" 200 1522 "-" "Mozilla/5.0 (compatible; AhrefsBot/5.0; +http://ahrefs.com/robot/)" "www.templeos.org"
|
||||
52.81.208.207 - - [10/Feb/2015:13:45:31 -0800] "GET /Wb/Adam/Gr/GrPrimatives.html HTTP/1.1" 200 743387 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0" "www.templeos.org"
|
||||
130.158.66.124 - - [10/Feb/2015:13:47:09 -0800] "GET /files/BIBLE.TXT HTTP/1.1" 200 4345143 "http://www.templeos.org/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.63 Safari/537.36" "www.templeos.org"
|
||||
150.176.164.55 - - [10/Feb/2015:13:47:55 -0800] "GET /Wb/Demo/Graphics/CharGraphics.html HTTP/1.1" 200 15754 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0" "www.templeos.org"
|
||||
150.176.164.55 - - [10/Feb/2015:13:47:55 -0800] "GET /Wb/Demo/Graphics/CharAnimation.html HTTP/1.1" 200 15754 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0" "www.templeos.org"
|
||||
150.176.164.55 - - [10/Feb/2015:13:51:30 -0800] "GET / HTTP/1.1" 200 6329 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0" "www.templeos.org"
|
||||
150.176.164.55 - - [10/Feb/2015:13:51:58 -0800] "GET /Wb/Home/Web/History.html HTTP/1.1" 200 7745 "http://www.templeos.org/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0" "www.templeos.org"
|
||||
210.63.49.147 - - [10/Feb/2015:13:53:23 -0800] "GET /test/wp-admin/ HTTP/1.1" 404 89 "-" "-" "templeos.org"
|
||||
|
||||
Reference in new issue
Block a user