825ca358b3ecd12c0d62da8e696ffd5c9b6d9dee
[rrq/rrqforth.git] / adoc / p_args.adoc
1 //rrqforth.asm: WORD p_args,'ARGS',dovalue
2
3 anchor:p_args[MAIN-ARGS]
4
5 === Word: MAIN-ARGS
6
7 ....
8 Data stack: ( -- p[argv** argc] )
9 ....
10
11 "ARGS" is a value word that holds a pointer to the command line data
12 block which consists of a count cell followed by that many asciiz
13 pointers and then a 0 cell.
14
15 ====
16 .the command line argument block
17 [caption='Usage example {counter:example}: ']
18 ----
19 ARGS -> 8 bytes: count of non-zero asciiz pointers following
20         8 bytes: command name string
21         8 bytes: first argument string
22         8* ...
23         8 zero
24 ----
25 ====