ZealOS/src/Doc/Asm.DD
TomAwezome db32fdb367 Reformatted entire codebase.
Reformatted DolDoc files, adjusted sprites in documentation to reflect naming changes, corrected keybinding labels in AutoComplete window, fixed formatting error in Tips.DD.

Added DVD Boot AHCI prototyping into Kernel, displays detected AHCI configuration and halts mid-boot.

Small modifications to standard font, slight increase to mouse X and Y speed.
2020-12-23 18:27:18 -05:00

47 lines
1.7 KiB
Text
Executable file

$WW,1$$FG,5$$TX+CX,"Assembler"$$FG$
See $LK,"::/Compiler/OpCodes.DD"$ for opcodes. They're not standard. Some invalid insts are not flagged and some valid insts are not implemented. 16-bit asm support is limited.
Here are example inst formats:
$HL,1$ ADD RAX, I64 FS:DISP[RSI + RDI * 8]
$HL,0$$HL,1$ ADD RAX, I64 [DISP]
$HL,0$
$FG,2$$$$FG$ Current compiler output pos (inst ptr). Even works in CosmiC 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 global label.
$FG,4$LABEL$FG,2$:
$FG$ Defines an non-exported global 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$.
$FG,2$ORG$FG$ $FG,4$num$FG$
Set code addr for JIT or set module $LK,"Load",A="MN:Load"$() addr -- has 16-byte $LK,"CBinFile",A="MN:CBinFile"$ header and patch table trailing.
$FG,2$BINFILE$FG,4$ "FileName.BIN"$FG$;
See $LK,"Assembly Language",A="FF:::/Doc/GuideLines.DD,Assembly Language"$, $LK,"::/Demo/Asm/AsmAndC1.CC"$, $LK,"::/Demo/Asm/AsmAndC2.CC"$ and $LK,"::/Demo/Asm/AsmAndC3.CC"$.