X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=adoc%2Fp_args.adoc;h=825ca358b3ecd12c0d62da8e696ffd5c9b6d9dee;hb=aa6d10c30115571b859b9e7e3d6e8a9b9ced599b;hp=7575bd1565d669c5d1e5419c2826909da8647f14;hpb=b7da3f7bbd1cb10241163abdb950472e539e796d;p=rrq%2Frrqforth.git diff --git a/adoc/p_args.adoc b/adoc/p_args.adoc index 7575bd1..825ca35 100644 --- a/adoc/p_args.adoc +++ b/adoc/p_args.adoc @@ -1,9 +1,25 @@ -anchor:p_args[] +//rrqforth.asm: WORD p_args,'ARGS',dovalue -Word: ARGS ----------- +anchor:p_args[MAIN-ARGS] +=== Word: MAIN-ARGS + +.... +Data stack: ( -- p[argv** argc] ) +.... + +"ARGS" is a value word that holds a pointer to the command line data +block which consists of a count cell followed by that many asciiz +pointers and then a 0 cell. + +==== +.the command line argument block +[caption='Usage example {counter:example}: '] ---- -rrqforth.asm: WORD p_args,'ARGS',dostring +ARGS -> 8 bytes: count of non-zero asciiz pointers following + 8 bytes: command name string + 8 bytes: first argument string + 8* ... + 8 zero ---- - +====