CoolFace
Datasetpublic

hschumann2/TempleOS-Source-Code

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes838downloads
Asm.txt55 linesDownload Raw Back to Doc
1 2                                   Assembler3 4See ::/Compiler/OpCodes.DD for opcodes.  They're not standard.  Some invalid5insts are not flagged and some valid insts are not implemented. 16-bit asm6support is limited.7 8Here are example inst formats:9        ADD     RAX,I64 FS:DISP[RSI+RDI*8]10        ADD     RAX,I64 [DISP]11 12$ Current compiler output pos (inst ptr).  Even works in HolyC expressions.13 14$ works in classes.15  class MyFun16  {17    $=-16;18    I64 local1;19    I64 local2;20    $=$+256;21    I64 crazy;22  };23 24LABEL::25  Defines an exported glbl label.26 27LABEL:28  Defines an non-exported glbl label.29 30@@LABEL:31  Defines a local label with scope valid between two global labels.32 33DU8, DU16, DU32, DU6434  Define BYTE, WORD, DWORD or QWORD. Can be used with DUP() and ASCII strings.35For your convenience, the ASCII strings do not have terminating zeros.  Define36cmds must end with a semicolon.37 38USE16, USE32, USE6439 40IMPORT sym1name, sym2name;41 42LIST, NOLIST43 44ALIGN num, fill_byte45  Align to num boundary and fill with fill_byte.46 47ORG num48  Set code addr for JIT or set module Load() addr -- has 16-byte CBinFile header49and patch table trailing.50 51BINFILE "FileName.BIN";52 53See Assembly Language, ::/Demo/Asm/AsmAndC1.HC, ::/Demo/Asm/AsmAndC2.HC and54::/Demo/Asm/AsmAndC3.HC.55