SparrowOSTS_121127.ISO
This commit is contained in:
1 parent
0e9364ff4c
commit
e57428affb
1218 files changed
+247142
-165507
No files matched your search
@@ -0,0 +1,59 @@
|
||||
$WW,1$The compiler looks-ahead a token most of the time, so you might throw an extra semicolon after the directive if it's not taking affect right away.
|
||||
|
||||
$FG,2$#include ""$FG$ There is no angle bracket <> form of this directive.
|
||||
$FG,2$#exe {}$FG$ Will execute code at compile-time and can be used to insert code into the stream being compiled using $LK,"StreamPrintF","MN:StreamPrintF"$().
|
||||
$FG,2$#define$FG$ Define string constant
|
||||
$FG,2$#assert$FG$ Print a warning during compilation if an expression is not true.
|
||||
$FG,2$#if$FG$ Include code if an expresion is true.
|
||||
$FG,2$#else
|
||||
#endif
|
||||
#ifdef,#ifndef $FG$Include code if a sym is defined.
|
||||
$FG,2$#ifstatic,#ifnstatic $FG$Include code if in static compiler mode.
|
||||
$FG,2$defined()$FG$ Is a function that can be used in expressions.
|
||||
$FG,2$#help_index$FG$, $FG,2$#help_file$FG$ See $LK,"Help System","FI:::/SparrowOS/Doc/HelpSystem.TXT.Z"$.
|
||||
|
||||
See $LK,"Scoping and Linkages","FI:::/SparrowOS/Doc/ImportExports.TXT.Z"$, $LK,"preprocessor","FF:::/SparrowOS/Compiler/Lex.CPP.Z,KW_DEFINE"$ and $LK,"Compiler Options","FI:::/SparrowOS/Doc/Options.TXT.Z"$.
|
||||
|
||||
|
||||
$FG,5$Assembler Directives$FG$
|
||||
|
||||
See $LK,"::/SparrowOS/Compiler/OpCodes.TXT.Z","FI:::/SparrowOS/Compiler/OpCodes.TXT.Z"$ for opcodes. They're not standard. Some invalid instructions are not flagged and some valid instructions are not implemented. 16-bit asm support is limited.
|
||||
|
||||
Here are example instruction formats:
|
||||
$HL,1$ ADD RAX,I64 FS:DISP[RSI+RDI*8]
|
||||
$HL,0$$HL,1$ ADD RAX,I64 [DISP]
|
||||
$HL,0$
|
||||
$FG,2$$$$FG$ Current compiler output pos (instruction ptr). Even works in C+ expressions.
|
||||
|
||||
$FG,2$$$$FG$ works in $FG,2$class$FG$es.
|
||||
$FG,2$class MyFun
|
||||
{
|
||||
$$=-16;
|
||||
I64 local1;
|
||||
I64 local2;
|
||||
$$=$$+256;
|
||||
I64 crazy;
|
||||
};$FG$
|
||||
|
||||
$FG,4$LABEL$FG,2$::
|
||||
$FG$ Defines an exported glbl label.
|
||||
|
||||
$FG,4$LABEL$FG,2$:
|
||||
$FG$ Defines an non-exported glbl label.
|
||||
|
||||
$FG,2$@@$FG,4$LABEL$FG,2$:
|
||||
$FG$ Defines a local label with scope valid between two global labels.
|
||||
|
||||
$FG,2$DU8$FG$, $FG,2$DU16$FG$, $FG,2$DU32$FG$, $FG,2$DU64$FG$
|
||||
Define BYTE, WORD, DWORD or QWORD. Can be used with $FG,2$DUP()$FG$ and ASCII strings. For your convenience, the ASCII strings do not have terminating zeros. Define cmds must end with a semicolon.
|
||||
|
||||
$FG,2$USE16$FG$, $FG,2$USE32$FG$, $FG,2$USE64$FG$
|
||||
|
||||
$FG,2$IMPORT$FG$ $FG,4$sym1name$FG$, $FG,4$sym2name$FG$;
|
||||
|
||||
$FG,2$LIST$FG$, $FG,2$NOLIST$FG$
|
||||
|
||||
$FG,2$ALIGN$FG$ $FG,4$num$FG$, $FG,4$fill_byte$FG$
|
||||
Align to $FG,4$num$FG$ boundary and fill with $FG,4$fill_byte$FG$.
|
||||
|
||||
See $LK,"::/SparrowOS/Demo/Asm/AsmAndC.CPP.Z","FI:::/SparrowOS/Demo/Asm/AsmAndC.CPP.Z"$ and $LK,"::/SparrowOS/Demo/Asm/AsmAndC2.CPP.Z","FI:::/SparrowOS/Demo/Asm/AsmAndC2.CPP.Z"$.
|
||||
Reference in new issue
Block a user