X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=adoc%2Finline_code.adoc;h=d85166c1bce422449758b875519825abb9cc138a;hb=2b1882f00a5b60b003891ce0e9d3440732538a1a;hp=91bb246ed899fc8bb63c12b5660ffa992a77666c;hpb=b7da3f7bbd1cb10241163abdb950472e539e796d;p=rrq%2Frrqforth.git diff --git a/adoc/inline_code.adoc b/adoc/inline_code.adoc index 91bb246..d85166c 100644 --- a/adoc/inline_code.adoc +++ b/adoc/inline_code.adoc @@ -1,11 +1,25 @@ +// rrqforth.asm: WORD inline_code,'[ASM]',fasm + anchor:inline_code[] -Word: [ASM] ----------- +=== Word: [ASM] + +.... +data stack: ( -- ) +.... +"[ASM]" is a function word that introduces inline assembly in an +RRQFORTH definition. Such assembly code may return to subsequence +RRQFORTH executon by means of the following instruction sequence: + +==== ---- -rrqforth.asm: WORD inline_code,'[ASM]',fasm + mov rsi,forthcode + lodsq + jmp qword [rax] +forthcode: ---- +==== -"[ASM]" is a function word that introduces inlined assembly. - +Note that the FORTH compiler does not invoke an assembler so any +inline assembly code must be provided in its binary form.