mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-25 15:10:28 +00:00
Rename CosmiC to ZealC.
Rename IC_HOLYC_TYPECAST to IC_POSTFIX_TYPECAST. Add some compiler documentation.
This commit is contained in:
parent
2836d36ca6
commit
827f4d16df
52 changed files with 94 additions and 84 deletions
|
@ -20,7 +20,7 @@ Features in development include:
|
|||
- VBE graphics with variable resolutions
|
||||
- Reformatted code for readability
|
||||
- Added comments and documentation
|
||||
- HolyC -> CosmiC
|
||||
- HolyC -> ZealC
|
||||
- System-wide renaming for clarity
|
||||
|
||||
## Getting started
|
||||
|
|
|
@ -4,9 +4,9 @@ $WW,1$$FG,5$$TX+CX,"Psalmody Help"$$FG$
|
|||
|
||||
* The clip can be used to cut and paste.
|
||||
|
||||
* $FG,2$Psalmody$FG$ uses $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ files as the song format! See $LK,"::/Apps/Psalmody/Examples/prosper.CC"$. The $FG,2$Psalmody$FG$ program does not fully parse the songs when loading them back in, so changes made outside $FG,2$Psalmody$FG$ will be lost, like if you add graphics.
|
||||
* $FG,2$Psalmody$FG$ uses $LK,"ZealC",A="FI:::/Doc/ZealC.DD"$ files as the song format! See $LK,"::/Apps/Psalmody/Examples/prosper.CC"$. The $FG,2$Psalmody$FG$ program does not fully parse the songs when loading them back in, so changes made outside $FG,2$Psalmody$FG$ will be lost, like if you add graphics.
|
||||
|
||||
* The first line of the $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ song files is a comment with a category recognized by $LK,"JukeBox",A="FF:::/Apps/Psalmody/JukeBox.CC,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.CC,JukeBox"$(). You can set the song rating in $LK,"JukeBox",A="FF:::/Apps/Psalmody/JukeBox.CC,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.
|
||||
* The first line of the $LK,"ZealC",A="FI:::/Doc/ZealC.DD"$ song files is a comment with a category recognized by $LK,"JukeBox",A="FF:::/Apps/Psalmody/JukeBox.CC,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.CC,JukeBox"$(). You can set the song rating in $LK,"JukeBox",A="FF:::/Apps/Psalmody/JukeBox.CC,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"$() 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.
|
||||
|
||||
|
|
|
@ -687,7 +687,7 @@ mo_got_message:
|
|||
"$$GREEN$$<SHIFT-ESC>$$FG$$ to load it into Psalmody.\n\n"
|
||||
ST_WARN_ST " Graphics and other embelishments\n"
|
||||
"will be lost because Psalmody can't\n"
|
||||
"parse CosmiC programs completely.\n");
|
||||
"parse ZealC programs completely.\n");
|
||||
Free(filename);
|
||||
filename = NULL;
|
||||
JukeBox(dirname, &filename);
|
||||
|
|
|
@ -55,7 +55,7 @@ CIntermediateStruct intermediate_code_table[IC_ICS_NUM] = {
|
|||
{IS_1_ARG, 0, IST_NULL, FALSE, FALSE, 0, 0, 0, "TO_F64"},
|
||||
{IS_1_ARG, 0, IST_NULL, FALSE, FALSE, 0, 0, 0, "TO_BOOL"},
|
||||
{IS_1_ARG, 0, IST_NULL, FALSE, FALSE, 0, 0, 0, "TOUPPER"},
|
||||
{IS_1_ARG, 1, IST_NULL, FALSE, FALSE, 0, 0, 0, "HOLYC_TYPECAST"},
|
||||
{IS_1_ARG, 1, IST_NULL, FALSE, FALSE, 0, 0, 0, "POSTFIX_TYPECAST"},
|
||||
{IS_1_ARG, 1, IST_NULL, FALSE, TRUE, 0, 0, 0, "ADDR"},
|
||||
{IS_1_ARG, 1, IST_NULL, FALSE, FALSE, 0, 0, 0, "COM"},
|
||||
{IS_1_ARG, 1, IST_NULL, FALSE, FALSE, 0, 0, 0, "NOT"},
|
||||
|
|
|
@ -85,7 +85,7 @@ CAOT *CompJoin(CCompCtrl *cc, I64 comp_flags, U8 *map_name=NULL, U8 mapfile_driv
|
|||
cc->htc.global_hash_table->next = Fs->hash_table;
|
||||
cc->htc.hash_table_list = cc->htc.local_hash_table = HashTableNew(16);
|
||||
cc->htc.local_hash_table->next = cc->htc.global_hash_table;
|
||||
cc->htc.local_var_list = cc->htc.fun; //CosmiC local variables
|
||||
cc->htc.local_var_list = cc->htc.fun; //ZealC local variables
|
||||
cc->htc.fun = NULL;
|
||||
try
|
||||
{
|
||||
|
|
|
@ -97,7 +97,7 @@ U0 StreamDir()
|
|||
}
|
||||
|
||||
CD2I32 *LexD2I32(CCompCtrl *cc, CD2I32 *p)
|
||||
{//Not CosmiC. Sprite-like lex 2D point.
|
||||
{//Not ZealC. Sprite-like lex 2D point.
|
||||
if (cc->token != '(')
|
||||
LexExcept(cc, "Expecting '(' at ");
|
||||
Lex(cc); // Skip (
|
||||
|
@ -114,7 +114,7 @@ CD2I32 *LexD2I32(CCompCtrl *cc, CD2I32 *p)
|
|||
}
|
||||
|
||||
CD3I32 *LexD3I32(CCompCtrl *cc,CD3I32 *p)
|
||||
{//Not CosmiC. Sprite-like lex 3D point.
|
||||
{//Not ZealC. Sprite-like lex 3D point.
|
||||
if (cc->token != '(')
|
||||
LexExcept(cc, "Expecting '(' at ");
|
||||
Lex(cc); // Skip (
|
||||
|
|
|
@ -50,7 +50,7 @@ class CIntermediateStruct
|
|||
#define IC_TO_F64 0x1C
|
||||
#define IC_TO_BOOL 0x1D
|
||||
#define IC_TOUPPER 0x1E
|
||||
#define IC_HOLYC_TYPECAST 0x1F
|
||||
#define IC_POSTFIX_TYPECAST 0x1F
|
||||
|
||||
#define IC_ADDR 0x20
|
||||
#define IC_COM 0x21
|
||||
|
|
|
@ -93,7 +93,7 @@ in int<-->F64 conversions of function args.
|
|||
}
|
||||
break;
|
||||
|
||||
case IC_HOLYC_TYPECAST:
|
||||
case IC_POSTFIX_TYPECAST:
|
||||
if (tmpi1->ic_code == IC_IMM_I64 || tmpi1->ic_code == IC_IMM_F64)
|
||||
{
|
||||
if (tmpi->ic_class->raw_type == RT_F64)
|
||||
|
|
|
@ -539,7 +539,7 @@ here1:
|
|||
case IC_PUSH_CMP:
|
||||
case IC_REG:
|
||||
case IC_COM:
|
||||
case IC_HOLYC_TYPECAST:
|
||||
case IC_POSTFIX_TYPECAST:
|
||||
case IC_NOT:
|
||||
case IC_UNARY_MINUS:
|
||||
case IC_POWER:
|
||||
|
|
|
@ -672,7 +672,7 @@ p4_sib:
|
|||
case IC_RBP:
|
||||
case IC_REG:
|
||||
case IC_COM:
|
||||
case IC_HOLYC_TYPECAST:
|
||||
case IC_POSTFIX_TYPECAST:
|
||||
case IC_NOT:
|
||||
case IC_UNARY_MINUS:
|
||||
case IC_PUSH_CMP:
|
||||
|
|
|
@ -504,7 +504,7 @@ cc->pass == 10 is final pass, code is placed into buf.
|
|||
REG_RAX, tmpi->ic_data, rip2);
|
||||
break;
|
||||
|
||||
case IC_HOLYC_TYPECAST:
|
||||
case IC_POSTFIX_TYPECAST:
|
||||
ICMov(tmpi, tmpi->res.type, tmpi->res.reg, tmpi->res.disp,
|
||||
tmpi->arg1.type, tmpi->arg1.reg, tmpi->arg1.disp, rip2);
|
||||
break;
|
||||
|
|
|
@ -1204,7 +1204,7 @@ I64 ParseUnaryModifier(CCompCtrl *cc, CParseStack *ps, CMemberList **_local_var,
|
|||
tmpc++;
|
||||
tmpi = cc->coc.coc_head.last;
|
||||
tmpi->ic_class = tmpc;
|
||||
ICAdd(cc, IC_HOLYC_TYPECAST, was_paren, tmpc);
|
||||
ICAdd(cc, IC_POSTFIX_TYPECAST, was_paren, tmpc);
|
||||
if (cc->token != ')')
|
||||
LexExcept(cc, "Missing ')' at ");
|
||||
Lex(cc);
|
||||
|
|
|
@ -389,7 +389,7 @@ U0 ParseGlobalVarList(CCompCtrl *cc, I64 saved_mode, CHashClass *saved_tmpc, I64
|
|||
if (cc->token == '=')
|
||||
LexExcept(cc, "Can't init global variable on data heap in AOT module ");
|
||||
tmpg = CAlloc(sizeof(CHashGlobalVar));
|
||||
tmphg = tmpg->heap_global=CAlloc(sizeof(CAOTHeapGlobal));
|
||||
tmphg = tmpg->heap_global = CAlloc(sizeof(CAOTHeapGlobal));
|
||||
tmphg->size = j;
|
||||
tmphg->str = StrNew(st);
|
||||
tmphg->next = aotc->heap_globals;
|
||||
|
|
|
@ -251,7 +251,7 @@ $ID,-5$
|
|||
|
||||
|
||||
$FG,5$$TX+CX,"Committee Needed"$$FG$
|
||||
* Make binary tree look-up using FUN_SEG symbol addresses, so we can eliminate fun_seg cache and wall-paper kludge? All CosmiC functions and global vars would have left-right for address search.
|
||||
* Make binary tree look-up using FUN_SEG symbol addresses, so we can eliminate fun_seg cache and wall-paper kludge? All ZealC functions and global vars would have left-right for address search.
|
||||
|
||||
* Should we get rid of drive mapping. It's ugly.
|
||||
|
||||
|
@ -336,7 +336,7 @@ $FG,5$$TX+CX,"Inspirational Ideas"$$FG$
|
|||
* Make use of flag potential in $LK,"FilesFind",A="MN:FilesFind"$() and possibly $LK,"DirContextNew",A="MN:DirContextNew"$().
|
||||
* Sort options for $LK,"FilesFind",A="MN:FilesFind"$()?
|
||||
|
||||
* New $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ language features?
|
||||
* New $LK,"ZealC",A="FI:::/Doc/ZealC.DD"$ language features?
|
||||
|
||||
* Better $LK,"Debugging",A="HI:Debugging"$?
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ _BEEPS::
|
|||
POP RBP
|
||||
RET1 8 //Use special return. Pop one arg off of stack.
|
||||
|
||||
//CosmiC return values are in RAX. This function has no return value.
|
||||
//ZealC return values are in RAX. This function has no return value.
|
||||
}
|
||||
|
||||
//_extern binds a asm symbol to a function.
|
||||
|
|
Binary file not shown.
|
@ -31,7 +31,7 @@
|
|||
#define IC_TO_F64 0x1B
|
||||
#define IC_TO_BOOL 0x1C
|
||||
#define IC_TOUPPER 0x1D
|
||||
#define IC_HOLYC_TYPECAST 0x1E
|
||||
#define IC_POSTFIX_TYPECAST 0x1E
|
||||
|
||||
#define IC_ADDR 0x1F
|
||||
#define IC_COM 0x20
|
||||
|
|
|
@ -7,7 +7,7 @@ instead of dollars with a float.
|
|||
Fixed-point used to be much $TX,"faster",HTML="http://en.wikipedia.org/wiki/X87"$,
|
||||
but modern processors do well with
|
||||
floats. It also depends on the compiler
|
||||
and the CosmiC compiler is poor with floats.
|
||||
and the ZealC compiler is poor with floats.
|
||||
|
||||
Terry often used 64-bit ints with upper 32-bits
|
||||
as int and lower 32-bits as fraction.
|
||||
|
@ -16,7 +16,7 @@ See $LK,"::/Demo/SubIntAccess.CC"$ for how
|
|||
to access upper or lower 32-bits.
|
||||
|
||||
For a complete list of nonstandard compiler
|
||||
features, see $LK,"::/Doc/CosmiC.DD"$.
|
||||
features, see $LK,"::/Doc/ZealC.DD"$.
|
||||
*/
|
||||
|
||||
U0 Main()
|
||||
|
@ -70,7 +70,7 @@ place i into a register, so there is a
|
|||
penalty.
|
||||
|
||||
For a complete list of nonstandard compiler
|
||||
features, see $LK,"::/Doc/CosmiC.DD"$.
|
||||
features, see $LK,"::/Doc/ZealC.DD"$.
|
||||
*/
|
||||
|
||||
"i.u32[0]\t=%X\n", i.u32[0];
|
||||
|
|
|
@ -7,7 +7,7 @@ instead of dollars with a float.
|
|||
Fixed-point used to be much $TX,"faster",HTML="http://en.wikipedia.org/wiki/X87"$,
|
||||
but modern processors do well with
|
||||
floats. It also depends on the compiler
|
||||
and the CosmiC compiler is poor with floats.
|
||||
and the ZealC compiler is poor with floats.
|
||||
|
||||
Terry often use 64-bit ints with upper 32-bits
|
||||
as int and lower 32-bits as fraction.
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/*The ~/Registry.CC file is CosmiC code.
|
||||
/*The ~/Registry.CC file is ZealC code.
|
||||
You can execute a tree branch of it. The System
|
||||
branch is executed in the System task boot phase.
|
||||
Normally, you will place variable declarations
|
||||
in the branch you make, but since an arthmetic expression
|
||||
is valid in CosmiC you can place simple expressions
|
||||
is valid in ZealC you can place simple expressions
|
||||
without variables.
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
$WW,1$$FG,5$$TX+CX,"ZealOS"$$FG$
|
||||
|
||||
Terry A. Davis wrote all of TempleOS. ZealOS is a fork of TempleOS.
|
||||
|
||||
$FG,5$Websites:$FG$
|
||||
$TX,"www.templeos.org",HTML="https://www.templeos.org"$
|
||||
|
|
|
@ -6,7 +6,7 @@ Here are example instruction formats:
|
|||
$HL,1$ ADD RAX, I64 FS:DISP[RSI + RDI * 8]
|
||||
$HL,0$$HL,1$ ADD RAX, I64 [DISP]
|
||||
$HL,0$
|
||||
$FG,2$$$$FG$ Current compiler output pos (instruction pointer). Even works in CosmiC expressions.
|
||||
$FG,2$$$$FG$ Current compiler output pos (instruction pointer). Even works in ZealC expressions.
|
||||
|
||||
$FG,2$$$$FG$ works in $FG,2$class$FG$es.
|
||||
$FG,2$class MyFun
|
||||
|
|
|
@ -51,7 +51,7 @@ $IV,1$----10/07/21 18:06:15----$IV,0$
|
|||
* Fixed Std Font characters after char 128.
|
||||
* Added links to ZealOS-specific applications in PersonalMenu.
|
||||
* Removed all files from ::/Downloads.
|
||||
* Started initial work integrating SSE instructions into assembler. $MA-X+PU,"See changes here.",LM="Find(\"XMM\", \"::/Compiler/OpCodes.DD\", \"-i\");\"\n\n\";Find(\"XMM\", \"::/Compiler/Asm.CC\", \"-i\");\"\n\";Find(\" == 128\", \"::/Compiler/UAsm.CC\", \"-i\");\"\n\";Find(\"XMM\", \"::/Compiler/UAsm.CC\", \"-i\");\"\n\";Find(\"size_arg_mask[16]\", \"::/Compiler/AsmInit.CC\", \"-i\");\"\n\";Find(\"size_arg_mask[0] = 0xF\", \"::/Compiler/AsmInit.CC\", \"-i\");\"\n\";Find(\"arg_mask[17\", \"::/Kernel/KernelA.HH\", \"-i\");\"\n\";Find(\"SSE\", \"::/Kernel/MultiProc.CC\", \"-i\");View;"$ Only added 2 arg opcodes and only added instructions <= 4 bytes. $TX+IV,"Current bugs"$: unassembling SSE instructions that use non-128-bit vars will incorrectly report U128, MOVHLPS and MOVLHPS 2nd operand is defined XMM128 to hack ModrM order but operands should be XMM XMM, due to MOVSD name clash we define opcode as MOVSD_SSE. $TX+IV,"TODO"$: add CosmiC U128 and XMM register allocation support, find way to ensure 16-byte aligned stack to use aligned SSE instructions.
|
||||
* Started initial work integrating SSE instructions into assembler. $MA-X+PU,"See changes here.",LM="Find(\"XMM\", \"::/Compiler/OpCodes.DD\", \"-i\");\"\n\n\";Find(\"XMM\", \"::/Compiler/Asm.CC\", \"-i\");\"\n\";Find(\" == 128\", \"::/Compiler/UAsm.CC\", \"-i\");\"\n\";Find(\"XMM\", \"::/Compiler/UAsm.CC\", \"-i\");\"\n\";Find(\"size_arg_mask[16]\", \"::/Compiler/AsmInit.CC\", \"-i\");\"\n\";Find(\"size_arg_mask[0] = 0xF\", \"::/Compiler/AsmInit.CC\", \"-i\");\"\n\";Find(\"arg_mask[17\", \"::/Kernel/KernelA.HH\", \"-i\");\"\n\";Find(\"SSE\", \"::/Kernel/MultiProc.CC\", \"-i\");View;"$ Only added 2 arg opcodes and only added instructions <= 4 bytes. $TX+IV,"Current bugs"$: unassembling SSE instructions that use non-128-bit vars will incorrectly report U128, MOVHLPS and MOVLHPS 2nd operand is defined XMM128 to hack ModrM order but operands should be XMM XMM, due to MOVSD name clash we define opcode as MOVSD_SSE. $TX+IV,"TODO"$: add ZealC U128 and XMM register allocation support, find way to ensure 16-byte aligned stack to use aligned SSE instructions.
|
||||
|
||||
$IV,1$----09/21/21 23:35:00----$IV,0$
|
||||
* Raised version number to 1.01.
|
||||
|
@ -471,7 +471,7 @@ $BK,1$* Zenith 1.0 released.$BK,0$
|
|||
* $UL$Renamed all files from .HC -> .CC to reflect language name change.$UL,0$
|
||||
* Renaming:
|
||||
TempleOS -> ZenithOS
|
||||
HolyC -> CosmiC
|
||||
HolyC -> ZealC
|
||||
Adam -> Zenith
|
||||
Seth -> Daemon
|
||||
Chk -> Check
|
||||
|
@ -867,7 +867,7 @@ $IV,1$----07/03/16 04:30:05----$IV,0$
|
|||
* Added $LK,"BDT_ISO_FILE_READ",A="MN:BDT_ISO_FILE_READ"$.
|
||||
|
||||
$IV,1$----07/01/16 05:29:08----$IV,0$
|
||||
* Made underscore mandatory on $LK,"HolyC",A="FI:::/Doc/CosmiC.DD"$ callable asm functions.
|
||||
* Made underscore mandatory on $LK,"HolyC",A="FI:::/Doc/ZealC.DD"$ callable asm functions.
|
||||
|
||||
$IV,1$----06/28/16 13:15:08----$IV,0$
|
||||
* Changed $LK,"TaskRep",A="MN:TaskRep"$() and $LK,"MemRep",A="MN:MemRep"$().
|
||||
|
|
|
@ -8,7 +8,7 @@ $FG,5$$WW,1$$TX+CX,"ZealOS Charter"$$FG$
|
|||
|
||||
* There is a limit of 100,000 lines of code for all time, not including applications and demos. Currently, there are $TX,"95,190",D="DD_ZEALOS_LOC"$ lines of code. $FG,4$3rd party libraries are banned$FG$ because they circumvent the intent of this limit. The vision is a Commodore 64 ROM -- a fixed core API that is the only dependency of applications. Dependency on components and libraries creates a hell that is no longer blissful.
|
||||
|
||||
* The metric for resolving all ZealOS code governance issues is how fast the compiler compiles itself and the kernel with $LK,"BootHDIns",A="MN:BootHDIns"$(). The $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ language should be changed to optimize this metric, as Terry Davis did when he changed type casting from prefix standard C to postfix $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$, but we need a rule to prevent degenerating into a brainfuck language.
|
||||
* The metric for resolving all ZealOS code governance issues is how fast the compiler compiles itself and the kernel with $LK,"BootHDIns",A="MN:BootHDIns"$(). The $LK,"ZealC",A="FI:::/Doc/ZealC.DD"$ language should be changed to optimize this metric, as Terry Davis did when he changed type casting from prefix standard C to postfix $LK,"ZealC",A="FI:::/Doc/ZealC.DD"$, but we need a rule to prevent degenerating into a brainfuck language.
|
||||
|
||||
* Minimal abstraction is a goal. Sheep are fools. They always respect a design that is more complicated than another. Any genius can make it complicated. Like in physics, it takes a supra-genius to make it simple.
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
$WW,1$$FG,5$$TX+CX,"Command Line Overview"$$FG$
|
||||
|
||||
The cmd line feeds into the $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ compiler line-by-line as you type. A statement outside a function executes immediately. Remember to add a semicolon.$WW,1$
|
||||
The cmd line feeds into the $LK,"ZealC",A="FI:::/Doc/ZealC.DD"$ compiler line-by-line as you type. A statement outside a function executes immediately. Remember to add a semicolon.$WW,1$
|
||||
|
||||
Look-up the function headers with $FG,2$AutoComplete$FG$ by hitting $FG,2$<CTRL-SHIFT-F1>$FG$ after typing the first few letters.
|
||||
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
$WW,1$$FG,5$$TX+CX,"Compiler Index"$$FG$
|
||||
|
||||
The compiler lexes and parses code into $LK,"Intermediate Codes",A="FF:::/Compiler/CompilerA.HH,IC_END"$ which are then made into JIT or AOT machine code. The compiler preprocesses during lexing, and optimizes after Intermediate Code generation.
|
||||
|
||||
For parser reference, see $LK,"ParseExpression",A="MN:ParseExpression"$(), $LK,"ParseStatement",A="MN:ParseStatement"$().
|
||||
For Intermediate Code reference, see $LK,"BackLib",A="FI:::/Compiler/BackLib.CC"$, $LK,"Intermediate Code Attributes",A="MN:intermediate_code_table"$, $LK,"Combining Consts",A="FF:::/Compiler/OptPass012.CC,case IC_MUL"$, $LK,"Choosing Reg Vars",A="FF:::/Compiler/OptPass3.CC,cmp.num_reg_vars"$.
|
||||
For machine code backend reference, see $LK,"IC Struct",A="MN:CIntermediateCode"$, $LK,"COCCompile",A="MN:COCCompile"$ and $LK,"OptPass789A",A="FF:::/Compiler/OptPass789A.CC,IC_MUL"$(), $LK,"BackEnd",A="FF:::/Compiler/BackA.CC,ICMul"$.
|
||||
|
||||
$LK,"::/Doc/Asm.DD"$
|
||||
|
||||
$LK,"::/Doc/Directives.DD"$
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
$WW,1$$FG,5$$TX+CX,"Credits"$$FG$
|
||||
|
||||
$FG,2$Terry A. Davis$FG$ wrote all of TempleOS over a span of $FG,2$$TX,"15.0",D="DD_TEMPLEOS_AGE"$$FG$ years (full-time). ZealOS, written over a span of $FG,2$$TX,"2.1",D="DD_ZEALOS_AGE"$$FG$ years, is a fork of ZenithOS, which itself is a fork of TempleOS. It can run on some bare metal 64-bit PC's from about 2007-2019 with no layering, libraries, tools, modules or anything from other sources. Otherwise, you run it in a virtual machine, like $FG,2$VMware$FG$, $FG,2$QEMU$FG$ or $FG,2$VirtualBox$FG$. It is independent and stands alone. 100% of the src code is including on all distro's, from the kernel to the compiler to the boot loaders! It is public domain, not GPL.
|
||||
$FG,2$Terry A. Davis$FG$ wrote all of TempleOS over a span of $FG,2$$TX,"15.0",D="DD_TEMPLEOS_AGE"$$FG$ years (full-time). ZealOS, written over a span of $FG,2$$TX,"2.3",D="DD_ZEALOS_AGE"$$FG$ years, is a fork of TempleOS. It can run on some bare metal 64-bit PC's from about 2007-2019 with no layering, libraries, tools, modules or anything from other sources. Otherwise, you run it in a virtual machine, like $FG,2$VMware$FG$, $FG,2$QEMU$FG$ or $FG,2$VirtualBox$FG$. It is independent and stands alone. 100% of the src code is including on all distro's, from the kernel to the compiler to the boot loaders! It is public domain, not GPL.
|
||||
|
||||
*) $LK,"ATA Reg and Cmd Definitions",A="MN:ATA_NOP"$ are originally from Linux. Later, Terry got the spec.
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
$WW,1$ZealOS has a class for 3 dimensional points consisting of F64s. CosmiC is not C++ -- it does not support passing or returning values from functions which are not 64-bits, therefore, it can't be implemented with operator overloading. Making all function args and returns 64-bit is a core prinicple of ZealOS.
|
||||
$WW,1$ZealOS has a class for 3 dimensional points consisting of F64s. ZealC is not C++ -- it does not support passing or returning values from functions which are not 64-bits, therefore, it can't be implemented with operator overloading. Making all function args and returns 64-bit is a core prinicple of ZealOS.
|
||||
|
||||
As a courtesy, most of the CD3 functions return the address of the destination vect, so you can nestle calls. They do not alloc new space for the destination vect.
|
||||
|
|
|
@ -4,7 +4,7 @@ $WW,1$$FG,5$$TX+CX,"Debugging Overview"$$FG$
|
|||
|
||||
* $LK,"U",A="MN:U"$(&FunName+offset) to unassemble mem or $LK,"Uf",A="MN:Uf"$("FunName") to unassemble a function. $LK,"U",A="MN:U"$($LK,"_RIP",A="MN:_RIP"$-16);
|
||||
|
||||
* While debugging, you specify addresses of assembly routines with just the label, as in $FG,2$_MALLOC+0x20$FG$. You specify $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ function names with $FG,2$&$FG$ before functions as in $FG,2$&Print+0x10$FG$.
|
||||
* While debugging, you specify addresses of assembly routines with just the label, as in $FG,2$_MALLOC+0x20$FG$. You specify $LK,"ZealC",A="FI:::/Doc/ZealC.DD"$ function names with $FG,2$&$FG$ before functions as in $FG,2$&Print+0x10$FG$.
|
||||
|
||||
* You can use $LK,"progress1",A="MN:progress1"$-$LK,"progress4",A="MN:progress4"$ for debugging because they show on the wallpaper. They're just global int variables.
|
||||
|
||||
|
@ -30,7 +30,7 @@ $WW,1$$FG,5$$TX+CX,"Debugging Overview"$$FG$
|
|||
$ID,2$
|
||||
$LK,"Echo",A="MN:Echo"$() turns on or off raw data going into the lexical analyzer.
|
||||
|
||||
$LK,"Trace",A="MN:Trace"$() unassembles code generated from the CosmiC compiler.
|
||||
$LK,"Trace",A="MN:Trace"$() unassembles code generated from the ZealC compiler.
|
||||
|
||||
$LK,"PassTrace",A="MN:PassTrace"$() shows intermediate code coming-out after optimization. The bits ctrl which passes are displayed.
|
||||
$ID,-2$
|
||||
|
|
|
@ -122,29 +122,29 @@ Examples: <CTRL-t> to see
|
|||
$ID,-2$$TR,"BT Button"$
|
||||
$ID,2$See $LK,"::/Demo/DolDoc/MenuBttn.CC"$.
|
||||
$ID,-2$$TR,"DA Data"$
|
||||
$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,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ $FG,2$class$FG$ member's $FG,2$format$FG$ meta-data for $LK,"DocForm",A="MN:DocForm"$(). See $LK,"::/Demo/DolDoc/Form.CC"$, $LK,"::/Demo/Disk/DataBase.CC"$, and $LK,"::/System/DolDoc/DocWidgetWiz.CC"$.
|
||||
$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,"ZealC",A="FI:::/Doc/ZealC.DD"$ $FG,2$class$FG$ member's $FG,2$format$FG$ meta-data for $LK,"DocForm",A="MN:DocForm"$(). See $LK,"::/Demo/DolDoc/Form.CC"$, $LK,"::/Demo/Disk/DataBase.CC"$, and $LK,"::/System/DolDoc/DocWidgetWiz.CC"$.
|
||||
|
||||
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$ address. See $LK,"task_title",A="FF:::/System/DolDoc/DocEd.CC,&Fs->task_title"$.
|
||||
|
||||
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,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ $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,"DocDataFormat",A="MN:DocDataFormat"$() and $LK,"DocDataScan",A="MN:DocDataScan"$().
|
||||
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,"ZealC",A="FI:::/Doc/ZealC.DD"$ $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,"DocDataFormat",A="MN:DocDataFormat"$() and $LK,"DocDataScan",A="MN:DocDataScan"$().
|
||||
|
||||
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,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ $FG,2$class$FG$ member's definition. The length measures starting after the ':' in the $FG,2$A=""$FG$ 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,"ZealC",A="FI:::/Doc/ZealC.DD"$ $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:::/System/DolDoc/DocPlain.CC,DataTagWidth"$.
|
||||
$ID,-2$$TR,"CB Check Box"$
|
||||
$ID,2$Used for forms. Use $FG,2$<CTRL-l>$FG$ to help you generate the DolDoc command text you need in your $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ $FG,2$class$FG$ member's $FG,2$format$FG$ meta-data for $LK,"DocForm",A="MN:DocForm"$(). See $LK,"::/Demo/DolDoc/Form.CC"$$FG$ and $LK,"CEdFindText",A="MN:CEdFindText"$.
|
||||
$ID,2$Used for forms. Use $FG,2$<CTRL-l>$FG$ to help you generate the DolDoc command text you need in your $LK,"ZealC",A="FI:::/Doc/ZealC.DD"$ $FG,2$class$FG$ member's $FG,2$format$FG$ meta-data for $LK,"DocForm",A="MN:DocForm"$(). See $LK,"::/Demo/DolDoc/Form.CC"$$FG$ and $LK,"CEdFindText",A="MN:CEdFindText"$.
|
||||
|
||||
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$ address. See $LK,"task_title",A="FF:::/System/DolDoc/DocEd.CC,&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$. $LK,"DocForm",A="MN:DocForm"$() will automatically reset the raw type to the value from the $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ $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,"DocDataFormat",A="MN:DocDataFormat"$() and $LK,"DocDataScan",A="MN:DocDataScan"$().
|
||||
The default raw data type for the $FG,2$$$CB...$$$FG$ command is $FG,2$RT=I8$FG$ which is $FG,2$Bool$FG$. $LK,"DocForm",A="MN:DocForm"$() will automatically reset the raw type to the value from the $LK,"ZealC",A="FI:::/Doc/ZealC.DD"$ $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,"DocDataFormat",A="MN:DocDataFormat"$() 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$ to help you generate the DolDoc command text you need in your $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ $FG,2$class$FG$ member's $FG,2$format$FG$ meta-data for $LK,"DocForm",A="MN:DocForm"$(). See $LK,"::/Demo/DolDoc/Form.CC"$.
|
||||
$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,"ZealC",A="FI:::/Doc/ZealC.DD"$ $FG,2$class$FG$ member's $FG,2$format$FG$ meta-data for $LK,"DocForm",A="MN:DocForm"$(). See $LK,"::/Demo/DolDoc/Form.CC"$.
|
||||
|
||||
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 address. See $LK,"task_title",A="FF:::/System/DolDoc/DocEd.CC,&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,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ $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,"DocDataFormat",A="MN:DocDataFormat"$() and $LK,"DocDataScan",A="MN:DocDataScan"$().
|
||||
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,"ZealC",A="FI:::/Doc/ZealC.DD"$ $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,"DocDataFormat",A="MN:DocDataFormat"$() 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.
|
||||
|
||||
|
@ -223,7 +223,7 @@ $ID,-2$
|
|||
$TR,"T=\"\" Tag Str"$
|
||||
$ID,2$Some cmds have a tag by default. See $LK,"TX+T",A="FF:::/System/DolDoc/DocInit.CC,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,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ $FG,2$class$FG$ member's definition. The length measures starting after the ':' in the $FG,2$A=""$FG$ format string.
|
||||
$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,"ZealC",A="FI:::/Doc/ZealC.DD"$ $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:::/System/DolDoc/DocPlain.CC,DataTagWidth"$.
|
||||
$ID,-2$$TR,"A=\"\" Auxilliary Str"$
|
||||
|
|
|
@ -19,7 +19,7 @@ $ID,2$$LK,"Bt",A="MN:Bt"$() is $FG,2$bit test$FG$, like the $FG,2$x86$FG$ instru
|
|||
$ID,-2$$TR,"Is 'Fs->' in the code file system?"$
|
||||
$ID,2$$LK,"Fs",A="MN:Fs"$ is a segment register, 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 registers, more or less.
|
||||
$ID,-2$$TR,"Is it Pascal?"$
|
||||
$ID,2$ZealOS uses a dialect of C/C++ called $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$. It is not $FG,2$Pascal$FG$. The syntax was altered making parenthesis optional on function calls with no parameters.
|
||||
$ID,2$ZealOS uses a dialect of C/C++ called $LK,"ZealC",A="FI:::/Doc/ZealC.DD"$. It is not $FG,2$Pascal$FG$. The syntax was altered making parenthesis optional on function calls with no parameters.
|
||||
$ID,-2$$TR,"Why doesn't Sleep() make my laptop hibernate?"$
|
||||
$ID,2$$LK,"Sleep",A="MN:Sleep"$() makes a program pause. It is not hibernation for a laptop.
|
||||
$ID,-2$$TR,"What is Yield() for in loops?"$
|
||||
|
@ -69,7 +69,7 @@ $ID,2$Binary executable files have export symbols which are loaded into the symb
|
|||
$ID,-2$$TR,"Why doesn't assert work?"$
|
||||
$ID,2$$FG,2$#assert$FG$ might print a message at COMPILE time, not run time.
|
||||
$ID,-2$$TR,"Why doesn't C++ public work?"$
|
||||
$ID,2$The word $FG,2$public$FG$ in $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ does very little except allow the $LK,"Help & Index",A="FI:::/Doc/HelpIndex.DD"$ and $LK,"HashTableDump",A="MN:HashTableDump"$() to exclude meaningless symbols. If you wish a full report of public and nonpublic symbols $MA-X+PU,"Click Here",LM="DocMax(1000000);HashTableDump;View;\n"$.
|
||||
$ID,2$The word $FG,2$public$FG$ in $LK,"ZealC",A="FI:::/Doc/ZealC.DD"$ does very little except allow the $LK,"Help & Index",A="FI:::/Doc/HelpIndex.DD"$ and $LK,"HashTableDump",A="MN:HashTableDump"$() to exclude meaningless symbols. If you wish a full report of public and nonpublic symbols $MA-X+PU,"Click Here",LM="DocMax(1000000);HashTableDump;View;\n"$.
|
||||
$ID,-2$$TR,"How does the debugger do source debugging?"$
|
||||
$ID,2$When compilation takes place, the structures used by the compiler stick around. Data on classes can be accessed. See $LK,"ClassRep",A="MN:ClassRep"$().
|
||||
$ID,-2$$TR,"What is ASCII 5 doing in my text files?"$
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
* Free, $FG,2$public domain$FG$, $FG,2$100% open source$FG$.
|
||||
|
||||
* 64-bit $FG,2$compiler/assembler$FG$ for $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$. Truly compiles, doesn't interpret. $FG,2$Just-in-Time$FG$ and $FG,2$Ahead-of-Time$FG$ compilation. With $FG,2$JIT$FG$, no need for object or exe files.
|
||||
* 64-bit $FG,2$compiler/assembler$FG$ for $LK,"ZealC",A="FI:::/Doc/ZealC.DD"$. Truly compiles, doesn't interpret. $FG,2$Just-in-Time$FG$ and $FG,2$Ahead-of-Time$FG$ compilation. With $FG,2$JIT$FG$, no need for object or exe files.
|
||||
|
||||
* No 32-bit krufty code.
|
||||
|
||||
|
|
|
@ -154,8 +154,8 @@ $ID,-2$$TR,"Code and Data Heaps"$
|
|||
$ID,2$ZealOS uses the asm $FG,2$CALL$FG$ instruction, exclusively, and that instruction is limited to calling routines $FG,2$+/-2Gig$FG$ from the current code location. To prevent out-of-range issues, code and data are separated, placing all code within the lowest $FG,2$2Gig$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 global variables, unless the compiler option $LK,"OPTf_GLOBALS_ON_DATA_HEAP",A="MN:OPTf_GLOBALS_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:MemPagAlloc"$ 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$System$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,"CosmiC"$
|
||||
$ID,2$$LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ 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/CosmiC.DD,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,"ZealC"$
|
||||
$ID,2$$LK,"ZealC",A="FI:::/Doc/ZealC.DD"$ 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/ZealC.DD,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.
|
||||
|
||||
|
@ -206,11 +206,11 @@ $ID,2$$FG,5$$FG,5$*.???.C$FG$
|
|||
$FG,5$*.DD$FG$
|
||||
Text Files
|
||||
$FG,5$*.CC$FG$
|
||||
CosmiC src files. The default CosmiC compiler type is $FG,2$.CC$FG$.
|
||||
ZealC src files. The default ZealC compiler type is $FG,2$.CC$FG$.
|
||||
$FG,5$*.PRJ$FG$
|
||||
CosmiC src files to be compiled $FG,2$AOT$FG$.
|
||||
ZealC src files to be compiled $FG,2$AOT$FG$.
|
||||
$FG,5$*.HH$FG$
|
||||
CosmiC src header files.
|
||||
ZealC src header files.
|
||||
$FG,5$*.MAP$FG$
|
||||
Compiler "map" files
|
||||
$FG,5$*.BIN;*.BIN.C$FG$
|
||||
|
@ -220,7 +220,7 @@ $FG,5$*.DATA$FG$
|
|||
$FG,5$*.ISO;*.ISO.C$FG$
|
||||
CD/DVD image file.
|
||||
$FG,5$*.IN$FG$
|
||||
$FG,2$InFile$FG$ Basically a CosmiC program whose stdout goes to the input of a task when $LK,"InFile",A="MN:InFile"$() is called.
|
||||
$FG,2$InFile$FG$ Basically a ZealC program whose stdout goes to the input of a task when $LK,"InFile",A="MN:InFile"$() is called.
|
||||
$FG,5$*.GR$FG$
|
||||
Graphics file
|
||||
|
||||
|
@ -236,10 +236,10 @@ $FG,5$ALL_CAPS$FG$
|
|||
Assembly Language labels are capitalized with underscores between words. So are $FG,2$#define$FG$'s.
|
||||
|
||||
$FG,5$_ALL_CAPS$FG$
|
||||
Asm routines which are $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ callable must have a leading underscore.
|
||||
Asm routines which are $LK,"ZealC",A="FI:::/Doc/ZealC.DD"$ callable must have a leading underscore.
|
||||
|
||||
$FG,5$MixedCaps$FG$
|
||||
$LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ Functions and class names are MixedCaps.
|
||||
$LK,"ZealC",A="FI:::/Doc/ZealC.DD"$ Functions and class names are MixedCaps.
|
||||
|
||||
$FG,5$lower_case$FG$
|
||||
Local function variables and global variables are lower case. Class member names are also lower_case.
|
||||
|
|
|
@ -60,7 +60,7 @@ $FG,5$$TX+CX,"Programming Guidelines"$$FG$
|
|||
|
||||
* There are two modes of compiling, $LK,"AOT Compile Mode",A="FF:::/Doc/Glossary.DD,AOT Compile Mode"$ and $LK,"JIT Compile Mode",A="FF:::/Doc/Glossary.DD,JIT Compile Mode"$. Compilation is done in both -- neither is "interpreted". Use $FG,2$$LK,"JIT Mode",A="FF:::/Doc/Glossary.DD,JIT Compile Mode"$$FG$.
|
||||
|
||||
* $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$
|
||||
* $LK,"ZealC",A="FI:::/Doc/ZealC.DD"$
|
||||
|
||||
* Use $FG,2$I64$FG$ instead of smaller int sizes because the compiler converts everything to 64-bit. Don't use unsigned$FG$ unless it actually breaks. A policy of signed keeps it simple so you don't have to agonize over choices.
|
||||
|
||||
|
@ -94,9 +94,9 @@ $FG,5$$TX+CX,"Hash Sym Tables"$$FG$
|
|||
|
||||
* See $LK,"::/System/Hash.CC"$ for examples of how the hash tables are set-up. Basically, symbols are placed into hash tables and child process hash tables are chained to parents. This provides scopes for variables and functions.
|
||||
|
||||
* $FG,2$sys_task->hash_table$FG$ holds the $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ symbols loaded in on start-up.
|
||||
* $FG,2$sys_task->hash_table$FG$ holds the $LK,"ZealC",A="FI:::/Doc/ZealC.DD"$ symbols loaded in on start-up.
|
||||
|
||||
* $FG,2$Fs->hash_table$FG$ holds user CosmiC symbols and if a symbol is not found, it checks parents. When a duplicate symbol is added to the table, it overshadows the prev symbol. When developing software, typically you include the file at the cmd prompt, make changes and reinclude it. Old symbols are overshadowed but they are still there. Periodically, kill the TASK and start fresh when mem is low. If you wish your applications to free themselves instead of staying in mem, spawn or $LK,"PopUp",A="MN:PopUp"$() a task to run the application and kill it when it's done.
|
||||
* $FG,2$Fs->hash_table$FG$ holds user ZealC symbols and if a symbol is not found, it checks parents. When a duplicate symbol is added to the table, it overshadows the prev symbol. When developing software, typically you include the file at the cmd prompt, make changes and reinclude it. Old symbols are overshadowed but they are still there. Periodically, kill the TASK and start fresh when mem is low. If you wish your applications to free themselves instead of staying in mem, spawn or $LK,"PopUp",A="MN:PopUp"$() a task to run the application and kill it when it's done.
|
||||
|
||||
* To display the contents of a hash table, use the $LK,"HashTableDump",A="MN:HashTableDump"$() routine or the varients. $LK,"HashDepthRep",A="MN:HashDepthRep"$() gives a histogram of how long the chains are, in case you wish to make hash table sizes bigger.
|
||||
|
||||
|
@ -112,7 +112,7 @@ See $LK,"::/Doc/Asm.DD"$.
|
|||
|
||||
* Don't change the segment registers 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,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ compiled code, preserve $FG,2$RBP, RSI, RDI, R10-R15$FG$ because the compiler uses these for register variables. 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"$
|
||||
* When interacting with $LK,"ZealC",A="FI:::/Doc/ZealC.DD"$ compiled code, preserve $FG,2$RBP, RSI, RDI, R10-R15$FG$ because the compiler uses these for register variables. 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"$
|
||||
|
||||
* It is recommended to use the standard stack frame for functions because $LK,"Caller",A="MN:Caller"$() is used to display the call stack, such as for the wallpaper.
|
||||
$FG,2$ PUSH RBP
|
||||
|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
|||
$WW,1$$FG,2$InFiles$FG$ are used to generate user input to automate operations. The ZealOS tour is done with an $FG,2$InFile$FG$. It is akin to a Unix pipe because $FG,2$StdOut$FG$ of one gets chained into $FG,2$StdIn$FG$ of another.
|
||||
|
||||
When an $FG,2$InFile$FG$ runs, a child task is $LK,"Spawn",A="MN:Spawn"$()ed which intercepts real user input and generates fake input. InFiles are $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ programs run by the child whose stdout goes to the parent's input buffer. $LK,"Message",A="MN:Message"$() can be included in an $FG,2$InFile$FG$ to send special keys or mouse cmds to the parent. While an $FG,2$InFile$FG$ is running, the normal input gets diverted to the InFile task and can be filtered and sent back to the parent task. Unless you are driving functions which prompt for data, you can probably use an $FG,2$#include$FG$ file in place of an $FG,2$InFile$FG$.
|
||||
When an $FG,2$InFile$FG$ runs, a child task is $LK,"Spawn",A="MN:Spawn"$()ed which intercepts real user input and generates fake input. InFiles are $LK,"ZealC",A="FI:::/Doc/ZealC.DD"$ programs run by the child whose stdout goes to the parent's input buffer. $LK,"Message",A="MN:Message"$() can be included in an $FG,2$InFile$FG$ to send special keys or mouse cmds to the parent. While an $FG,2$InFile$FG$ is running, the normal input gets diverted to the InFile task and can be filtered and sent back to the parent task. Unless you are driving functions which prompt for data, you can probably use an $FG,2$#include$FG$ file in place of an $FG,2$InFile$FG$.
|
||||
|
||||
See $LK,"::/Demo/InFile/InDir.IN"$.
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ $WW,1$* You run a risk of problems if you do file operations on the same files s
|
|||
|
||||
* Accessing CD/DVD's is flacky. Try $LK,"Drive",A="MN:Drive"$() or $LK,"DiskChange",A="MN:DiskChange"$() twice.
|
||||
|
||||
* You can only $FG,2$extern$FG$ something once. There is a varient called $FG,2$_extern$FG$ which binds a CosmiC definition to a asm symbol. This, too, can only be done once.
|
||||
* You can only $FG,2$extern$FG$ something once. There is a varient called $FG,2$_extern$FG$ which binds a ZealC definition to a asm symbol. This, too, can only be done once.
|
||||
|
||||
* A terminal task has a $LK,"CDoc",A="MN:CDoc"$ document structure that remains active even when you change $FG,4$Fs->draw_it$FG$. To prevent links in the $LK,"CDoc",A="MN:CDoc"$ from being activated when the user clicks in the window, do one of three things:
|
||||
$ID,2$
|
||||
|
|
|
@ -2,4 +2,4 @@ $WW,1$$FG,5$$TX+CX,"Graphic Sprite Resource Help"$$FG$
|
|||
|
||||
A sprite is an ordered list of elements such as lines, rectangles, bitmaps and color changes. In a program's source code, you first $FG,2$make a sprite$FG$ somewhere outside a function. Then, you $FG,2$insert a pointer$FG$ to the sprite as an "*elems" arg when calling $LK,"Sprite",A="MN:Sprite"$() or $LK,"Sprite3",A="MN:Sprite3"$(). See $LK,"Sprites",A="HI:Sprites"$.
|
||||
|
||||
You can create a $FG,2$sprite macro$FG$ on your $LK,"PersonalMenu",A="FI:~/PersonalMenu.DD"$ with a payload of $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ source code to execute when it ESC's back to the cmd line. If you check "Pop-Up", it will spawn a new task and run the payload. A pop-up macro can be placed in any document.
|
||||
You can create a $FG,2$sprite macro$FG$ on your $LK,"PersonalMenu",A="FI:~/PersonalMenu.DD"$ with a payload of $LK,"ZealC",A="FI:::/Doc/ZealC.DD"$ source code to execute when it ESC's back to the cmd line. If you check "Pop-Up", it will spawn a new task and run the payload. A pop-up macro can be placed in any document.
|
||||
|
|
|
@ -107,9 +107,9 @@ $WW,1$
|
|||
|
||||
* All offspring tasks of a task inherit symbols.
|
||||
|
||||
* The $FG,2$sizeof()$FG$ and CosmiC structure members can be used in asm blocks.
|
||||
* The $FG,2$sizeof()$FG$ and ZealC structure members can be used in asm blocks.
|
||||
|
||||
* Using $FG,2$&i$FG$ in $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ or $FG,2$i.u8[2]$FG$ on a local variable, $FG,2$i$FG$, will force it to $FG,2$noreg$FG$.
|
||||
* Using $FG,2$&i$FG$ in $LK,"ZealC",A="FI:::/Doc/ZealC.DD"$ or $FG,2$i.u8[2]$FG$ on a local variable, $FG,2$i$FG$, will force it to $FG,2$noreg$FG$.
|
||||
|
||||
* Using $FG,2$try$FG$/$FG,2$catch$FG$ in a function will force all local variables to $FG,2$noreg$FG$.
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ A three button mouse is like a leg you cannot put weight on. ZealOS just does ha
|
|||
|
||||
* Whole files are processed almost exclusively.
|
||||
|
||||
* $LK,"One language",A="FI:::/Doc/CosmiC.DD"$ and compiler for command-line, scripts, songs, automations and code.
|
||||
* $LK,"One language",A="FI:::/Doc/ZealC.DD"$ and compiler for command-line, scripts, songs, automations and code.
|
||||
|
||||
* One editor/word processor/browser for the command-line window, source code, documentation browser, dialog forms.
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ $FG,2$Merge("C:/","D:/","+r+d");$FG$ to check your changes.
|
|||
|
||||
* You can set your local time zone by setting the $LK,"local_time_offset",A="MN:local_time_offset"$ global variable in a start-up file. Its units are $LK,"CDATE_FREQ",A="MN:CDATE_FREQ"$. See $LK,"local time",A="FF:~/HomeLocalize.CC,local_time"$.
|
||||
|
||||
* $FG,2$<CTRL-SHIFT-L>$FG$ in the editor to reindent a $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ function or renumber an asm routine's local labels.
|
||||
* $FG,2$<CTRL-SHIFT-L>$FG$ in the editor to reindent a $LK,"ZealC",A="FI:::/Doc/ZealC.DD"$ function or renumber an asm routine's local labels.
|
||||
|
||||
* You can use $FG,2$filter_lines$FG$ in the editor text search form ($FG,2$<CTRL-f>$FG$) to temporarily display just lines near each match. A value of $FG,2$filter lines$FG$ set to $FG,2$5$FG$ will display lines within 5 lines of matches. Then, you can do another find to a different string and achieve a $FG,2$AND$FG$ search. When finished, press $FG,2$<ESC>$FG$.
|
||||
|
||||
|
@ -139,6 +139,6 @@ $FG,2$Merge("C:/","D:/","+r+d");$FG$ to check your changes.
|
|||
|
||||
* With $FG,2$start$FG$/$FG,2$end$FG$, common trailing code is fast. Common leading code is slow.$FG$
|
||||
|
||||
* The first line of the $MA-X+PU,"Psalmody",LM="#include \"::/Apps/Psalmody/Run\"\n"$ $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ song files is a comment with a category recognized by $LK,"JukeBox",A="FF:::/Apps/Psalmody/JukeBox.CC,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.CC,JukeBox"$(). You can set the song rating in $LK,"JukeBox",A="FF:::/Apps/Psalmody/JukeBox.CC,JukeBox"$() by pressing $FG,2$0$FG$-$FG,2$9$FG$. You can press $FG,2$<DEL>$FG$ to delete songs.
|
||||
* The first line of the $MA-X+PU,"Psalmody",LM="#include \"::/Apps/Psalmody/Run\"\n"$ $LK,"ZealC",A="FI:::/Doc/ZealC.DD"$ song files is a comment with a category recognized by $LK,"JukeBox",A="FF:::/Apps/Psalmody/JukeBox.CC,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.CC,JukeBox"$(). You can set the song rating in $LK,"JukeBox",A="FF:::/Apps/Psalmody/JukeBox.CC,JukeBox"$() by pressing $FG,2$0$FG$-$FG,2$9$FG$. You can press $FG,2$<DEL>$FG$ to delete songs.
|
||||
|
||||
* $FG,8$"Linux" is a trademark owned by Linus Torvalds.$FG$
|
|
@ -49,7 +49,7 @@ $LK,"/Apps/Psalmody/Examples/prosper.CC",A="FI:::/Apps/Psalmody/Examples/prosper
|
|||
|
||||
Two things to know about ZealOS are that $UL,1$tasks$UL,0$ have $LK,"MAlloc",A="MN:MAlloc"$/$LK,"Free",A="MN:Free"$ heap memory, not applications, and tasks have compiler symbol tables that persist at a scope like environment variables in other operating systems, and the symbols can include functions.
|
||||
|
||||
With $FG,2$ZealOS$FG$, the command line feeds right into the $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ compiler, line by line, and it places code into memory it $LK,"MAlloc",A="MN:MAlloc"$()s. The compiler is paused at the command line, waiting for input. Naturally, you $FG,2$#include$FG$ a program to load it into memory and, usually, start it.
|
||||
With $FG,2$ZealOS$FG$, the command line feeds right into the $LK,"ZealC",A="FI:::/Doc/ZealC.DD"$ compiler, line by line, and it places code into memory it $LK,"MAlloc",A="MN:MAlloc"$()s. The compiler is paused at the command line, waiting for input. Naturally, you $FG,2$#include$FG$ a program to load it into memory and, usually, start it.
|
||||
|
||||
During the boot process, many files get $LK,"compiled",A="FI:::/StartOS.CC"$ before you have access to the command line. (Don't worry, booting takes only two seconds.) All the header declarations for the operating system are compiled and are available for use in your programs without needing to $FG,2$#include $FG$them. Everything is truly compiled to native $FG,2$$TX,"x86_64",HTML="http://en.wikipedia.org/wiki/Amd64#AMD64"$$FG$ machine code, nothing is $FG,2$interpreted$FG$ and there is no $FG,2$byte code$FG$.
|
||||
|
||||
|
@ -69,7 +69,7 @@ $FG$He didn't like that, so he made parentheses optional on calls with no args a
|
|||
|
||||
The syntax change created an ambiguity when specifying function addresses, like for calling $LK,"QuickSort",A="MN:QuickSort"$(). To resolve it, he made a '$FG,2$&$FG$' required in front of function names when specifying an address of a function, which is better anyway.
|
||||
|
||||
Once Terry was no longer using standard C/C++ syntax, he decided to change everything he didn't like and call it $LK,"HolyC",A="FI:::/Doc/CosmiC.DD"$. Here are the new $LK,"operator precedence",A="FF:::/Doc/CosmiC.DD,operator precedence"$ rules. It's Biblical! See $LK,"Luke 5:37",A="BF:Luke,5:37"$.
|
||||
Once Terry was no longer using standard C/C++ syntax, he decided to change everything he didn't like and call it $LK,"HolyC",A="FI:::/Doc/ZealC.DD"$. Here are the new $LK,"operator precedence",A="FF:::/Doc/ZealC.DD,operator precedence"$ rules. It's Biblical! See $LK,"Luke 5:37",A="BF:Luke,5:37"$.
|
||||
|
||||
There are no object files in ZealOS and, normally, you don't make executable files either, but you can. That's known as $LK,"Ahead-of-Time",A="FF:::/Doc/Glossary.DD,AOT Compile Mode"$ compilation. Instead, you $LK,"Just in Time",A="FF:::/Doc/Glossary.DD,JIT Compile Mode"$ compile.
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ $WW,1$$FG,5$$TX+CX,"DolDoc Widget Help"$$FG$
|
|||
|
||||
$LK,"DolDoc",A="::/Doc/DolDocOverview.DD"$ is a ZealOS document type.
|
||||
|
||||
$FG,2$"Expression"$FG$ a num or CosmiC algebraic term with operators and CosmiC symbols can be entered.
|
||||
$FG,2$"Expression"$FG$ a num or ZealC algebraic term with operators and ZealC symbols can be entered.
|
||||
$FG,2$"Macro"$FG$ Most entries can behave like macro entries if you assign them macro strs.
|
||||
$FG,2$"InStr"$FG$ Like a macro except it is an $LK,"InFile",A="FF:::/Doc/Glossary.DD,InFile"$. You can't have both an in_str and macro text defined.
|
||||
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
$WW,1$$FG,5$$TX+CX,"CosmiC"$$FG$
|
||||
$WW,1$$FG,5$$TX+CX,"ZealC"$$FG$
|
||||
|
||||
ZealC is a fork of HolyC. The only changes to Terry's HolyC compiler are reformatting, label renames, bugfixes, and additions. Little to no functionality is removed, and nothing is fundamentally altered. Code incompatibilities are usually due to Kernel, System, or user methods changing in name and/or functionality, rather than any differences in the Compiler. See the $LK,"Conversion Script",A="FI:::/System/Utils/ConversionScript.CC"$ for help porting HolyC code to ZealC.
|
||||
|
||||
|
||||
* See $LK,"::/Doc/CompilerOverview.DD"$.
|
||||
|
||||
|
@ -43,7 +46,7 @@ $ID,2$$FG,2$void DemoC(char drv, char *format, char *name, int age)
|
|||
putchar('*');
|
||||
}
|
||||
|
||||
U0 DemoCosmiC(U8 drive, U8 *format, U8 *name, I64 age)
|
||||
U0 DemoZealC(U8 drive, U8 *format, U8 *name, I64 age)
|
||||
{
|
||||
"Hello World!\n";
|
||||
"%s age %d\n", name, age;
|
||||
|
@ -226,7 +229,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.DD"$. In $FG,2$asm$FG$ or $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ 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.DD"$. In $FG,2$asm$FG$ or $LK,"ZealC",A="FI:::/Doc/ZealC.DD"$ code, it also refers to the instruction'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.HH",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.CC"$.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
The basics of the CosmiC language. Requirements: Knowledge of basic integer mathematics and number sense.
|
||||
The basics of the ZealC language. Requirements: Knowledge of basic integer mathematics and number sense.
|
||||
|
||||
There are 4 main types of symbols. A symbol is just a fancy name for something with a name.
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
|
||||
The CosmiC assembler currently has partial SSE support.
|
||||
The ZealC assembler currently has partial SSE support.
|
||||
|
||||
SSE instructions with no prefix are fully supported,
|
||||
but instructions prefixed with 0x66, 0xF2, or F3
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
asm {/* See $LK,"::/Doc/Boot.DD"$.
|
||||
ZealOS starts in real, calls some BIOS routines, switches to 32 bit, and 64 bit mode and continues in $LK,"CosmiC",A="FI:::/Doc/CosmiC.DD"$ at $LK,"KMain",A="MN:KMain"$().
|
||||
ZealOS starts in real, calls some BIOS routines, switches to 32 bit, and 64 bit mode and continues in $LK,"ZealC",A="FI:::/Doc/ZealC.DD"$ at $LK,"KMain",A="MN:KMain"$().
|
||||
|
||||
The boot loader jumps here in real-mode (16-bit).
|
||||
It actually jumps to the $LK,"CBinFile",A="MN:CBinFile"$ header which is placed just before this by $LK,"the compiler",A="FF:::/Compiler/CMain.CC,16 ALIGN"$.
|
||||
|
|
|
@ -59,7 +59,7 @@ extern class CTask;
|
|||
#define eps (0x3CB0000000000000(F64))
|
||||
|
||||
#help_index "Data Types/Simple"
|
||||
//CosmiC union structure is treated as a whole if no member is specified, similar to bit fields.
|
||||
//ZealC union structure is treated as a whole if no member is specified, similar to bit fields.
|
||||
//See $LK,"::/Demo/SubIntAccess.CC"$.
|
||||
|
||||
U16i union U16
|
||||
|
@ -448,7 +448,7 @@ class CMemE820
|
|||
#define LDF_JUST_LOAD 2
|
||||
#define LDF_SILENT 4
|
||||
|
||||
#define BIN_SIGNATURE_VAL 'ZCCB' //Zeal CosmiC Binary
|
||||
#define BIN_SIGNATURE_VAL 'ZCCB' //Zeal ZealC Binary
|
||||
class CBinFile
|
||||
{//$LK,"Bin File Header Generation",A="FF:::/Compiler/CMain.CC,16 ALIGN"$ by compiler.
|
||||
U16 jmp;
|
||||
|
@ -727,7 +727,7 @@ class CRAXRBXRCXRDX
|
|||
};
|
||||
|
||||
//Asm callable function pointers.
|
||||
//They work with $LK,"CallExtNum",A="MN:CallExtNum"$() when calling from CosmiC.
|
||||
//They work with $LK,"CallExtNum",A="MN:CallExtNum"$() when calling from ZealC.
|
||||
#define EXT_WIN_TO_TOP 0
|
||||
#define EXT_WIN_FOCUS 1
|
||||
#define EXT_HEAPLOG_MALLOC 2
|
||||
|
|
|
@ -22,7 +22,7 @@ U0 PutKey(I64 ch=0, I64 sc=0)
|
|||
|
||||
U0 PutChars(U64 ch)
|
||||
{//Output chars. Up to 8 chars in a single U64.
|
||||
//Don't use this. $LK,"See Print() shortcut.",A="FF:::/Doc/CosmiC.DD,DemoCosmiC"$
|
||||
//Don't use this. $LK,"See Print() shortcut.",A="FF:::/Doc/ZealC.DD,DemoZealC"$
|
||||
while (ch)
|
||||
{
|
||||
PutKey(ch & 255, 0);
|
||||
|
@ -32,7 +32,7 @@ U0 PutChars(U64 ch)
|
|||
|
||||
U0 PutS(U8 *st)
|
||||
{//Use $LK,"Print",A="MN:Print"$(). See $LK,"Keyboard Devices",A="HI:Keyboard Devices/System"$.
|
||||
//Don't use this. $LK,"See Print() shortcut.",A="FF:::/Doc/CosmiC.DD,DemoCosmiC"$
|
||||
//Don't use this. $LK,"See Print() shortcut.",A="FF:::/Doc/ZealC.DD,DemoZealC"$
|
||||
I64 ch;
|
||||
U8 *ptr;
|
||||
Bool cont = TRUE;
|
||||
|
|
|
@ -1109,10 +1109,10 @@ U8 *CatPrint(U8 *_dst, U8 *format, ...)
|
|||
|
||||
U0 Print(U8 *format, ...)
|
||||
{//$LK,"Print(\"\") Format Strings",A="FI:::/Doc/Print.DD"$. See $LK,"StrPrintJoin",A="MN:StrPrintJoin"$().
|
||||
//Don't use this. $LK,"See Print() shortcut.",A="FF:::/Doc/CosmiC.DD,DemoCosmiC"$
|
||||
//Don't use this. $LK,"See Print() shortcut.",A="FF:::/Doc/ZealC.DD,DemoZealC"$
|
||||
U8 *buf = StrPrintJoin(NULL, format, argc, argv);
|
||||
|
||||
PutS(buf);//Don't use PutS(). $LK,"See Print() shortcut.",A="FF:::/Doc/CosmiC.DD,DemoCosmiC"$
|
||||
PutS(buf);//Don't use PutS(). $LK,"See Print() shortcut.",A="FF:::/Doc/ZealC.DD,DemoZealC"$
|
||||
Free(buf);
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ I64 PopUpEdFormat()
|
|||
CDoc *doc = DocNew;
|
||||
|
||||
DocPrint(doc, "$$LTBLUE$$$$MU,\"Compile Check\",LE=EF_CMP_CHK$$\n"
|
||||
"$$MU,\"Reindent CosmiC Fun (Beware braces in strings.)\","
|
||||
"$$MU,\"Reindent ZealC Fun (Beware braces in strings.)\","
|
||||
"LE=EF_REINDENT$$\n"
|
||||
"$$MU,\"Renum Asm Local @@ Labels for Fun\",LE=EF_RENUM_ASM$$\n"
|
||||
"$$MU,\"Insert Template Code: Ctrl Slider\",LE=EF_CTRL_SLIDER$$\n"
|
||||
|
|
|
@ -39,7 +39,7 @@ public Bool BinRep(U8 *filename)
|
|||
goto br_done1;
|
||||
if (bf->bin_signature != BIN_SIGNATURE_VAL)
|
||||
{
|
||||
"Not a CosmiC Binary File.\n";
|
||||
"Not a ZealC Binary File.\n";
|
||||
goto br_done2;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue