mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2025-06-07 08:14:48 +00:00
AMAlloc -> ZMAlloc, stmt -> statement
This commit is contained in:
parent
c5fbacdcce
commit
abd611374d
Binary file not shown.
@ -8,6 +8,6 @@ $WW,1$$FG,5$$TX+CX,"Psalmody Help"$$FG$
|
||||
|
||||
* The first line of the $LK,"HolyC",A="FI:::/Doc/HolyC.DD"$ song files is a comment with a category recognized by $LK,"JukeBox",A="FF:::/Apps/Psalmody/JukeBox.HC,JukeBox"$(). The categories are $FG,2$"no nothing"$FG$, $FG,2$"has words"$FG$, $FG,2$"has graphics"$FG$, or $FG,2$"special"$FG$. The third character in the song comment is a digit rating number, shown in $LK,"JukeBox",A="FF:::/Apps/Psalmody/JukeBox.HC,JukeBox"$(). You can set the song rating in $LK,"JukeBox",A="FF:::/Apps/Psalmody/JukeBox.HC,JukeBox"$() by pressing $FG,2$0$FG$-$FG,2$9$FG$. You can request your reward from God by pressing $FG,2$r$FG$. You can press $FG,2$<DEL>$FG$ to delete songs.
|
||||
|
||||
* You can take the $LK,"Play",A="MN:Play"$() stmts out of a song file and place them in your programs. You can also add a song to a document with $FG,2$<CTRL-l>$FG$, but you should do it after pressing $FG,2$<CTRL-t>$FG$ because the clip-insert in $FG,2$<CTRL-l>$FG$ is screwy. See this $SO,"<Song>",A="4qG5EC4BeGG5qCeFD4sB5G4B5G4qG5EC4BeGG5qCeFD4sB5G4B5GqEeEFqE4BeG5FetC4A5GqFCEeEFqE4BeG5FetC4A5GqFC"$ after pressing $FG,2$<CTRL-t>$FG$, now.
|
||||
* You can take the $LK,"Play",A="MN:Play"$() statements out of a song file and place them in your programs. You can also add a song to a document with $FG,2$<CTRL-l>$FG$, but you should do it after pressing $FG,2$<CTRL-t>$FG$ because the clip-insert in $FG,2$<CTRL-l>$FG$ is screwy. See this $SO,"<Song>",A="4qG5EC4BeGG5qCeFD4sB5G4B5G4qG5EC4BeGG5qCeFD4sB5G4B5GqEeEFqE4BeG5FetC4A5GqFCEeEFqE4BeG5FetC4A5GqFC"$ after pressing $FG,2$<CTRL-t>$FG$, now.
|
||||
|
||||
* You can call $LK,"JukeBox",A="FF:::/Apps/Psalmody/JukeBox.HC,JukeBox"$("~/Psalmody"); to play your songs.
|
||||
|
@ -201,7 +201,7 @@ U0 AsmHashLoad()
|
||||
tmpc->raw_type=tmpit->type;
|
||||
Bts(&tmpc->flags,Cf_INTERNAL_TYPE);
|
||||
tmpc->size=tmpit->size;
|
||||
tmpc->str=AStrNew(tmpit->name);
|
||||
tmpc->str=ZStrNew(tmpit->name);
|
||||
HashAdd(tmpc,cmp.asm_hash);
|
||||
cmp.internal_types[tmpc->raw_type]=tmpc;
|
||||
}
|
||||
|
Binary file not shown.
@ -226,7 +226,7 @@ $ID,-5$
|
||||
|
||||
* Add local vars to sym table in $LK,"Debug",A="MN:Debug"$()?
|
||||
|
||||
* Compiler: Prints two error messages for expressions in stmts.
|
||||
* Compiler: Prints two error messages for expressions in statements.
|
||||
|
||||
* $LK,"U",A="MN:U"$() negative byte displacement, neg 32-bit disp.
|
||||
|
||||
@ -289,7 +289,7 @@ $FG,5$$TX+CX,"Committee Needed"$$FG$
|
||||
|
||||
* Import Intel datasheets so we can use links in $LK,"Code",A="FI:::/Kernel/Mem/PageTables.HC"$ for documentation. I tried a PDF-to-text convertor and it wasn't acceptible.
|
||||
|
||||
* Switch stmt with sparse cases? Maybe, ban sparse switch stmts.
|
||||
* Switch stmt with sparse cases? Maybe, ban sparse switch statements.
|
||||
|
||||
* Compiler Optimization: Postpone LocalVar init until last possible moment in case of return.
|
||||
|
||||
@ -344,7 +344,7 @@ $FG,5$$TX+CX,"Inspirational Ideas"$$FG$
|
||||
|
||||
* Std local var names.
|
||||
|
||||
* Ticketmaster format stmts? Overflow "t='*'" and padding character?
|
||||
* Ticketmaster format statements? Overflow "t='*'" and padding character?
|
||||
|
||||
* Move stuff out of $LK,"Kernel",A="FI:::/Kernel/Kernel.PRJ"$ module.
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
//Conway's Game of Life
|
||||
|
||||
CDC *dc[2]; //dbl buf
|
||||
CDC *dc[2]; //double buf
|
||||
I64 cur_dc,;
|
||||
Bool restart;
|
||||
|
||||
|
@ -85,11 +85,11 @@ CCtrl *SliderNew()
|
||||
"(Would crash when code mem was freed.)\n";
|
||||
return NULL;
|
||||
}
|
||||
c=ACAlloc(sizeof(CCtrl));
|
||||
c=ZCAlloc(sizeof(CCtrl));
|
||||
c->win_task=sys_winmgr_task;
|
||||
c->flags=CTRLF_SHOW|CTRLF_CAPTURE_LEFT_MS;
|
||||
c->type=CTRLT_GENERIC;
|
||||
c->state=ACAlloc(sizeof(CSliderState));
|
||||
c->state=ZCAlloc(sizeof(CSliderState));
|
||||
c->draw_it=&DrawCtrlSlider;
|
||||
c->left_click=&LeftClickSlider;
|
||||
c->update_derived_vals=&UpdateDerivedCtrlSlider;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*lock{} is a compiler stmt
|
||||
which places asm LOCK inst
|
||||
prefixes on code.Only use it on
|
||||
read-modify-write stmts.
|
||||
read-modify-write statements.
|
||||
It will generate invalid insts
|
||||
if you misuse it and it will crash.
|
||||
$LK,"U",A="MN:U"$() to see what code was generated.
|
||||
|
@ -162,7 +162,7 @@ $ID,2$There is no distinction between $FG,2$task$FG$, $FG,2$process$FG$ or $FG,2
|
||||
|
||||
Since there is not friendly disk sharing and all tasks have the same address map, it might be accurate to call ZenithOS, "multi-thread/single-process". You run a single application process on $FG,2$Core0$FG$ and it can create threads on the same core or others. If you run multiple processes, it should be safe, but one process will wait until another completely finishes a long disk access.
|
||||
$ID,-2$$TR,"Zenith Task"$
|
||||
$ID,2$This is Zenith, as in Zenith and Eve, the parent of all tasks. Zenith is immortal. The zenith task is created at start-up and appears in the small window at the top beneath the user terminal windows. Since the Zenith task is immortal, on Zenith's heap go all memory objects which you don't want destroyed by any single task's death. When created, Zenith runs the file $LK,"::/StartOS.HC"$. When start-up is finished, the zenith task enters a server mode where it accepts requests from other tasks. The $LK,"Zenith",A="MN:Zenith"$("") routine will make Zenith compile and run text src code. $FG,2$#include$FG$ stmts can be sent to $LK,"Zenith",A="MN:Zenith"$(""), creating system-wide code and data which are immortal.
|
||||
$ID,2$This is Zenith, as in Zenith and Eve, the parent of all tasks. Zenith is immortal. The zenith task is created at start-up and appears in the small window at the top beneath the user terminal windows. Since the Zenith task is immortal, on Zenith's heap go all memory objects which you don't want destroyed by any single task's death. When created, Zenith runs the file $LK,"::/StartOS.HC"$. When start-up is finished, the zenith task enters a server mode where it accepts requests from other tasks. The $LK,"Zenith",A="MN:Zenith"$("") routine will make Zenith compile and run text src code. $FG,2$#include$FG$ statements can be sent to $LK,"Zenith",A="MN:Zenith"$(""), creating system-wide code and data which are immortal.
|
||||
$ID,-2$$TR,"Seth Tasks"$
|
||||
$ID,2$In the Bible, $LK,"Seth",A="BF:Genesis,4:25"$$FG$ is Zenith and Eve's child. Each CPU core has an executive task called $FG,2$Seth$FG$ that is immortal. The Zenith task on $FG,2$Core0$FG$ is also its $FG,2$Seth$FG$ task.
|
||||
$ID,-2$$TR,"Code and Data Heaps"$
|
||||
@ -176,7 +176,7 @@ $ID,2$$FG,2$Ahead-of-Time$FG$ compiling is conventional compilation mode. Do no
|
||||
|
||||
In $FG,2$AOT$FG$ mode, $FG,2$.PRJ$FG$ files are compiled to $FG,2$.BIN$FG$ files, skipping $FG,2$.OBJ$FG$ files. After compiling, $FG,2$.BIN$FG$ files are $LK,"Load",A="MN:Load"$()ed.
|
||||
|
||||
There is no $FG,2$main()$FG$ routine. Instead, stmts outside functions are automatically executed upon loading. There is no way to unload except by killing the task. To invoke $FG,2$AOT Compiled Mode$FG$, $LK,"Comp",A="MN:Comp"$() is used. The $FG,2$Kernel$FG$ module and compiler are made in $FG,2$AOT$FG$ compiled mode. See $LK,"BootHDIns",A="MN:BootHDIns"$() which calls $LK,"MakeAll",A="MN:MakeAll"$() where $LK,"::/Kernel.BIN.C",A="FI:::/Kernel/Kernel.PRJ"$ and $LK,"::/Compiler/Compiler.BIN",A="FI:::/Compiler/Compiler.PRJ"$ are created.
|
||||
There is no $FG,2$main()$FG$ routine. Instead, statements outside functions are automatically executed upon loading. There is no way to unload except by killing the task. To invoke $FG,2$AOT Compiled Mode$FG$, $LK,"Comp",A="MN:Comp"$() is used. The $FG,2$Kernel$FG$ module and compiler are made in $FG,2$AOT$FG$ compiled mode. See $LK,"BootHDIns",A="MN:BootHDIns"$() which calls $LK,"MakeAll",A="MN:MakeAll"$() where $LK,"::/Kernel.BIN.C",A="FI:::/Kernel/Kernel.PRJ"$ and $LK,"::/Compiler/Compiler.BIN",A="FI:::/Compiler/Compiler.PRJ"$ are created.
|
||||
$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"$
|
||||
|
@ -124,7 +124,7 @@ $FG,2$ PUSH RBP
|
||||
LEAVE
|
||||
RET
|
||||
$FG$
|
||||
* The args are removed from the stack with $FG,2$RET1$FG$ stmts.
|
||||
* The args are removed from the stack with $FG,2$RET1$FG$ statements.
|
||||
|
||||
$FG,2$RET1 16 //remove two args$FG$
|
||||
|
||||
|
@ -108,11 +108,11 @@ $FG,2$if (13<=age<20)
|
||||
$FG$$ID,-2$
|
||||
* if you know a switch stmt will not exceed the lowest or highest case values. $FG,2$switch []$FG$ is a little faster because it doesn't check.
|
||||
|
||||
* $FG,2$switch$FG$ stmts always use a jump table. Don't use them with cases with really big, sparse ranges.
|
||||
* $FG,2$switch$FG$ statements always use a jump table. Don't use them with cases with really big, sparse ranges.
|
||||
|
||||
* Allows ranges like "$FG,2$case 4...7:$FG$" in $FG,2$switch$FG$ stmts.
|
||||
* Allows ranges like "$FG,2$case 4...7:$FG$" in $FG,2$switch$FG$ statements.
|
||||
|
||||
* A no case number causes next higher int case in $FG,2$switch$FG$ stmts. See $LK,"::/Demo/NullCase.HC"$.
|
||||
* A no case number causes next higher int case in $FG,2$switch$FG$ statements. See $LK,"::/Demo/NullCase.HC"$.
|
||||
|
||||
$ID,2$$FG,2$I64 i;
|
||||
for (i=0;i<20;i++)
|
||||
@ -207,7 +207,7 @@ $FG$$ID,-2$
|
||||
|
||||
* You can use $LK,"Option",A="MN:Option"$($LK,"OPTf_WARN_PAREN",A="MN:OPTf_WARN_PAREN"$,ON) to find unnecessary parentheses in code.
|
||||
|
||||
* You can use $LK,"Option",A="MN:Option"$($LK,"OPTf_WARN_DUP_TYPES",A="MN:OPTf_WARN_DUP_TYPES"$,ON) to find dup local var type stmts.
|
||||
* You can use $LK,"Option",A="MN:Option"$($LK,"OPTf_WARN_DUP_TYPES",A="MN:OPTf_WARN_DUP_TYPES"$,ON) to find dup local var type statements.
|
||||
|
||||
* With the $FG,2$#exe{}$FG$ feature in your src code, you can place programs that insert text into the stream of code being compiled. See $LK,"#exe {}",A="FF:::/Kernel/KMain.HC,#exe {"$ for an example where the date/time and compile-time prompting for cfguration data is placed into a program. $LK,"StreamPrint",A="MN:StreamPrint"$() places text into a src program stream following the conclusion of the $FG,2$#exe{}$FG$ blk.
|
||||
|
||||
|
@ -6,7 +6,7 @@ In ZenithOS, the lowest 2Gig of memory is called the $FG,2$code heap$FG$. Zenit
|
||||
|
||||
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.
|
||||
|
||||
Memory alloced by a task will be freed when the task is killed. The $LK,"Zenith Task",A="FF:::/Doc/Glossary.DD,Zenith Task"$ is a task that never dies. His memory is like kernel memory in other operating systems. See $LK,"ACAlloc",A="MN:ACAlloc"$(), $LK,"AMAlloc",A="MN:AMAlloc"$(), $LK,"AMAllocIdent",A="MN:AMAllocIdent"$() and $LK,"AStrNew",A="MN:AStrNew"$().
|
||||
Memory alloced by a task will be freed when the task is killed. The $LK,"Zenith Task",A="FF:::/Doc/Glossary.DD,Zenith Task"$ is a task that never dies. His memory is like kernel memory in other operating systems. See $LK,"ZCAlloc",A="MN:ZCAlloc"$(), $LK,"ZMAlloc",A="MN:ZMAlloc"$(), $LK,"ZMAllocIdent",A="MN:ZMAllocIdent"$() and $LK,"ZStrNew",A="MN:ZStrNew"$().
|
||||
|
||||
All of the regular page tables are marked, "cached". When accessing hardware, however, you need uncached page table. The lowest 4Gig addresses have an alias to access hardware located toward the top of mapped space, $FG,2$0x$TX,"01AA000000",D="DD_UNCACHED_ALIAS"$$FG$. See $LK,"dev.uncached_alias",A="FF:::/Kernel/KMain.HC,dev.uncached_alias"$.
|
||||
|
||||
|
@ -10,7 +10,7 @@ $LK,"OPTf_WARN_UNUSED_VAR",A="MN:OPTf_WARN_UNUSED_VAR"$ warning if unused var.
|
||||
|
||||
$LK,"OPTf_WARN_PAREN",A="MN:OPTf_WARN_PAREN"$ warning if parenthesis are not needed.
|
||||
|
||||
$LK,"OPTf_WARN_DUP_TYPES",A="MN:OPTf_WARN_DUP_TYPES"$ warning if dup local var type stmts.
|
||||
$LK,"OPTf_WARN_DUP_TYPES",A="MN:OPTf_WARN_DUP_TYPES"$ warning if dup local var type statements.
|
||||
|
||||
$LK,"OPTf_WARN_HEADER_MISMATCH",A="MN:OPTf_WARN_HEADER_MISMATCH"$ warning if fun header does not match.
|
||||
|
||||
|
@ -20,7 +20,7 @@ A) $LK,"DocBottom",A="MN:DocBottom"$() followed by $LK,"DocClear",A="MN:DocClear
|
||||
|
||||
B) Disable window mgr bttn click checking with $FG,4$Fs->win_inhibit$FG$ set to mask $LK,"WIF_SELF_MS_L",A="MN:WIF_SELF_MS_L"$|$LK,"WIF_FOCUS_TASK_MS_L_D",A="MN:WIF_FOCUS_TASK_MS_L_D"$|$LK,"WIF_SELF_MS_R",A="MN:WIF_SELF_MS_R"$|$LK,"WIF_FOCUS_TASK_MS_R_D",A="MN:WIF_FOCUS_TASK_MS_R_D"$. This inhibits window mgr operations but still generates messages from bttn clicks.
|
||||
$ID,-2$
|
||||
* $FG,2$switch/case$FG$ stmts alloc a single jump table--do not use with wide, sparse ranges of case values.
|
||||
* $FG,2$switch/case$FG$ statements alloc a single jump table--do not use with wide, sparse ranges of case values.
|
||||
|
||||
* Don't do a $FG,2$goto$FG$ out of a $FG,2$try{}$FG$.
|
||||
|
||||
@ -32,7 +32,7 @@ $ID,-2$
|
||||
|
||||
* The assembler's error messages are often off by a line and undefines are cryptic.
|
||||
|
||||
* The last semicolon on the cmd line is converted to a dbl semicolon because the compiler looks ahead before doing a cmd. This normally has no negative effect, but when entering $FG,2$if$FG$ stmts with $FG,2$else$FG$ clauses it presents problems.
|
||||
* The last semicolon on the cmd line is converted to a double semicolon because the compiler looks ahead before doing a cmd. This normally has no negative effect, but when entering $FG,2$if$FG$ statements with $FG,2$else$FG$ clauses it presents problems.
|
||||
|
||||
* You can do a $FG,2$class$FG$ fwd reference by using $FG,2$extern$FG$ on the first declaration, but you can only do ptr references to the $FG,2$class$FG$.
|
||||
|
||||
|
@ -35,7 +35,7 @@ $FG,2$Merge(\"C:/*\",\"D:/*\",\"+r+d\");$FG$ to check my changes.
|
||||
|
||||
* You can permanently disable $FG,2$AutoComplete$FG$ commenting-out $LK,"ACInit",A="FF:/Home/HomeSys.HC,ACInit"$() in $LK,"~/HomeSys.HC",A="FF:/Home/HomeSys.HC,ACInit"$.
|
||||
|
||||
* Boolean expressions $BK,1$not$BK,0$ in $FG,2$if$FG$ stmts don't have short circuit logic and are compiled inefficiently.
|
||||
* Boolean expressions $BK,1$not$BK,0$ in $FG,2$if$FG$ statements don't have short circuit logic and are compiled inefficiently.
|
||||
|
||||
* You can use $LK,"progress1",A="MN:progress1"$-$LK,"progress4",A="MN:progress4"$ in your programs for whatever you like. They're just global vars that are shown on the wallpaper. The original intent was to indicate how far along operations were. There's no coordination, so different apps might interfere. I use them most for debugging--just values easily viewed. See $LK,"::/Demo/Progress.HC"$.
|
||||
|
||||
@ -53,7 +53,7 @@ $FG,2$Merge(\"C:/*\",\"D:/*\",\"+r+d\");$FG$ to check my changes.
|
||||
|
||||
* You can use $LK,"Option",A="MN:Option"$($LK,"OPTf_WARN_PAREN",A="MN:OPTf_WARN_PAREN"$,ON) to find unnecessary parentheses in code.
|
||||
|
||||
* You can use $LK,"Option",A="MN:Option"$($LK,"OPTf_WARN_DUP_TYPES",A="MN:OPTf_WARN_DUP_TYPES"$,ON) to find unnecessary local var type stmts.
|
||||
* You can use $LK,"Option",A="MN:Option"$($LK,"OPTf_WARN_DUP_TYPES",A="MN:OPTf_WARN_DUP_TYPES"$,ON) to find unnecessary local var type statements.
|
||||
|
||||
* $LK,"Option",A="MN:Option"$($LK,"OPTf_ECHO",A="MN:OPTf_ECHO"$,ON) can be placed in $LK,"StartOS.HC",A="FI:::/StartOS.HC"$ to echo start-up scripts.
|
||||
|
||||
|
@ -1,22 +0,0 @@
|
||||
The Temple Operating System
|
||||
|
||||
ZenithOS File Downloads (100% Public Domain)
|
||||
|
||||
ZenithOS is a free, public domain, open source, x86_64, non-preemptive
|
||||
multi-tasking, multi-cored, ring-0-only, single-address-map
|
||||
(identity-mapped), non-networked, PC operating system. Paging is,
|
||||
basically, not used.
|
||||
|
||||
The CIA obsfucates to foil India, China, Russia and Korea. They make
|
||||
things more complicated than necessary. ZenithOS is more simple than
|
||||
necessary. It is obnoxiously simple. If you look at this
|
||||
"Hello World" joke, you can see why I capped the line count of
|
||||
TempleOS at 100,000.
|
||||
|
||||
God said TempleOS must be perfect, so backward compatibility is not
|
||||
promised.
|
||||
|
||||
I, Terry Davis, wrote all 80,849 lines of TempleOS over the last 16.5
|
||||
years, including the 64-bit compiler. I have been a professional
|
||||
operating system developer since 1990 when I worked on Ticketmaster's
|
||||
VAX OS.
|
@ -1,46 +0,0 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=US-ASCII">
|
||||
<meta name="generator" content="ZenithOS V0.10">
|
||||
<style type="text/css">
|
||||
.cF0{color:#000000;background-color:#ffffff;}
|
||||
.cF1{color:#0000aa;background-color:#ffffff;}
|
||||
.cF2{color:#00aa00;background-color:#ffffff;}
|
||||
.cF3{color:#00aaaa;background-color:#ffffff;}
|
||||
.cF4{color:#aa0000;background-color:#ffffff;}
|
||||
.cF5{color:#aa00aa;background-color:#ffffff;}
|
||||
.cF6{color:#aa5500;background-color:#ffffff;}
|
||||
.cF7{color:#aaaaaa;background-color:#ffffff;}
|
||||
.cF8{color:#555555;background-color:#ffffff;}
|
||||
.cF9{color:#5555ff;background-color:#ffffff;}
|
||||
.cFA{color:#55ff55;background-color:#ffffff;}
|
||||
.cFB{color:#55ffff;background-color:#ffffff;}
|
||||
.cFC{color:#ff5555;background-color:#ffffff;}
|
||||
.cFD{color:#ff55ff;background-color:#ffffff;}
|
||||
.cFE{color:#ffff55;background-color:#ffffff;}
|
||||
.cFF{color:#ffffff;background-color:#ffffff;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<pre style="font-family:courier;font-size:10pt">
|
||||
<a name="l1"></a><span class=cF5> </span><a href="http://www.templeos.org"><span class=cF5>The Temple Operating System</span></a><span class=cF0>
|
||||
<a name="l2"></a>
|
||||
<a name="l3"></a></span><a href="http://www.templeos.org/Downloads"><span class=cF4>ZenithOS File Downloads (100% Public Domain)</span></a><span class=cF0>
|
||||
<a name="l4"></a>
|
||||
<a name="l5"></a>ZenithOS is a free, public domain, open source, x86_64, non-preemptive
|
||||
<a name="l6"></a>multi-tasking, multi-cored, ring-0-only, single-address-map (identity-mapped),
|
||||
<a name="l7"></a>non-networked, PC operating system. Paging is, basically, not used.
|
||||
<a name="l8"></a>
|
||||
<a name="l9"></a>The CIA obsfucates to foil India, China, Russia and Korea. They make things
|
||||
<a name="l10"></a>more complicated than necessary. ZenithOS is more simple than necessary. It is
|
||||
<a name="l11"></a>obnoxiously simple. If you look at this </span><a href="http://www.ariel.com.au/jokes/The_Evolution_of_a_Programmer.html"><span class=cF0>"Hello World" joke</span></a><span class=cF0>, you can see why I
|
||||
<a name="l12"></a>capped the line count of TempleOS at 100,000.
|
||||
<a name="l13"></a>
|
||||
<a name="l14"></a>God said TempleOS must be perfect, so backward compatibility is not promised.
|
||||
<a name="l15"></a>
|
||||
<a name="l16"></a>I, Terry Davis, wrote all 80,849 lines of TempleOS over the last 16.5 years,
|
||||
<a name="l17"></a>including the 64-bit compiler. I have been a professional operating system
|
||||
<a name="l18"></a>developer since 1990 when I worked on Ticketmaster's VAX OS.
|
||||
</span></pre></body>
|
||||
</html>
|
@ -1,42 +0,0 @@
|
||||
To a Waterfowl;
|
||||
by William Cullen Bryant
|
||||
|
||||
Whither, 'midst falling dew,
|
||||
While glow the heavens with the last steps of day,
|
||||
Far, through their rosy depths, dost thou pursue
|
||||
Thy solitary way?
|
||||
|
||||
Vainly the fowler's eye
|
||||
Might mark thy distant flight to do thee wrong,
|
||||
As, darkly painted on the crimson sky,
|
||||
Thy figure floats along.
|
||||
|
||||
Seek'st thou the plashy brink
|
||||
Of weedy lake, or marge of river wide,
|
||||
Or where the rocking billows rise and sink
|
||||
On the chafed ocean side?
|
||||
|
||||
There is a Power whose care
|
||||
Teaches thy way along that pathless coast,--
|
||||
The desert and illimitable air,--
|
||||
Lone wandering, but not lost.
|
||||
|
||||
All day thy wings have fann'd
|
||||
At that far height, the cold thin atmosphere:
|
||||
Yet stoop not, weary, to the welcome land,
|
||||
Though the dark night is near.
|
||||
|
||||
And soon that toil shall end,
|
||||
Soon shalt thou find a summer home, and rest,
|
||||
And scream among thy fellows; reed shall bend
|
||||
Soon o'er thy sheltered nest.
|
||||
|
||||
Thou'rt gone, the abyss of heaven
|
||||
Hath swallowed up thy form; yet, on my heart
|
||||
Deeply hath sunk the lesson thou hast given,
|
||||
And shall not soon depart.
|
||||
|
||||
He, who, from zone to zone,
|
||||
Guides through the boundless sky thy certain flight,
|
||||
In the long way that I must tread alone,
|
||||
Will lead my steps aright.
|
Binary file not shown.
@ -1,12 +0,0 @@
|
||||
//This is sorted.
|
||||
0.007753
|
||||
0.013270
|
||||
0.110048
|
||||
0.275205
|
||||
0.482805
|
||||
0.582046
|
||||
0.761686
|
||||
0.838419
|
||||
0.861141
|
||||
0.869789
|
||||
|
Binary file not shown.
@ -1,12 +0,0 @@
|
||||
//This is unsorted.
|
||||
0.110048
|
||||
0.275205
|
||||
0.013270
|
||||
0.007753
|
||||
0.838419
|
||||
0.582046
|
||||
0.869789
|
||||
0.482805
|
||||
0.861141
|
||||
0.761686
|
||||
|
@ -1,93 +0,0 @@
|
||||
$WW+H,1$$WW,0$
|
||||
|
||||
Hits on /index.html
|
||||
'-' is a dup. '+' is not a dup.
|
||||
06/22/17 Dups: 0 Total: 0 Uniques: 0
|
||||
|
||||
|
||||
Hits on /index.html
|
||||
06/22/17 08:
|
||||
06/22/17 09:
|
||||
06/22/17 10:
|
||||
06/22/17 11:
|
||||
06/22/17 12:
|
||||
06/22/17 13:
|
||||
06/22/17 14:
|
||||
06/22/17 15:
|
||||
06/22/17 16:
|
||||
06/22/17 17:
|
||||
06/22/17 18:
|
||||
06/22/17 19:
|
||||
06/22/17 20:
|
||||
06/22/17 21:
|
||||
06/22/17 22:
|
||||
Total:0 Dups:0 Uniques:0
|
||||
|
||||
|
||||
Hits on /index.html
|
||||
|
||||
|
||||
|
||||
File Hits
|
||||
15:/Downloads
|
||||
2:/Downloads/Linux/TOSZ.CPP
|
||||
5:/Downloads/Linux/gw
|
||||
10:/Downloads/ReadMe.TXT
|
||||
5:/Downloads/TOS_Distro.ISO
|
||||
2:/Downloads/TOS_Supplemental1.ISO.C
|
||||
2:/Main170621.JPG
|
||||
5:/Main170622.JPG
|
||||
1:/Pics
|
||||
1:/Pictures
|
||||
51:/TempleOS.html
|
||||
1:/TempleOS406.html
|
||||
1:/TempleOSCD.ISO
|
||||
38:/Videos
|
||||
1:/Videos/170620/01JediMonkDrumSet.MP4
|
||||
1:/Videos/170620/02AdamTheOna.MP4
|
||||
1:/Videos/170620/03HymnBought.MP4
|
||||
1:/Videos/170620/05GlintedPicoBlack.MP4
|
||||
69:/Videos/170621/01WinSomeLoseSome.MP4
|
||||
14:/Videos/170622/01HymnSilently.MP4
|
||||
13:/Videos/170622/02HymnSilentlyGraphics.MP4
|
||||
26:/Videos/170622/03HymnSilentlyDrums.mp4
|
||||
5:/Videos/Hymns/TADHymnSilently.mp4
|
||||
4:/Videos/Hymns/TADHymns03.mp4
|
||||
3:/Videos/Hymns/TADHymns07.mp4
|
||||
19:/Videos/TempleOS/170621CompilerResume.mp4
|
||||
8:/Videos/TempleOS/170621PressRelease.mp4
|
||||
4:/Videos/TempleOS/170621SysTaskIntsDesign.mp4
|
||||
8:/Videos/TempleOS/Games/KeepAway.mp4
|
||||
6:/Videos/TempleOS/Games/X-Caliber.mp4
|
||||
4:/Videos/as
|
||||
|
||||
|
||||
|
||||
Downloads of /TOS_Distro.ISO
|
||||
06/22/17 Dups: 0 Total: 5 Uniques: 5
|
||||
|
||||
|
||||
Downloads of /TOS_Distro.ISO
|
||||
'-' is a dup. '+' is not a dup.
|
||||
06/22/17 08:
|
||||
06/22/17 09:
|
||||
06/22/17 10:
|
||||
06/22/17 11:
|
||||
06/22/17 12:
|
||||
06/22/17 13:
|
||||
06/22/17 14:
|
||||
06/22/17 15:
|
||||
06/22/17 16:
|
||||
06/22/17 17:
|
||||
06/22/17 18:
|
||||
06/22/17 19:
|
||||
06/22/17 20: +
|
||||
06/22/17 21: ++
|
||||
06/22/17 22: ++
|
||||
Total:5 Dups:0 Uniques:5
|
||||
|
||||
|
||||
Downloads of /TOS_Distro.ISO
|
||||
5:http://www.templeos.org/Downloads/
|
||||
|
||||
|
BIN
src/Kernel.BIN.C
BIN
src/Kernel.BIN.C
Binary file not shown.
@ -175,7 +175,7 @@ I64 ATAGetDevId(CBlkDev *bd,F64 timeout,Bool keep_id_record)
|
||||
if (InU8(bd->base0+ATAR0_STAT)&ATAS_ERR)
|
||||
res=BDT_ATAPI;
|
||||
else {
|
||||
id_record=ACAlloc(512);
|
||||
id_record=ZCAlloc(512);
|
||||
if (ATAGetRes(bd,timeout,id_record,512,512,FALSE))
|
||||
res=BDT_ATA;
|
||||
else {
|
||||
|
@ -39,7 +39,7 @@ Bool BlkDevInit(CBlkDev *bd)
|
||||
switch (bd->type) {
|
||||
case BDT_RAM:
|
||||
if (!bd->RAM_disk) {
|
||||
bd->RAM_disk=AMAlloc((bd->max_blk+1)<<BLK_SIZE_BITS);
|
||||
bd->RAM_disk=ZMAlloc((bd->max_blk+1)<<BLK_SIZE_BITS);
|
||||
bd->max_blk=MSize(bd->RAM_disk)>>BLK_SIZE_BITS-1;
|
||||
}
|
||||
drive->fs_type=FSt_REDSEA;
|
||||
@ -74,7 +74,7 @@ Bool BlkDevInit(CBlkDev *bd)
|
||||
if (!bd->file_disk_name) {
|
||||
StrPrint(buf,"%C:/Drive%C.ISO.C",
|
||||
blkdev.boot_drive_let,bd->first_drive_let);
|
||||
bd->file_disk_name=AStrNew(buf);
|
||||
bd->file_disk_name=ZStrNew(buf);
|
||||
}
|
||||
if (bd->max_blk<7)
|
||||
bd->max_blk=7;
|
||||
|
@ -13,8 +13,8 @@ U0 DiskCacheInit(I64 size_in_U8s)
|
||||
blkdev.cache_base=NULL;
|
||||
blkdev.cache_hash_table=NULL;
|
||||
} else {
|
||||
blkdev.cache_ctrl=ACAlloc(offset(CCacheBlk.body));
|
||||
blkdev.cache_base=AMAlloc(size_in_U8s);
|
||||
blkdev.cache_ctrl=ZCAlloc(offset(CCacheBlk.body));
|
||||
blkdev.cache_base=ZMAlloc(size_in_U8s);
|
||||
QueueInit(blkdev.cache_ctrl);
|
||||
|
||||
count=MSize(blkdev.cache_base)/sizeof(CCacheBlk);
|
||||
@ -27,7 +27,7 @@ U0 DiskCacheInit(I64 size_in_U8s)
|
||||
tmpc->blk=0;
|
||||
}
|
||||
|
||||
blkdev.cache_hash_table=AMAlloc(DISK_CACHE_HASH_SIZE*sizeof(U8 *)*2);
|
||||
blkdev.cache_hash_table=ZMAlloc(DISK_CACHE_HASH_SIZE*sizeof(U8 *)*2);
|
||||
for (i=0;i<DISK_CACHE_HASH_SIZE;i++) {
|
||||
tmpc=blkdev.cache_hash_table(U8 *)+i*sizeof(U8 *)*2
|
||||
-offset(CCacheBlk.next_hash);
|
||||
|
@ -2,7 +2,7 @@ U0 HomeSet(U8 *dirname)
|
||||
{//Change home directory.
|
||||
dirname=DirNameAbs(dirname);
|
||||
Free(blkdev.home_dir);
|
||||
blkdev.home_dir=AStrNew(dirname);
|
||||
blkdev.home_dir=ZStrNew(dirname);
|
||||
Free(dirname);
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,7 @@ U0 DriveFATBlkAlloc(CDrive *drive)
|
||||
{
|
||||
DriveCheck(drive);
|
||||
Free(drive->cur_fat_blk);
|
||||
drive->cur_fat_blk=AMAlloc(BLK_SIZE);
|
||||
drive->cur_fat_blk=ZMAlloc(BLK_SIZE);
|
||||
drive->cur_fat_blk_num=0;
|
||||
drive->fat_blk_dirty=0;
|
||||
BlkRead(drive,drive->cur_fat_blk,drive->fat1,1);
|
||||
|
@ -61,7 +61,7 @@ U8 *FileRead(U8 *filename,I64 *_size=NULL,I64 *_attr=NULL)
|
||||
if (!res)
|
||||
PrintErr("File not found: \"%s\".\n",filename);
|
||||
if (res && attr & RS_ATTR_RESIDENT)
|
||||
HashGenericAdd(curname,HTT_FILE,AMAllocIdent(res),size,0,zenith_task);
|
||||
HashGenericAdd(curname,HTT_FILE,ZMAllocIdent(res),size,0,zenith_task);
|
||||
}
|
||||
if (res && attr & RS_ATTR_COMPRESSED) {
|
||||
arc=res;
|
||||
@ -98,12 +98,12 @@ I64 FileWrite(U8 *filename,U8 *fbuf,I64 size,CDate cdt=0,I64 attr=0)
|
||||
if (tmph=HashFind(absname,zenith_task->hash_table,HTT_FILE)) {
|
||||
if (attr & RS_ATTR_RESIDENT) {
|
||||
Free(tmph->user_data0);
|
||||
tmph->user_data0=AMAllocIdent(fbuf);
|
||||
tmph->user_data0=ZMAllocIdent(fbuf);
|
||||
tmph->user_data1=size;
|
||||
} else
|
||||
HashRemDel(tmph,zenith_task->hash_table);
|
||||
} else if (attr & RS_ATTR_RESIDENT)
|
||||
HashGenericAdd(absname,HTT_FILE,AMAllocIdent(fbuf),size,0,zenith_task);
|
||||
HashGenericAdd(absname,HTT_FILE,ZMAllocIdent(fbuf),size,0,zenith_task);
|
||||
DirContextDel(dirc);
|
||||
}
|
||||
Free(absname);
|
||||
|
@ -36,7 +36,7 @@ U0 FAT32Init(CDrive *drive)
|
||||
drive->root_clus=br32.root_clus;
|
||||
DriveFATBlkAlloc(drive);
|
||||
Free(drive->fis);
|
||||
drive->fis=AMAlloc(BLK_SIZE);
|
||||
drive->fis=ZMAlloc(BLK_SIZE);
|
||||
BlkRead(drive,drive->fis,drive->file_system_info_sect,1);
|
||||
if (unlock)
|
||||
DriveUnlock(drive);
|
||||
|
@ -41,7 +41,7 @@ U0 RedSeaFreeListBuild(CDrive *drive)
|
||||
i++;
|
||||
}
|
||||
if (i) {
|
||||
tmpf=AMAlloc(sizeof(CFreeList));
|
||||
tmpf=ZMAlloc(sizeof(CFreeList));
|
||||
tmpf->size=i;
|
||||
tmpf->start=first;
|
||||
QueueInsert(tmpf,drive->last_free);
|
||||
@ -272,7 +272,7 @@ U0 RedSeaFreeClus(CDrive *drive,I64 c,I64 count)
|
||||
tmpf=tmpf->next;
|
||||
}
|
||||
if (!found) {
|
||||
tmpf=AMAlloc(sizeof(CFreeList));
|
||||
tmpf=ZMAlloc(sizeof(CFreeList));
|
||||
tmpf->size=count;
|
||||
tmpf->start=c;
|
||||
QueueInsert(tmpf,drive->last_free);
|
||||
|
@ -330,7 +330,7 @@ U0 FixSet(U8 *filename,I64 line)
|
||||
while (LBts(&sys_semas[SEMA_FIX],0))
|
||||
Yield;
|
||||
Free(dbg.fix_file_line);
|
||||
dbg.fix_file_line=AStrNew(st);
|
||||
dbg.fix_file_line=ZStrNew(st);
|
||||
LBtr(&sys_semas[SEMA_FIX],0);
|
||||
}
|
||||
|
||||
|
@ -42,11 +42,11 @@ CJob *TaskExe(CTask *srv,CTask *master,U8 *data,I64 flags)
|
||||
if (!data || !TaskValidate(srv) || master && !TaskValidate(master) ||
|
||||
srv->popup_task && !Bt(&srv->task_flags,TASKf_FILTER_INPUT))
|
||||
return NULL;
|
||||
res=ACAlloc(sizeof(CJob));
|
||||
res=ZCAlloc(sizeof(CJob));
|
||||
res->master_task=master;
|
||||
res->job_code=JOBT_EXE_STR;
|
||||
res->flags=flags;
|
||||
res->aux_str=AStrNew(data);
|
||||
res->aux_str=ZStrNew(data);
|
||||
res->ctrl=&srv->srv_ctrl;
|
||||
|
||||
PUSHFD
|
||||
@ -79,11 +79,11 @@ CJob *TaskText(CTask *srv,CTask *master,U8 *data,I64 flags)
|
||||
if (!data || !TaskValidate(srv) || master && !TaskValidate(master) ||
|
||||
srv->popup_task && !Bt(&srv->task_flags,TASKf_FILTER_INPUT))
|
||||
return NULL;
|
||||
res=ACAlloc(sizeof(CJob));
|
||||
res=ZCAlloc(sizeof(CJob));
|
||||
res->master_task=master; //in case somebody cares
|
||||
res->job_code=JOBT_TEXT_INPUT;
|
||||
res->flags=flags;
|
||||
res->aux_str=AStrNew(data);
|
||||
res->aux_str=ZStrNew(data);
|
||||
|
||||
PUSHFD
|
||||
task=srv->last_input_filter_task;
|
||||
@ -125,7 +125,7 @@ CJob *TaskMessage(CTask *_srv,CTask *master,
|
||||
if (!TaskValidate(srv) || master && !TaskValidate(master)||
|
||||
srv->popup_task && !Bt(&srv->task_flags,TASKf_FILTER_INPUT))
|
||||
return NULL;
|
||||
tmpc=ACAlloc(sizeof(CJob));
|
||||
tmpc=ZCAlloc(sizeof(CJob));
|
||||
tmpc->master_task=master;
|
||||
tmpc->job_code=JOBT_MESSAGE;
|
||||
tmpc->message_code=AbsI64(message_code); //negative means do a down and up
|
||||
@ -135,7 +135,7 @@ CJob *TaskMessage(CTask *_srv,CTask *master,
|
||||
PUSHFD
|
||||
if (Bt(&sys_semas[SEMA_RECORD_MACRO],0) &&
|
||||
srv!=sys_macro_task && message_code==MESSAGE_KEY_DOWN) {
|
||||
tmpc1=AMAllocIdent(tmpc);
|
||||
tmpc1=ZMAllocIdent(tmpc);
|
||||
CLI
|
||||
QueueInsert(tmpc1,sys_macro_head.last);
|
||||
}
|
||||
@ -444,7 +444,7 @@ U0 ZenithErr(U8 *fmt,...)
|
||||
|
||||
U0 XTalk(CTask *task,U8 *fmt,...)
|
||||
{//Sends text to other task. See $LK,"::/Misc/OSTestSuite.HC"$.
|
||||
U8 *buf=StrPrintJoin(NULL,fmt,argc,argv),*st=AStrNew(buf),
|
||||
U8 *buf=StrPrintJoin(NULL,fmt,argc,argv),*st=ZStrNew(buf),
|
||||
*st2=MStrPrint("\"%%s\",%d;Free(%d);",st,st);
|
||||
TaskText(task,NULL,st2,0);
|
||||
Free(st2);
|
||||
@ -453,7 +453,7 @@ U0 XTalk(CTask *task,U8 *fmt,...)
|
||||
|
||||
U0 XTalkWait(CTask *task,U8 *fmt,...)
|
||||
{//Send text to other task and wait for it to idle.
|
||||
U8 *buf=StrPrintJoin(NULL,fmt,argc,argv),*st=AStrNew(buf),
|
||||
U8 *buf=StrPrintJoin(NULL,fmt,argc,argv),*st=ZStrNew(buf),
|
||||
*st2=MStrPrint("\"%%s\",%d;Free(%d);",st,st);
|
||||
TaskText(task,NULL,st2,0);
|
||||
Free(st2);
|
||||
@ -481,7 +481,7 @@ U0 InFile(U8 *filename)
|
||||
|
||||
U0 In(U8 *fmt,...)
|
||||
{//Send text to own input buffer. See $LK,"::/Demo/AcctExample/TOS/TOSDistro.HC"$.
|
||||
U8 *buf=StrPrintJoin(NULL,fmt,argc,argv),*st=AStrNew(buf);
|
||||
U8 *buf=StrPrintJoin(NULL,fmt,argc,argv),*st=ZStrNew(buf);
|
||||
InStr("\"%%s\",%d;Free(%d);",st,st);
|
||||
Free(buf);
|
||||
}
|
||||
|
@ -9,9 +9,9 @@ U0 SysGlobalsInit()
|
||||
sys_focus_task=Fs;
|
||||
QueueInit(&sys_macro_head);
|
||||
|
||||
blkdev.default_iso_filename =AStrNew(DEFAULT_ISO_FILENAME);
|
||||
blkdev.default_iso_c_filename =AStrNew(DEFAULT_ISO_C_FILENAME);
|
||||
blkdev.tmp_filename =AStrNew("~/Tmp.DD");
|
||||
blkdev.default_iso_filename =ZStrNew(DEFAULT_ISO_FILENAME);
|
||||
blkdev.default_iso_c_filename =ZStrNew(DEFAULT_ISO_C_FILENAME);
|
||||
blkdev.tmp_filename =ZStrNew("~/Tmp.DD");
|
||||
blkdev.dvd_boot_is_good=TRUE;
|
||||
#exe {
|
||||
if (!kernel_cfg->mount_ide_auto_hd_let)
|
||||
|
@ -194,7 +194,7 @@ U0 Sound(I8 ona=0)
|
||||
OutU8(0x61,3|InU8(0x61));
|
||||
}
|
||||
if (!IsDebugMode && screencast.record) {
|
||||
d=ACAlloc(sizeof(CSoundData));
|
||||
d=ZCAlloc(sizeof(CSoundData));
|
||||
d->ona=ona;
|
||||
d->tS=tS;
|
||||
QueueInsert(d,screencast.sound_head.last);
|
||||
@ -210,7 +210,7 @@ Bool ScreenCast(Bool val=ON,Bool just_audio=FALSE,U8 *print_fmt="B:/Tmp/%X.GR")
|
||||
if (val) {
|
||||
if (!(old_val=LBtr(&screencast.record,0))) {
|
||||
Free(screencast.print_fmt);
|
||||
screencast.print_fmt=AStrNew(print_fmt);
|
||||
screencast.print_fmt=ZStrNew(print_fmt);
|
||||
screencast.t0_now=Now;
|
||||
screencast.sound_head.tS=screencast.t0_tS=tS;
|
||||
screencast.sound_head.ona=screencast.ona;
|
||||
|
File diff suppressed because one or more lines are too long
@ -1545,16 +1545,16 @@ public class CAutoCompleteDictGlobals
|
||||
//so it takes effect earlier than you might expect.
|
||||
#define OPTf_ECHO 0x00
|
||||
#define OPTf_TRACE 0x01
|
||||
#define OPTf_WARN_UNUSED_VAR 0x10 //Applied to funs, not stmts
|
||||
#define OPTf_WARN_UNUSED_VAR 0x10 //Applied to funs, not statements
|
||||
#define OPTf_WARN_PAREN 0x11 //Warn unnecessary parens
|
||||
#define OPTf_WARN_DUP_TYPES 0x12 //Warn dup local var type stmts
|
||||
#define OPTf_WARN_DUP_TYPES 0x12 //Warn dup local var type statements
|
||||
#define OPTf_WARN_HEADER_MISMATCH 0x13
|
||||
#define OPTf_EXTERNS_TO_IMPORTS 0x20
|
||||
#define OPTf_KEEP_PRIVATE 0x21
|
||||
#define OPTf_NO_REG_VAR 0x22 //Applied to funs, not stmts
|
||||
#define OPTf_NO_REG_VAR 0x22 //Applied to funs, not statements
|
||||
#define OPTf_GLBLS_ON_DATA_HEAP 0x23
|
||||
//Disable 10-byte float consts for ã,log2_10,log10_2,loge_2
|
||||
#define OPTf_NO_BUILTIN_CONST 0x24 //Applied to funs, not stmts
|
||||
#define OPTf_NO_BUILTIN_CONST 0x24 //Applied to funs, not statements
|
||||
#define OPTf_USE_IMM64 0x25 //Not completely implemented
|
||||
|
||||
#define OPTF_ECHO (1<<OPTf_ECHO)
|
||||
|
@ -87,7 +87,7 @@ public extern Bool WildMatch(U8 *test_str,U8 *wild_str);
|
||||
public extern U8 *CatPrint(U8 *dst,U8 *fmt,...);
|
||||
|
||||
#help_index "Char/Operations;Memory/Zenith Heap"
|
||||
public extern U8 *AStrNew(U8 *buf);
|
||||
public extern U8 *ZStrNew(U8 *buf);
|
||||
|
||||
#help_index "Char/Operations;Memory/Heap"
|
||||
public extern U8 *StrNew(U8 *buf,CTask *mem_task=NULL);
|
||||
@ -555,9 +555,9 @@ public extern I64 RoundI64(I64 num,I64 to);
|
||||
public extern I64 Seed(I64 seed=0,CTask *task=NULL);
|
||||
|
||||
#help_index "Memory/Zenith Heap"
|
||||
public extern U8 *ACAlloc(I64 size);
|
||||
public extern U8 *AMAlloc(I64 size);
|
||||
public extern U8 *AMAllocIdent(U8 *src);
|
||||
public extern U8 *ZCAlloc(I64 size);
|
||||
public extern U8 *ZMAlloc(I64 size);
|
||||
public extern U8 *ZMAllocIdent(U8 *src);
|
||||
|
||||
#help_index "Memory/BlkPool"
|
||||
public extern U0 BlkPoolAdd(CBlkPool *bp,CMemBlk *m,I64 pags);
|
||||
|
@ -71,7 +71,7 @@ CKeyDevEntry *KeyDevAdd(Bool (*fp_put_key)(I64 ch,I64 sc),
|
||||
Bool (*fp_puts)(U8 *st),I64 priority,Bool key_descs=FALSE)
|
||||
{//Places hook in StdOut chain. See $LK,"Keyboard Devices",A="HI:Keyboard Devices/System"$.
|
||||
CKeyDevEntry *tmpk=keydev.put_key_head.last,
|
||||
*tmpk1=ACAlloc(sizeof(CKeyDevEntry));
|
||||
*tmpk1=ZCAlloc(sizeof(CKeyDevEntry));
|
||||
tmpk1->put_key=fp_put_key;
|
||||
tmpk1->put_s=fp_puts;
|
||||
tmpk1->priority=priority;
|
||||
@ -184,13 +184,13 @@ U0 CtrlAltCBSet(U8 ch,U0 (*fp_handler)(I64 sc),
|
||||
|
||||
Free(keydev.ctrl_alt_no_shift_descs[ch]);
|
||||
if (no_shift_desc)
|
||||
keydev.ctrl_alt_no_shift_descs[ch]=AStrNew(no_shift_desc);
|
||||
keydev.ctrl_alt_no_shift_descs[ch]=ZStrNew(no_shift_desc);
|
||||
else
|
||||
keydev.ctrl_alt_no_shift_descs[ch]=NULL;
|
||||
|
||||
Free(keydev.ctrl_alt_shift_descs[ch]);
|
||||
if (shift_desc)
|
||||
keydev.ctrl_alt_shift_descs[ch]=AStrNew(shift_desc);
|
||||
keydev.ctrl_alt_shift_descs[ch]=ZStrNew(shift_desc);
|
||||
else
|
||||
keydev.ctrl_alt_shift_descs[ch]=NULL;
|
||||
|
||||
|
@ -2,7 +2,7 @@ CHeapCtrl *HeapCtrlInit(CHeapCtrl *hc=NULL,CTask *task=NULL,CBlkPool *bp)
|
||||
{//See $LK,"HeapLog",A="MN:HeapLog"$() for an example.
|
||||
//Duplicated for $LK,"Zenith Task",A="FF:::/Kernel/KStart64.HC,CHeapCtrl.bp"$.
|
||||
if (!hc)
|
||||
hc=ACAlloc(sizeof(CHeapCtrl));
|
||||
hc=ZCAlloc(sizeof(CHeapCtrl));
|
||||
hc->hc_signature=HEAP_CTRL_SIGNATURE_VAL;
|
||||
hc->mem_task=task;
|
||||
hc->bp=bp;
|
||||
|
@ -387,7 +387,7 @@ _extern _MHEAP_CTRL CHeapCtrl *MHeapCtrl(U8 *src); //$LK,"CHeapCtrl",A="MN:CHeap
|
||||
_extern _MALLOC U8 *MAlloc(I64 size,CTask *mem_task=NULL); //Alloc memory chunk.
|
||||
//Accepts a $LK,"CTask",A="MN:CTask"$ or $LK,"CHeapCtrl",A="MN:CHeapCtrl"$. NULL allocs off current task's heap.
|
||||
|
||||
U8 *AMAlloc(I64 size)
|
||||
U8 *ZMAlloc(I64 size)
|
||||
{//Alloc memory in Zenith's heap.
|
||||
return MAlloc(size,zenith_task);
|
||||
}
|
||||
@ -399,7 +399,7 @@ U8 *CAlloc(I64 size,CTask *mem_task=NULL)
|
||||
return res;
|
||||
}
|
||||
|
||||
U8 *ACAlloc(I64 size)
|
||||
U8 *ZCAlloc(I64 size)
|
||||
{//Alloc and set to zero memory in Zenith's heap.
|
||||
return CAlloc(size,zenith_task);
|
||||
}
|
||||
@ -415,7 +415,7 @@ U8 *MAllocIdent(U8 *src,CTask *mem_task=NULL)
|
||||
return res;
|
||||
}
|
||||
|
||||
U8 *AMAllocIdent(U8 *src)
|
||||
U8 *ZMAllocIdent(U8 *src)
|
||||
{//Alloc in Zenith's heap, ident copy of heap node.
|
||||
return MAllocIdent(src,zenith_task);
|
||||
}
|
||||
@ -458,7 +458,7 @@ U8 *StrNew(U8 *buf,CTask *mem_task=NULL)
|
||||
return res;
|
||||
}
|
||||
|
||||
U8 *AStrNew(U8 *buf)
|
||||
U8 *ZStrNew(U8 *buf)
|
||||
{//Alloc copy of string in Zenith's heap.
|
||||
return StrNew(buf,zenith_task);
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ Bool Mem32DevIns(CMemRange *tmpmr)
|
||||
if (!tmpmr1->type && tmpmr->base>=tmpmr1->base &&
|
||||
tmpmr->base+tmpmr->size<=tmpmr1->base+tmpmr1->size) {
|
||||
if (tmpmr->base>tmpmr1->base) {
|
||||
tmpmr2=AMAlloc(sizeof(CMemRange));
|
||||
tmpmr2=ZMAlloc(sizeof(CMemRange));
|
||||
tmpmr2->type=MRT_UNUSED;
|
||||
tmpmr2->flags=0;
|
||||
tmpmr2->base=tmpmr1->base;
|
||||
@ -33,7 +33,7 @@ U0 Mem32DevInit()
|
||||
CMemE820 *m20=MEM_E820;
|
||||
|
||||
QueueInit(&dev.mem32_head);
|
||||
tmpmr=AMAlloc(sizeof(CMemRange));
|
||||
tmpmr=ZMAlloc(sizeof(CMemRange));
|
||||
tmpmr->type=MRT_UNUSED;
|
||||
tmpmr->flags=0;
|
||||
//Maybe !!! Change this to 0xF0000000 !!!
|
||||
@ -43,7 +43,7 @@ U0 Mem32DevInit()
|
||||
|
||||
if (m20->type) {
|
||||
while (m20->type) {
|
||||
tmpmr=AMAlloc(sizeof(CMemRange));
|
||||
tmpmr=ZMAlloc(sizeof(CMemRange));
|
||||
tmpmr->type=m20->type;
|
||||
tmpmr->flags=0;
|
||||
tmpmr->base=m20->base;
|
||||
@ -69,7 +69,7 @@ U8 *Mem32DevAlloc(I64 size,I64 alignment)
|
||||
limit=base+size-1;
|
||||
if (!tmpmr1->type &&
|
||||
limit<tmpmr1->base+tmpmr1->size) {
|
||||
tmpmr=AMAlloc(sizeof(CMemRange));
|
||||
tmpmr=ZMAlloc(sizeof(CMemRange));
|
||||
tmpmr->type=MRT_DEV;
|
||||
tmpmr->flags=0;
|
||||
tmpmr->base=base;
|
||||
|
@ -221,9 +221,9 @@ CJob *JobQueue(I64 (*fp_addr)(U8 *data),U8 *data=NULL,
|
||||
CTask *seth;
|
||||
if (!(0<=target_cpu<mp_count))
|
||||
throw('MultCore');
|
||||
tmpc=ACAlloc(sizeof(CJob));
|
||||
tmpc=ZCAlloc(sizeof(CJob));
|
||||
if (aux_str)
|
||||
tmpc->aux_str=AStrNew(aux_str);
|
||||
tmpc->aux_str=ZStrNew(aux_str);
|
||||
tmpc->job_code=job_code;
|
||||
tmpc->addr=fp_addr;
|
||||
tmpc->fun_arg=data;
|
||||
@ -359,7 +359,7 @@ U0 Core0Init()
|
||||
mp_count_initial=mp_count=1;
|
||||
mp_count_lock=0;
|
||||
|
||||
dbg.mp_crash=ACAlloc(sizeof(CMPCrash));
|
||||
dbg.mp_crash=ZCAlloc(sizeof(CMPCrash));
|
||||
|
||||
//Must be in code heap because init code uses 32 bit addr of cpu_struct
|
||||
zenith_task->gs=cpu_structs=
|
||||
|
@ -31,7 +31,7 @@ Message(MESSAGE_KEY_DOWN_UP,0,SC_CURSOR_DOWN|SCF_CTRL);
|
||||
TourPut(
|
||||
"This is a first-person-shooter.\n\n"
|
||||
"There is no \"$$GREEN$$main()$$FG$$\" function in ZenithOS "
|
||||
"programs.Any program stmts outside "
|
||||
"programs.Any program statements outside "
|
||||
"functions get executed when you $$GREEN$$#include$$FG$$ "
|
||||
"them at the command line.\n\n"
|
||||
"The \"$$GREEN$$CastleFrankenstein;$$FG$$\" stmt at the "
|
||||
|
Binary file not shown.
@ -12,7 +12,7 @@ public U0 ACDWordsLoad()
|
||||
if (in_ptr=FileRead(ACD_WORD_FILENAME,&size)) {
|
||||
in_start=in_ptr;
|
||||
Free(acd.word_list);
|
||||
acd.word_list=AMAlloc(size);
|
||||
acd.word_list=ZMAlloc(size);
|
||||
MemCpy(acd.word_list,in_start,size);
|
||||
acd.word_list_size=size;
|
||||
|
||||
@ -21,7 +21,7 @@ public U0 ACDWordsLoad()
|
||||
in_ptr++;
|
||||
if (*in_ptr) {
|
||||
st2=MStrUtil(in_ptr,SUF_TO_UPPER);
|
||||
tmph=ACAlloc(sizeof(CHashGeneric)+StrLen(st2)+1);
|
||||
tmph=ZCAlloc(sizeof(CHashGeneric)+StrLen(st2)+1);
|
||||
StrCpy(tmph+1,st2);
|
||||
Free(st2);
|
||||
in_ptr+=StrLen(in_ptr)+1;
|
||||
@ -48,8 +48,8 @@ CHashAC *ACHashAdd(U8 *w)
|
||||
tmpw->hits++;
|
||||
return tmpw;
|
||||
}
|
||||
tmpw=ACAlloc(sizeof(CHashAC));
|
||||
tmpw->str=AStrNew(w);
|
||||
tmpw=ZCAlloc(sizeof(CHashAC));
|
||||
tmpw->str=ZStrNew(w);
|
||||
tmpw->type=HTT_WORD;
|
||||
tmpw->use_count=1;
|
||||
tmpw->hits=1;
|
||||
|
@ -103,7 +103,7 @@ U0 ACPutChoices(CDoc *focus_l,CDocEntry *doc_e,CTask *focus_task,
|
||||
|
||||
if (!ac.cur_word || StrCmp(ac.cur_word,buf) || force_refresh) {
|
||||
st=ac.cur_word;
|
||||
ac.cur_word=AStrNew(buf);
|
||||
ac.cur_word=ZStrNew(buf);
|
||||
Free(st);
|
||||
ac.num_fillins=0;
|
||||
if (*ac.cur_word)
|
||||
|
@ -171,7 +171,7 @@ public I64 RedSeaISO(U8 *_iso_filename=NULL,U8 *_src_dir,
|
||||
|
||||
bd->max_blk=CeilI64(bd->drv_offset+1+bitmap_blks+res,4);
|
||||
bd->max_blk--; //Inclusive.
|
||||
bd->file_disk_name=AStrNew(iso_filename);
|
||||
bd->file_disk_name=ZStrNew(iso_filename);
|
||||
bd->init_root_dir_blks=root_dir_blks;
|
||||
BlkDevAdd(bd,,TRUE,TRUE);
|
||||
StrPrint(buf,"%C:/",drive->drv_let);
|
||||
|
@ -67,7 +67,7 @@ U0 PCILookUpSingle(CDoc *doc,I64 m,I64 d,U8 **_vendor,U8 **_dev)
|
||||
if (Str2I64(buf)==m) {
|
||||
doc_e=doc_e->next->next;
|
||||
if (doc_e->type_u8==DOCT_TEXT) {
|
||||
vendor=AStrNew(doc_e->tag);
|
||||
vendor=ZStrNew(doc_e->tag);
|
||||
first=FALSE;
|
||||
break;
|
||||
}
|
||||
@ -92,7 +92,7 @@ U0 PCILookUpSingle(CDoc *doc,I64 m,I64 d,U8 **_vendor,U8 **_dev)
|
||||
if (Str2I64(buf)==d) {
|
||||
doc_e=doc_e->next->next;
|
||||
if (doc_e->type_u8==DOCT_TEXT) {
|
||||
dev=AStrNew(doc_e->tag);
|
||||
dev=ZStrNew(doc_e->tag);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -110,12 +110,12 @@ U0 PCILookUpSingle(CDoc *doc,I64 m,I64 d,U8 **_vendor,U8 **_dev)
|
||||
if (vendor)
|
||||
*_vendor=vendor;
|
||||
else
|
||||
*_vendor=AStrNew("Unknown");
|
||||
*_vendor=ZStrNew("Unknown");
|
||||
|
||||
if (dev)
|
||||
*_dev=dev;
|
||||
else
|
||||
*_dev=AStrNew("Unknown");
|
||||
*_dev=ZStrNew("Unknown");
|
||||
}
|
||||
|
||||
U0 PCILookUpDevs()
|
||||
@ -131,7 +131,7 @@ U0 PCILookUpDevs()
|
||||
for (f=0;f<8;f++) {
|
||||
w1=PCIReadU16(b,d,f,0);
|
||||
if (w1!=0xFFFF) {
|
||||
tmppci=ACAlloc(sizeof(CPCIDev));
|
||||
tmppci=ZCAlloc(sizeof(CPCIDev));
|
||||
tmppci->bus=b;
|
||||
tmppci->dev=d;
|
||||
tmppci->fun=f;
|
||||
|
@ -1032,7 +1032,7 @@ rc_adjust_xy:
|
||||
(!music.cur_song || StrCmp(music.cur_song,doc_e->aux_str))) {
|
||||
Free(music.cur_song);
|
||||
MusicSettingsReset;
|
||||
music.cur_song=AStrNew(doc_e->aux_str);
|
||||
music.cur_song=ZStrNew(doc_e->aux_str);
|
||||
}
|
||||
}
|
||||
doc->flags|=DOCF_HAS_SONG;
|
||||
|
@ -612,7 +612,7 @@ U0 MeshClipCopy(CMeshFrame *e)
|
||||
MeshClipReset;
|
||||
while (tmpv!=&e->vertex_head) {
|
||||
if (tmpv->flags&VF_SEL) {
|
||||
tmpv->copy=tmpv2=ACAlloc(sizeof(CMeshEdVertex));
|
||||
tmpv->copy=tmpv2=ZCAlloc(sizeof(CMeshEdVertex));
|
||||
MemCpy(&tmpv2->p,&tmpv->p,sizeof(CD3I32));
|
||||
QueueInsert(tmpv2,sys_clip_vertex_head.last);
|
||||
tmpv->flags|=VF_COPIED;
|
||||
@ -626,7 +626,7 @@ U0 MeshClipCopy(CMeshFrame *e)
|
||||
while (tmpt!=&e->tri_head) {
|
||||
if (tmpt->flags&TF_SEL &&
|
||||
tmpt->t[0]->copy && tmpt->t[1]->copy && tmpt->t[2]->copy) {
|
||||
tmpt2=ACAlloc(sizeof(CMeshEdTri));
|
||||
tmpt2=ZCAlloc(sizeof(CMeshEdTri));
|
||||
tmpt2->t[0]=tmpt->t[0]->copy;
|
||||
tmpt2->t[1]=tmpt->t[1]->copy;
|
||||
tmpt2->t[2]=tmpt->t[2]->copy;
|
||||
|
@ -42,7 +42,7 @@ after you have collected data.
|
||||
pf_depth=depth;
|
||||
pf_buf_in_ptr=0;
|
||||
if (!pf_array)
|
||||
pf_array=AMAlloc(sizeof(I64)*PF_ARRAY_COUNT);
|
||||
pf_array=ZMAlloc(sizeof(I64)*PF_ARRAY_COUNT);
|
||||
pf_jiffy_end=pf_jiffy_start=counts.jiffies;
|
||||
LBts(&pf_prof_active,0);
|
||||
cpu_structs[pf_cpu].profiler_timer_irq=&ProfTimerInt;
|
||||
|
Binary file not shown.
@ -95,7 +95,7 @@ U8 Mount2(U8 boot_drive_let,CDoc *_doc,Bool _caller_is_prtdisk)
|
||||
break;
|
||||
case BDT_ISO_FILE_READ:
|
||||
filename2=FileNameAbs(filename);
|
||||
DocPrint(doc,"bd->file_disk_name=AStrNew(\"%s\");\n",filename2);
|
||||
DocPrint(doc,"bd->file_disk_name=ZStrNew(\"%s\");\n",filename2);
|
||||
DocPrint(doc,"bd->drv_offset=19<<2+"
|
||||
"(DVD_BLK_SIZE*2+DVD_BOOT_LOADER_SIZE)/BLK_SIZE;\n");
|
||||
break;
|
||||
@ -151,7 +151,7 @@ public U8 MountFile(U8 *filename)
|
||||
CDrive *drive=DriveMakeFreeSlot(DriveNextFreeLet('M')); //First $LK,"BDT_ISO_FILE_READ",A="MN:BDT_ISO_FILE_READ"$
|
||||
CBlkDev *bd=BlkDevNextFreeSlot(drive->drv_let,BDT_ISO_FILE_READ);
|
||||
bd->drv_offset=19<<2+(DVD_BLK_SIZE*2+DVD_BOOT_LOADER_SIZE)/BLK_SIZE;
|
||||
bd->file_disk_name=AStrNew(filename3);
|
||||
bd->file_disk_name=ZStrNew(filename3);
|
||||
BlkDevAdd(bd,,TRUE,TRUE);
|
||||
Free(filename3);
|
||||
Free(filename2);
|
||||
|
Loading…
x
Reference in New Issue
Block a user