From b7da3f7bbd1cb10241163abdb950472e539e796d Mon Sep 17 00:00:00 2001 From: Ralph Ronnquist Date: Tue, 25 May 2021 01:12:21 +1000 Subject: [PATCH] adding some documentation --- adoc/data_stack.adoc | 9 + adoc/inline_code.adoc | 11 + adoc/p_0branch.adoc | 9 + adoc/p_0equal.adoc | 9 + adoc/p_0less.adoc | 9 + adoc/p_2drop.adoc | 9 + adoc/p_2dup.adoc | 9 + adoc/p_2over.adoc | 9 + adoc/p_2swap.adoc | 9 + adoc/p_Ccomma.adoc | 20 ++ adoc/p_Rget.adoc | 8 + adoc/p_Rgt.adoc | 9 + adoc/p_abs.adoc | 9 + adoc/p_allot.adoc | 26 +++ adoc/p_and.adoc | 9 + adoc/p_args.adoc | 9 + adoc/p_base.adoc | 8 + adoc/p_branch.adoc | 9 + adoc/p_clear_stream.adoc | 9 + adoc/p_colon.adoc | 8 + adoc/p_comma.adoc | 19 ++ adoc/p_create.adoc | 67 +++++++ adoc/p_current_wordlist.adoc | 9 + adoc/p_decimal.adoc | 8 + adoc/p_depth.adoc | 9 + adoc/p_digits.adoc | 9 + adoc/p_divmod.adoc | 9 + adoc/p_dodoes.adoc | 9 + adoc/p_does.adoc | 26 +++ adoc/p_dofasm.adoc | 9 + adoc/p_doforth.adoc | 9 + adoc/p_dostring.adoc | 9 + adoc/p_dot.adoc | 14 ++ adoc/p_double_quote.adoc | 9 + adoc/p_dovalue.adoc | 9 + adoc/p_dovariable.adoc | 9 + adoc/p_drop.adoc | 9 + adoc/p_dup.adoc | 9 + adoc/p_emit.adoc | 9 + adoc/p_equal.adoc | 9 + adoc/p_evaluate_stream.adoc | 11 + adoc/p_execute.adoc | 9 + adoc/p_exit.adoc | 9 + adoc/p_false.adoc | 9 + adoc/p_find.adoc | 9 + adoc/p_forth.adoc | 9 + adoc/p_greaterequal.adoc | 9 + adoc/p_greaterthan.adoc | 9 + adoc/p_here.adoc | 12 ++ adoc/p_hex.adoc | 7 + adoc/p_left_bracket.adoc | 18 ++ adoc/p_lessequal.adoc | 9 + adoc/p_lessthan.adoc | 9 + adoc/p_literal.adoc | 30 +++ adoc/p_literal_string.adoc | 15 ++ adoc/p_ltR.adoc | 9 + adoc/p_malloc.adoc | 9 + adoc/p_minus.adoc | 9 + adoc/p_mult.adoc | 9 + adoc/p_negate.adoc | 9 + adoc/p_nip.adoc | 9 + adoc/p_nl.adoc | 9 + adoc/p_not.adoc | 9 + adoc/p_number.adoc | 8 + adoc/p_or.adoc | 9 + adoc/p_over.adoc | 9 + adoc/p_pad.adoc | 9 + adoc/p_pick.adoc | 9 + adoc/p_plus.adoc | 10 + adoc/p_program_version.adoc | 9 + adoc/p_quit.adoc | 9 + adoc/p_read_stream_char.adoc | 9 + adoc/p_read_word.adoc | 9 + adoc/p_right_bracket.adoc | 21 ++ adoc/p_roll.adoc | 9 + adoc/p_rot.adoc | 9 + adoc/p_sp.adoc | 9 + adoc/p_state.adoc | 12 ++ adoc/p_stdin.adoc | 9 + adoc/p_stream.adoc | 9 + adoc/p_stream_nchars.adoc | 9 + adoc/p_strncmp.adoc | 9 + adoc/p_swap.adoc | 9 + adoc/p_system.adoc | 9 + adoc/p_tell.adoc | 9 + adoc/p_terminate0.adoc | 9 + adoc/p_this_word.adoc | 15 ++ adoc/p_true.adoc | 9 + adoc/p_tuck.adoc | 9 + adoc/p_unequal.adoc | 9 + adoc/p_within.adoc | 9 + adoc/p_words.adoc | 9 + adoc/p_xor.adoc | 9 + adoc/return_stack.adoc | 8 + reference.adoc | 113 +++++++++++ syscalls.adoc | 375 +++++++++++++++++++++++++++++++++++ 96 files changed, 1509 insertions(+) create mode 100644 adoc/data_stack.adoc create mode 100644 adoc/inline_code.adoc create mode 100644 adoc/p_0branch.adoc create mode 100644 adoc/p_0equal.adoc create mode 100644 adoc/p_0less.adoc create mode 100644 adoc/p_2drop.adoc create mode 100644 adoc/p_2dup.adoc create mode 100644 adoc/p_2over.adoc create mode 100644 adoc/p_2swap.adoc create mode 100644 adoc/p_Ccomma.adoc create mode 100644 adoc/p_Rget.adoc create mode 100644 adoc/p_Rgt.adoc create mode 100644 adoc/p_abs.adoc create mode 100644 adoc/p_allot.adoc create mode 100644 adoc/p_and.adoc create mode 100644 adoc/p_args.adoc create mode 100644 adoc/p_base.adoc create mode 100644 adoc/p_branch.adoc create mode 100644 adoc/p_clear_stream.adoc create mode 100644 adoc/p_colon.adoc create mode 100644 adoc/p_comma.adoc create mode 100644 adoc/p_create.adoc create mode 100644 adoc/p_current_wordlist.adoc create mode 100644 adoc/p_decimal.adoc create mode 100644 adoc/p_depth.adoc create mode 100644 adoc/p_digits.adoc create mode 100644 adoc/p_divmod.adoc create mode 100644 adoc/p_dodoes.adoc create mode 100644 adoc/p_does.adoc create mode 100644 adoc/p_dofasm.adoc create mode 100644 adoc/p_doforth.adoc create mode 100644 adoc/p_dostring.adoc create mode 100644 adoc/p_dot.adoc create mode 100644 adoc/p_double_quote.adoc create mode 100644 adoc/p_dovalue.adoc create mode 100644 adoc/p_dovariable.adoc create mode 100644 adoc/p_drop.adoc create mode 100644 adoc/p_dup.adoc create mode 100644 adoc/p_emit.adoc create mode 100644 adoc/p_equal.adoc create mode 100644 adoc/p_evaluate_stream.adoc create mode 100644 adoc/p_execute.adoc create mode 100644 adoc/p_exit.adoc create mode 100644 adoc/p_false.adoc create mode 100644 adoc/p_find.adoc create mode 100644 adoc/p_forth.adoc create mode 100644 adoc/p_greaterequal.adoc create mode 100644 adoc/p_greaterthan.adoc create mode 100644 adoc/p_here.adoc create mode 100644 adoc/p_hex.adoc create mode 100644 adoc/p_left_bracket.adoc create mode 100644 adoc/p_lessequal.adoc create mode 100644 adoc/p_lessthan.adoc create mode 100644 adoc/p_literal.adoc create mode 100644 adoc/p_literal_string.adoc create mode 100644 adoc/p_ltR.adoc create mode 100644 adoc/p_malloc.adoc create mode 100644 adoc/p_minus.adoc create mode 100644 adoc/p_mult.adoc create mode 100644 adoc/p_negate.adoc create mode 100644 adoc/p_nip.adoc create mode 100644 adoc/p_nl.adoc create mode 100644 adoc/p_not.adoc create mode 100644 adoc/p_number.adoc create mode 100644 adoc/p_or.adoc create mode 100644 adoc/p_over.adoc create mode 100644 adoc/p_pad.adoc create mode 100644 adoc/p_pick.adoc create mode 100644 adoc/p_plus.adoc create mode 100644 adoc/p_program_version.adoc create mode 100644 adoc/p_quit.adoc create mode 100644 adoc/p_read_stream_char.adoc create mode 100644 adoc/p_read_word.adoc create mode 100644 adoc/p_right_bracket.adoc create mode 100644 adoc/p_roll.adoc create mode 100644 adoc/p_rot.adoc create mode 100644 adoc/p_sp.adoc create mode 100644 adoc/p_state.adoc create mode 100644 adoc/p_stdin.adoc create mode 100644 adoc/p_stream.adoc create mode 100644 adoc/p_stream_nchars.adoc create mode 100644 adoc/p_strncmp.adoc create mode 100644 adoc/p_swap.adoc create mode 100644 adoc/p_system.adoc create mode 100644 adoc/p_tell.adoc create mode 100644 adoc/p_terminate0.adoc create mode 100644 adoc/p_this_word.adoc create mode 100644 adoc/p_true.adoc create mode 100644 adoc/p_tuck.adoc create mode 100644 adoc/p_unequal.adoc create mode 100644 adoc/p_within.adoc create mode 100644 adoc/p_words.adoc create mode 100644 adoc/p_xor.adoc create mode 100644 adoc/return_stack.adoc create mode 100644 reference.adoc create mode 100644 syscalls.adoc diff --git a/adoc/data_stack.adoc b/adoc/data_stack.adoc new file mode 100644 index 0000000..0055cfe --- /dev/null +++ b/adoc/data_stack.adoc @@ -0,0 +1,9 @@ +anchor:data_stack + +Word: DATA-STACK +---------------- + +---- +rrqforth.asm: WORD data_stack,'DATA-STACK',dovariable +---- + diff --git a/adoc/inline_code.adoc b/adoc/inline_code.adoc new file mode 100644 index 0000000..91bb246 --- /dev/null +++ b/adoc/inline_code.adoc @@ -0,0 +1,11 @@ +anchor:inline_code[] + +Word: [ASM] +---------- + +---- +rrqforth.asm: WORD inline_code,'[ASM]',fasm +---- + +"[ASM]" is a function word that introduces inlined assembly. + diff --git a/adoc/p_0branch.adoc b/adoc/p_0branch.adoc new file mode 100644 index 0000000..16c69c0 --- /dev/null +++ b/adoc/p_0branch.adoc @@ -0,0 +1,9 @@ +anchor:p_zero_branch[] + +Word: 0BRANCH +------------- + +---- +rrqforth.asm: WORD p_zero_branch,'0BRANCH',fasm +---- + diff --git a/adoc/p_0equal.adoc b/adoc/p_0equal.adoc new file mode 100644 index 0000000..63980d4 --- /dev/null +++ b/adoc/p_0equal.adoc @@ -0,0 +1,9 @@ +anchor:p_0equal[] + +Word: 0= +---------- + +---- +logic.asm: WORD p_0equal, '0=',fasm +---- + diff --git a/adoc/p_0less.adoc b/adoc/p_0less.adoc new file mode 100644 index 0000000..6ce109c --- /dev/null +++ b/adoc/p_0less.adoc @@ -0,0 +1,9 @@ +anchor:p_0less[] + +Word: 0< +---------- + +---- +logic.asm: WORD p_0less, '0<',fasm +---- + diff --git a/adoc/p_2drop.adoc b/adoc/p_2drop.adoc new file mode 100644 index 0000000..4d5942f --- /dev/null +++ b/adoc/p_2drop.adoc @@ -0,0 +1,9 @@ +anchor:p_2drop[] + +Word: 2DROP +---------- + +---- +stack.asm: WORD p_2drop, '2DROP',fasm +---- + diff --git a/adoc/p_2dup.adoc b/adoc/p_2dup.adoc new file mode 100644 index 0000000..17c0005 --- /dev/null +++ b/adoc/p_2dup.adoc @@ -0,0 +1,9 @@ +anchor:p_2dup[] + +Word: 2DUP +---------- + +---- +stack.asm: WORD p_2dup, '2DUP',fasm +---- + diff --git a/adoc/p_2over.adoc b/adoc/p_2over.adoc new file mode 100644 index 0000000..772d238 --- /dev/null +++ b/adoc/p_2over.adoc @@ -0,0 +1,9 @@ +anchor:p_2over[] + +Word: 2OVER +---------- + +---- +stack.asm: WORD p_2over, '2OVER',fasm +---- + diff --git a/adoc/p_2swap.adoc b/adoc/p_2swap.adoc new file mode 100644 index 0000000..7b0694c --- /dev/null +++ b/adoc/p_2swap.adoc @@ -0,0 +1,9 @@ +anchor:p_2swap[] + +Word: 2SWAP +---------- + +---- +stack.asm: WORD p_2swap, '2SWAP',fasm +---- + diff --git a/adoc/p_Ccomma.adoc b/adoc/p_Ccomma.adoc new file mode 100644 index 0000000..0cb1900 --- /dev/null +++ b/adoc/p_Ccomma.adoc @@ -0,0 +1,20 @@ +Word: C, +-------- +anchor:p_Ccomma[] +---- +compile.asm: WORD p_Ccomma,'C,',fasm +---- + +Data stack: ( v -- ) + +"C," is a function word that puts a byte on the heap. It stores the +least significant byte of the value to the current free heap address, +and increments that. + +.Execution semantics expressed in RRQFORTH +==== +: C, + HERE @ 1 ALLOT C! ( v -- ; Claim 1 byte and put lsb value there ) +; +==== + diff --git a/adoc/p_Rget.adoc b/adoc/p_Rget.adoc new file mode 100644 index 0000000..8eb5f6d --- /dev/null +++ b/adoc/p_Rget.adoc @@ -0,0 +1,8 @@ +anchor:p_Rget[] + +Word: R@ +-------- + +---- +stack.asm: WORD p_Rget, 'R@',fasm +---- diff --git a/adoc/p_Rgt.adoc b/adoc/p_Rgt.adoc new file mode 100644 index 0000000..65fef54 --- /dev/null +++ b/adoc/p_Rgt.adoc @@ -0,0 +1,9 @@ +anchor:p_Rgt[] + +Word: R> +---------- + +---- +stack.asm: WORD p_Rgt, 'R>',fasm +---- + diff --git a/adoc/p_abs.adoc b/adoc/p_abs.adoc new file mode 100644 index 0000000..51726f2 --- /dev/null +++ b/adoc/p_abs.adoc @@ -0,0 +1,9 @@ +anchor:p_abs[] + +Word: ABS +--------- + +---- +math.asm: WORD p_abs, 'ABS',fasm +---- + diff --git a/adoc/p_allot.adoc b/adoc/p_allot.adoc new file mode 100644 index 0000000..cf6e3b9 --- /dev/null +++ b/adoc/p_allot.adoc @@ -0,0 +1,26 @@ +anchor:p_allot[] + +Word: ALLOT +----------- + +---- +compile.asm: WORD p_allot,'ALLOT',fasm +---- + +Data stack: ( n -- ) + +"ALLOT" is a function word that merely increments the "HERE" variable +with +n+ so as to claim that amount of the allocation space. + +.Execution semantics expressed in RRQFORTH +==== +: ALLOT + HERE @ + HERE ! +; +==== + +.Usage example +==== +HERE @ 16 ALLOT ( -- p ; Claiming 16 bytes ) +==== + diff --git a/adoc/p_and.adoc b/adoc/p_and.adoc new file mode 100644 index 0000000..ec2f20e --- /dev/null +++ b/adoc/p_and.adoc @@ -0,0 +1,9 @@ +anchor:p_and[] + +Word: AND +---------- + +---- +logic.asm: WORD p_and, 'AND',fasm +---- + diff --git a/adoc/p_args.adoc b/adoc/p_args.adoc new file mode 100644 index 0000000..7575bd1 --- /dev/null +++ b/adoc/p_args.adoc @@ -0,0 +1,9 @@ +anchor:p_args[] + +Word: ARGS +---------- + +---- +rrqforth.asm: WORD p_args,'ARGS',dostring +---- + diff --git a/adoc/p_base.adoc b/adoc/p_base.adoc new file mode 100644 index 0000000..43c2e9e --- /dev/null +++ b/adoc/p_base.adoc @@ -0,0 +1,8 @@ +Word: BASE +---------- + +anchor:p_base[] +---- +compile.asm: WORD p_base,'BASE',dovariable +---- + diff --git a/adoc/p_branch.adoc b/adoc/p_branch.adoc new file mode 100644 index 0000000..b555fd6 --- /dev/null +++ b/adoc/p_branch.adoc @@ -0,0 +1,9 @@ +anchor:p_branch[] + +Word: BRANCH +---------- + +---- +rrqforth.asm: WORD p_branch,'BRANCH',fasm +---- + diff --git a/adoc/p_clear_stream.adoc b/adoc/p_clear_stream.adoc new file mode 100644 index 0000000..7672daf --- /dev/null +++ b/adoc/p_clear_stream.adoc @@ -0,0 +1,9 @@ +anchor:p_clear_stream[] + +Word: CLEAR-STREAM +------------------ + +---- +stdio.asm: WORD p_clear_stream,'CLEAR-STREAM',fasm +---- + diff --git a/adoc/p_colon.adoc b/adoc/p_colon.adoc new file mode 100644 index 0000000..2fb446b --- /dev/null +++ b/adoc/p_colon.adoc @@ -0,0 +1,8 @@ +anchor:p_evaluate_stream[] + +Word: : +------- + +---- +compile.asm: WORD p_colon[],':' +---- diff --git a/adoc/p_comma.adoc b/adoc/p_comma.adoc new file mode 100644 index 0000000..cca9e0b --- /dev/null +++ b/adoc/p_comma.adoc @@ -0,0 +1,19 @@ +Word: , +------- +anchor:p_comma[] +---- +compile.asm: WORD p_comma,',',fasm +---- + +Data stack: ( v -- ) + +"," is a function word that puts a cell on the heap. + +.Execution semantics expressed in RRQFORTH +==== +: , + HERE @ 8 ALLOT ! ( v -- ; Claim 8 bytes and put value there ) +; +==== + + diff --git a/adoc/p_create.adoc b/adoc/p_create.adoc new file mode 100644 index 0000000..dc6926a --- /dev/null +++ b/adoc/p_create.adoc @@ -0,0 +1,67 @@ +anchor:p_create[] + +Word: CREATE +------------ + +---- +compile.asm: WORD p_create,'CREATE',fasm +---- + +Data stack: ( char* n -- tfa ) + +"CREATE" is a function word that allocates a "word header" with the +indicated [n:char*] print name, and returns the "TFA" (Token Field +Address) of the word. The header memory layout is as follows: + +==== +---- +struct WORD +TFA 8 link ; tfa of previous word +pCFA 8 cfap ; CFA = Code Field Address of this word + 8 flags ; +PFA 8 length ; length of pname representation + ? pname ; the pname bytes + 1 nul ; a forced nul byte following the pname +pTFA 8 tfap ; TFA = Token Field Address of this word +OFF 8 doff ; entry offset for FORTH level execution +CFA 8 doer ; word execution semantics +DFA 0 content ; DFA = Data Field Address +end_struct +---- +==== + +A "word" is generally understod as a marker in memory for some content +as held in the memory space following the DFA (Data Field Address). + +The words CFA (Code Field Address) is the most important field for +RRQFORTH execution, as holding a jump address to the assembly code +that implements the particular execution semantics for the word. +"CREATE" will assign this as "dovariable", which makes the word push +its DFA when executed. This is changed to "doforth" for RRQFORTH +function words initiated by ":" (aka "COLON") or changed to "dovalue" +for RRQFORTH constants created by "CONSTANT". + +See "<>" about range of +doer+ assignments and +their meanings. + +.Execution semantics expressed in RRQFORTH +==== +HERE @ R> ( save tfa on RS ) + R@ CURRENT-WORD @ DUP @ , ! ( link in a new word ) + DUP 49 + R@ + , ( pCFA ) + 0 , ( flags ) + DUP , ( length ) + HERE @ ROT ROT MEMCPY 0 C, ( pname + NUL ) + R@ , ( pTFA ) + 0, ( OFF ) + doVARIABLE ( CFA, default semantics ) +==== + +.Usage example +==== +\ A possible definition of the word CONSTANT +: CONSTANT + READ-WORD CREATE TFA>DFA doVALUE OVER 8 - ! ! +; +==== + diff --git a/adoc/p_current_wordlist.adoc b/adoc/p_current_wordlist.adoc new file mode 100644 index 0000000..340cabd --- /dev/null +++ b/adoc/p_current_wordlist.adoc @@ -0,0 +1,9 @@ +anchor:p_wordlist[] + +Word: CURRENT-WORDLIST +---------------------- + +---- +wordlists.asm: WORD p_wordlist,'CURRENT-WORDLIST',dovariable +---- + diff --git a/adoc/p_decimal.adoc b/adoc/p_decimal.adoc new file mode 100644 index 0000000..df737ee --- /dev/null +++ b/adoc/p_decimal.adoc @@ -0,0 +1,8 @@ +Word: DECIMAL +------------- + +anchor:p_decimal[] +---- +compile.asm: WORD p_decimal,'DECIMAL',fasm +---- + diff --git a/adoc/p_depth.adoc b/adoc/p_depth.adoc new file mode 100644 index 0000000..8a92b13 --- /dev/null +++ b/adoc/p_depth.adoc @@ -0,0 +1,9 @@ +anchor:p_depth[] + +Word: DEPTH +---------- + +---- +stack.asm: WORD p_depth,'DEPTH',fasm +---- + diff --git a/adoc/p_digits.adoc b/adoc/p_digits.adoc new file mode 100644 index 0000000..3bbfdf4 --- /dev/null +++ b/adoc/p_digits.adoc @@ -0,0 +1,9 @@ +anchor:p_digits[] + +Word: DIGITS +------------ + +---- +stdio.asm: WORD p_digits,'DIGITS',dovariable +---- + diff --git a/adoc/p_divmod.adoc b/adoc/p_divmod.adoc new file mode 100644 index 0000000..bae6cbb --- /dev/null +++ b/adoc/p_divmod.adoc @@ -0,0 +1,9 @@ +anchor:p_divmod[] + +Word: /MOD +---------- + +---- +math.asm: WORD p_divmod,'/MOD',fasm +---- + diff --git a/adoc/p_dodoes.adoc b/adoc/p_dodoes.adoc new file mode 100644 index 0000000..19319f5 --- /dev/null +++ b/adoc/p_dodoes.adoc @@ -0,0 +1,9 @@ +anchor:p_dodoes[] + +Word: doDOES +---------- + +---- +rrqforth.asm: WORD p_dodoes,'doDOES',dovariable +---- + diff --git a/adoc/p_does.adoc b/adoc/p_does.adoc new file mode 100644 index 0000000..6517157 --- /dev/null +++ b/adoc/p_does.adoc @@ -0,0 +1,26 @@ +WORD: DOES> +----------- +anchor:p_does[] +---- +compile.asm: WORD p_does,'DOES>',fasm,IMMEDIATE +---- + +Data stack: ( -- ) + +"DOES>" is a function that in execution mode does nothing but in +compilation mode it changes the execution semantics assignments for +the most recent word to use the "dodoes" sematics with adjustment +offset to the current heap address. I.e., the word being defined will +have its execution start at whatever comes after "DOES>". + +.Execution semantics expressed in RRQFORTH +==== +: DOES> IMMEDIATE +STATE @ != IF ( only for compilation mode ) + CURRENT-WORDLIST @ @ TFA>CFA ( cfa of current word ) + doDOES OVER ! ( set up doer ) + HERE @ OVER 8 + - SWAP 8 - ! ( set up offset +THEN +; +==== + diff --git a/adoc/p_dofasm.adoc b/adoc/p_dofasm.adoc new file mode 100644 index 0000000..920a16c --- /dev/null +++ b/adoc/p_dofasm.adoc @@ -0,0 +1,9 @@ +anchor:p_dofasm[] + +Word: doFASM +------------ + +---- +rrqforth.asm: WORD p_dofasm,'doFASM',dovariable +---- + diff --git a/adoc/p_doforth.adoc b/adoc/p_doforth.adoc new file mode 100644 index 0000000..8fa70ef --- /dev/null +++ b/adoc/p_doforth.adoc @@ -0,0 +1,9 @@ +anchor:p_doforth[] + +Word: doFORTH +------------- + +---- +rrqforth.asm: WORD p_doforth,'doFORTH',dovariable ; +---- + diff --git a/adoc/p_dostring.adoc b/adoc/p_dostring.adoc new file mode 100644 index 0000000..54725c1 --- /dev/null +++ b/adoc/p_dostring.adoc @@ -0,0 +1,9 @@ +anchor:p_dostring[] + +Word: doSTRING +-------------- + +---- +rrqforth.asm: WORD p_dostring,'doSTRING',dovariable +---- + diff --git a/adoc/p_dot.adoc b/adoc/p_dot.adoc new file mode 100644 index 0000000..621bee2 --- /dev/null +++ b/adoc/p_dot.adoc @@ -0,0 +1,14 @@ +anchor:p_dot[] + +Word: . +------- + +---- +stdio.asm: WORD p_dot,'.',fasm +---- + +Data stack: ( v -- ) + +"." is a function word that prints the top stack value to stdout usonb +<> (either <> or <>). + diff --git a/adoc/p_double_quote.adoc b/adoc/p_double_quote.adoc new file mode 100644 index 0000000..1c8e09f --- /dev/null +++ b/adoc/p_double_quote.adoc @@ -0,0 +1,9 @@ +anchor:p_double_quote[] + +Word: " +------- + +---- +stdio.asm: WORD p_double_quote,'"',fasm ;; " (fool emacs) +---- + diff --git a/adoc/p_dovalue.adoc b/adoc/p_dovalue.adoc new file mode 100644 index 0000000..1670131 --- /dev/null +++ b/adoc/p_dovalue.adoc @@ -0,0 +1,9 @@ +anchor:p_dovalue[] + +Word: doVALUE +------------- + +---- +rrqforth.asm: WORD p_dovalue,'doVALUE',dovariable +---- + diff --git a/adoc/p_dovariable.adoc b/adoc/p_dovariable.adoc new file mode 100644 index 0000000..dd27a6e --- /dev/null +++ b/adoc/p_dovariable.adoc @@ -0,0 +1,9 @@ +anchor:p_dovariable[] + +Word: doVARIABLE +---------------- + +---- +rrqforth.asm: WORD p_dovariable,'doVARIABLE',dovariable +---- + diff --git a/adoc/p_drop.adoc b/adoc/p_drop.adoc new file mode 100644 index 0000000..123afdb --- /dev/null +++ b/adoc/p_drop.adoc @@ -0,0 +1,9 @@ +anchor:p_drop[] + +Word: DROP +---------- + +---- +stack.asm: WORD p_drop, 'DROP',fasm +---- + diff --git a/adoc/p_dup.adoc b/adoc/p_dup.adoc new file mode 100644 index 0000000..8f2a8c4 --- /dev/null +++ b/adoc/p_dup.adoc @@ -0,0 +1,9 @@ +anchor:p_dup[] + +Word: DUP +---------- + +---- +stack.asm: WORD p_dup, 'DUP',fasm +---- + diff --git a/adoc/p_emit.adoc b/adoc/p_emit.adoc new file mode 100644 index 0000000..26651f2 --- /dev/null +++ b/adoc/p_emit.adoc @@ -0,0 +1,9 @@ +anchor:p_emit[] + +Word: EMIT +---------- + +---- +stdio.asm: WORD p_emit,'EMIT',fasm +---- + diff --git a/adoc/p_equal.adoc b/adoc/p_equal.adoc new file mode 100644 index 0000000..d15a8e7 --- /dev/null +++ b/adoc/p_equal.adoc @@ -0,0 +1,9 @@ +anchor:p_equal[] + +Word: = +------- + +---- +logic.asm: WORD p_equal, '=',fasm +---- + diff --git a/adoc/p_evaluate_stream.adoc b/adoc/p_evaluate_stream.adoc new file mode 100644 index 0000000..aae56c4 --- /dev/null +++ b/adoc/p_evaluate_stream.adoc @@ -0,0 +1,11 @@ +anchor:p_evaluate_stream[] + +Word: EVALUATE-STREAM +--------------------- + +---- +compile.asm: WORD p_evaluate_stream,'EVALUATE-STREAM' +---- + + + diff --git a/adoc/p_execute.adoc b/adoc/p_execute.adoc new file mode 100644 index 0000000..8197f0c --- /dev/null +++ b/adoc/p_execute.adoc @@ -0,0 +1,9 @@ +anchor:p_execute[] + +Word: EXECUTE +------------- + +---- +rrqforth.asm: WORD p_execute,'EXECUTE',fasm +---- + diff --git a/adoc/p_exit.adoc b/adoc/p_exit.adoc new file mode 100644 index 0000000..c1f4a90 --- /dev/null +++ b/adoc/p_exit.adoc @@ -0,0 +1,9 @@ +anchor:p_exit[] + +Word: EXIT +---------- + +---- +rrqforth.asm: WORD p_exit, 'EXIT',fasm +---- + diff --git a/adoc/p_false.adoc b/adoc/p_false.adoc new file mode 100644 index 0000000..467e458 --- /dev/null +++ b/adoc/p_false.adoc @@ -0,0 +1,9 @@ +anchor:p_false[] + +Word: FALSE +---------- + +---- +logic.asm: WORD p_false, 'FALSE',fasm +---- + diff --git a/adoc/p_find.adoc b/adoc/p_find.adoc new file mode 100644 index 0000000..c8f355c --- /dev/null +++ b/adoc/p_find.adoc @@ -0,0 +1,9 @@ +anchor:p_find[] + +Word: FIND +---------- + +---- +wordlists.asm: WORD p_find,'FIND',fasm +---- + diff --git a/adoc/p_forth.adoc b/adoc/p_forth.adoc new file mode 100644 index 0000000..15c2695 --- /dev/null +++ b/adoc/p_forth.adoc @@ -0,0 +1,9 @@ +anchor:p_forth[] + +Word: FORTH +----------- + +---- +wordlists.asm: WORD p_forth,'FORTH',dovariable +---- + diff --git a/adoc/p_greaterequal.adoc b/adoc/p_greaterequal.adoc new file mode 100644 index 0000000..8a11ab8 --- /dev/null +++ b/adoc/p_greaterequal.adoc @@ -0,0 +1,9 @@ +anchor:p_greaterequal[] + +Word: >= +---------- + +---- +logic.asm: WORD p_greaterequal, '>=',fasm +---- + diff --git a/adoc/p_greaterthan.adoc b/adoc/p_greaterthan.adoc new file mode 100644 index 0000000..b355859 --- /dev/null +++ b/adoc/p_greaterthan.adoc @@ -0,0 +1,9 @@ +anchor:p_greaterthan[] + +Word: > +------- + +---- +logic.asm: WORD p_greaterthan, '>',fasm +---- + diff --git a/adoc/p_here.adoc b/adoc/p_here.adoc new file mode 100644 index 0000000..116c817 --- /dev/null +++ b/adoc/p_here.adoc @@ -0,0 +1,12 @@ +anchor:p_here[] + +Word: HERE +---------- +---- +compile.asm: WORD p_here,'HERE',dovariable +---- + +"HERE" is a variable word that keeps the lowest address of the free +allocation space. It get updated by all words that allocate space. + + diff --git a/adoc/p_hex.adoc b/adoc/p_hex.adoc new file mode 100644 index 0000000..4ea5b7b --- /dev/null +++ b/adoc/p_hex.adoc @@ -0,0 +1,7 @@ +Word: HEX +---------- +anchor:p_hex[] +---- +compile.asm: WORD p_hex,'HEX',fasm +---- + diff --git a/adoc/p_left_bracket.adoc b/adoc/p_left_bracket.adoc new file mode 100644 index 0000000..4907988 --- /dev/null +++ b/adoc/p_left_bracket.adoc @@ -0,0 +1,18 @@ +anchor:p_left_bracket[] + +Word: [ +------- + +---- +compile.asm: WORD p_left_bracket,'[',fasm,IMMEDIATE +---- + +"[" (left bracket) is function word that sets the stream evaluation +mode to be intepreting. In this mode, words are executed immediately +after parsing, by invoking their "doer". + +.Execution semantics expressed in RRQFORTH +==== +: [ IMMEDIATE 1 STATE ! ; +==== + diff --git a/adoc/p_lessequal.adoc b/adoc/p_lessequal.adoc new file mode 100644 index 0000000..781c29c --- /dev/null +++ b/adoc/p_lessequal.adoc @@ -0,0 +1,9 @@ +anchor:p_lessequal[] + +Word: <= +---------- + +---- +logic.asm: WORD p_lessequal, '<=',fasm +---- + diff --git a/adoc/p_lessthan.adoc b/adoc/p_lessthan.adoc new file mode 100644 index 0000000..ce86406 --- /dev/null +++ b/adoc/p_lessthan.adoc @@ -0,0 +1,9 @@ +anchor:p_lessthan[] + +Word: < +------- + +---- +logic.asm: WORD p_lessthan, '<',fasm +---- + diff --git a/adoc/p_literal.adoc b/adoc/p_literal.adoc new file mode 100644 index 0000000..b469880 --- /dev/null +++ b/adoc/p_literal.adoc @@ -0,0 +1,30 @@ +Word: LIT +--------- + +anchor:p_literal[] +---- +compile.asm: WORD p_literal,'LIT',fasm +---- + +Data stack: compiling ( v -- ) interpreting ( -- v ) + +"LIT" is a function word for, in compiling mode, creating a literal +value the gets pushed in interpreting mode. In compiling mode, it a +lays out its own CFA pointer, then grabs the current stack value onto +the heap. In interpreting mode it recreates the value onto the stack. + +Note that the value is layed out as if a subsequent CFA poitnter in +the containing definition, but the LIT execution will make the +execution skip past that and instead contine with the CFA pointer +folling the value. + +It's not a good idea to use "LIT" interactively. + +.Execution semantics expressed in RRQFORTH +==== +: LIT IMMEDIATE + STATE @ IF p_literal , ELSE R> DUP 8 + >R @ THEN +; +==== + + diff --git a/adoc/p_literal_string.adoc b/adoc/p_literal_string.adoc new file mode 100644 index 0000000..5eaaec5 --- /dev/null +++ b/adoc/p_literal_string.adoc @@ -0,0 +1,15 @@ +Word: S" +---------- + +anchor:p_literal_string[] +---- +compile.asm: WORD p_literal_string,'S"',fasm ;; " (fool emacs) +---- + +"S"" is a function word for, in compaling mode, creating a string +literal whose pname ( char* n ) gets pushed in interpreting mode. + +Similar to "LIT", "S"" will insert the string into the containing +definition, and use it from there. + + diff --git a/adoc/p_ltR.adoc b/adoc/p_ltR.adoc new file mode 100644 index 0000000..f3c1b56 --- /dev/null +++ b/adoc/p_ltR.adoc @@ -0,0 +1,9 @@ +anchor:p_ltR[] + +Word: >R +---------- + +---- +stack.asm: WORD p_ltR, '>R',fasm +---- + diff --git a/adoc/p_malloc.adoc b/adoc/p_malloc.adoc new file mode 100644 index 0000000..f1dd801 --- /dev/null +++ b/adoc/p_malloc.adoc @@ -0,0 +1,9 @@ +anchor:p_malloc[] + +Word: MALLOC +------------ + +---- +stdio.asm: WORD p_malloc,'MALLOC',fasm +---- + diff --git a/adoc/p_minus.adoc b/adoc/p_minus.adoc new file mode 100644 index 0000000..629c926 --- /dev/null +++ b/adoc/p_minus.adoc @@ -0,0 +1,9 @@ +anchor:p_minus[] + +Word: - +------- + +---- +math.asm: WORD p_minus, '-',fasm +---- + diff --git a/adoc/p_mult.adoc b/adoc/p_mult.adoc new file mode 100644 index 0000000..5689d8a --- /dev/null +++ b/adoc/p_mult.adoc @@ -0,0 +1,9 @@ +anchor:p_mult[] + +Word: * +------- + +---- +math.asm: WORD p_mult, '*',fasm +---- + diff --git a/adoc/p_negate.adoc b/adoc/p_negate.adoc new file mode 100644 index 0000000..b47e603 --- /dev/null +++ b/adoc/p_negate.adoc @@ -0,0 +1,9 @@ +anchor:p_negate[] + +Word: NEGATE +---------- + +---- +math.asm: WORD p_negate, 'NEGATE',fasm +---- + diff --git a/adoc/p_nip.adoc b/adoc/p_nip.adoc new file mode 100644 index 0000000..cc74eb7 --- /dev/null +++ b/adoc/p_nip.adoc @@ -0,0 +1,9 @@ +anchor:p_nip[] + +Word: NIP +---------- + +---- +stack.asm: WORD p_nip, 'NIP',fasm +---- + diff --git a/adoc/p_nl.adoc b/adoc/p_nl.adoc new file mode 100644 index 0000000..15b1a99 --- /dev/null +++ b/adoc/p_nl.adoc @@ -0,0 +1,9 @@ +anchor:p_nl[] + +Word: NL +-------- + +---- +stdio.asm: WORD p_nl,'NL',dovalue +---- + diff --git a/adoc/p_not.adoc b/adoc/p_not.adoc new file mode 100644 index 0000000..1a70035 --- /dev/null +++ b/adoc/p_not.adoc @@ -0,0 +1,9 @@ +anchor:p_not[] + +Word: NOT +---------- + +---- +logic.asm: WORD p_not, 'NOT',fasm +---- + diff --git a/adoc/p_number.adoc b/adoc/p_number.adoc new file mode 100644 index 0000000..94d5a3c --- /dev/null +++ b/adoc/p_number.adoc @@ -0,0 +1,8 @@ +Word: NUMBER +---------- + +anchor:p_number[] +---- +compile.asm: WORD p_number,'NUMBER',fasm +---- + diff --git a/adoc/p_or.adoc b/adoc/p_or.adoc new file mode 100644 index 0000000..ab5cbe7 --- /dev/null +++ b/adoc/p_or.adoc @@ -0,0 +1,9 @@ +anchor:p_or[] + +Word: OR +---------- + +---- +logic.asm: WORD p_or, 'OR',fasm +---- + diff --git a/adoc/p_over.adoc b/adoc/p_over.adoc new file mode 100644 index 0000000..78be243 --- /dev/null +++ b/adoc/p_over.adoc @@ -0,0 +1,9 @@ +anchor:p_over[] + +Word: OVER +---------- + +---- +stack.asm: WORD p_over, 'OVER',fasm +---- + diff --git a/adoc/p_pad.adoc b/adoc/p_pad.adoc new file mode 100644 index 0000000..3903cd0 --- /dev/null +++ b/adoc/p_pad.adoc @@ -0,0 +1,9 @@ +anchor:p_pad[] + +Word: PAD +--------- + +---- +stdio.asm: WORD p_pad,'PAD',dovariable +---- + diff --git a/adoc/p_pick.adoc b/adoc/p_pick.adoc new file mode 100644 index 0000000..8f0376f --- /dev/null +++ b/adoc/p_pick.adoc @@ -0,0 +1,9 @@ +anchor:p_pick[] + +Word: PICK +---------- + +---- +stack.asm: WORD p_pick, 'PICK',fasm +---- + diff --git a/adoc/p_plus.adoc b/adoc/p_plus.adoc new file mode 100644 index 0000000..9bf9cd7 --- /dev/null +++ b/adoc/p_plus.adoc @@ -0,0 +1,10 @@ + +anchor:p_plus[] + +Word: + +------- + +---- +math.asm: WORD p_plus, '+',fasm +---- + diff --git a/adoc/p_program_version.adoc b/adoc/p_program_version.adoc new file mode 100644 index 0000000..80d00a4 --- /dev/null +++ b/adoc/p_program_version.adoc @@ -0,0 +1,9 @@ +anchor:p_program_version[] + +Word: PROGRAM_VERSION +--------------------- + +---- +rrqforth.asm: WORD p_program_version,'PROGRAM_VERSION',dostring +---- + diff --git a/adoc/p_quit.adoc b/adoc/p_quit.adoc new file mode 100644 index 0000000..737421b --- /dev/null +++ b/adoc/p_quit.adoc @@ -0,0 +1,9 @@ +anchor:p_quit[] + +Word: QUIT +---------- + +---- +rrqforth.asm: WORD p_quit,'QUIT',fasm +---- + diff --git a/adoc/p_read_stream_char.adoc b/adoc/p_read_stream_char.adoc new file mode 100644 index 0000000..ba1579e --- /dev/null +++ b/adoc/p_read_stream_char.adoc @@ -0,0 +1,9 @@ +anchor:p_read_stream_char[] + +Word: READ-STREAM-CHAR +---------------------- + +---- +stdio.asm: WORD p_read_stream_char,'READ-STREAM-CHAR',fasm +---- + diff --git a/adoc/p_read_word.adoc b/adoc/p_read_word.adoc new file mode 100644 index 0000000..f917434 --- /dev/null +++ b/adoc/p_read_word.adoc @@ -0,0 +1,9 @@ +anchor:p_read_word[] + +Word: READ-WORD +--------------- + +---- +stdio.asm: WORD p_read_word,'READ-WORD',fasm +---- + diff --git a/adoc/p_right_bracket.adoc b/adoc/p_right_bracket.adoc new file mode 100644 index 0000000..4f8589d --- /dev/null +++ b/adoc/p_right_bracket.adoc @@ -0,0 +1,21 @@ +anchor:p_right_bracket[] + +Word: ] +------- + +---- +compile.asm: WORD p_right_bracket,']',fasm +---- + +"]" (right bracket) is function word that sets the stream evaluation +mode to be compiling. In this mode, words are not executed immediately +after parsing but rather having their CFA placed on the heap. However, +words marked as IMMEDIATE (flags&1 != 0) are executed as if +interpreting mode. Likewise for numbers. + +.Execution semantics expressed in RRQFORTH +==== +: [ IMMEDIATE 1 STATE ! ; +==== + + diff --git a/adoc/p_roll.adoc b/adoc/p_roll.adoc new file mode 100644 index 0000000..79083f2 --- /dev/null +++ b/adoc/p_roll.adoc @@ -0,0 +1,9 @@ +anchor:p_roll[] + +Word: ROLL +---------- + +---- +stack.asm: WORD p_roll, 'ROLL',fasm +---- + diff --git a/adoc/p_rot.adoc b/adoc/p_rot.adoc new file mode 100644 index 0000000..5764e0e --- /dev/null +++ b/adoc/p_rot.adoc @@ -0,0 +1,9 @@ +anchor:p_rot[] + +Word: ROT +---------- + +---- +stack.asm: WORD p_rot, 'ROT',fasm +---- + diff --git a/adoc/p_sp.adoc b/adoc/p_sp.adoc new file mode 100644 index 0000000..01e770a --- /dev/null +++ b/adoc/p_sp.adoc @@ -0,0 +1,9 @@ +anchor:p_sp[] + +Word: SP +-------- + +---- +stdio.asm: WORD p_sp,'SP',dovalue +---- + diff --git a/adoc/p_state.adoc b/adoc/p_state.adoc new file mode 100644 index 0000000..460f7f9 --- /dev/null +++ b/adoc/p_state.adoc @@ -0,0 +1,12 @@ +Word: STATE +---------- + +anchor:p_state[] +---- +compile.asm: WORD p_state,'STATE',dovariable +---- + +"STATE" is a variable word marking whether the stream evaluator is in +compiling mode (1) or intepreting (0) mode. + + diff --git a/adoc/p_stdin.adoc b/adoc/p_stdin.adoc new file mode 100644 index 0000000..5bb09b0 --- /dev/null +++ b/adoc/p_stdin.adoc @@ -0,0 +1,9 @@ +anchor:p_stdin[] + +Word: STDIN +----------- + +---- +rrqforth.asm: WORD p_stdin,'STDIN',dovalue +---- + diff --git a/adoc/p_stream.adoc b/adoc/p_stream.adoc new file mode 100644 index 0000000..37ffb5a --- /dev/null +++ b/adoc/p_stream.adoc @@ -0,0 +1,9 @@ +anchor:p_stream[] + +Word: STREAM +------------ + +---- +stdio.asm: WORD p_stream,'STREAM',fasm +---- + diff --git a/adoc/p_stream_nchars.adoc b/adoc/p_stream_nchars.adoc new file mode 100644 index 0000000..c56b88a --- /dev/null +++ b/adoc/p_stream_nchars.adoc @@ -0,0 +1,9 @@ +anchor:p_stream_nchars[] + +Word: STREAM-NCHARS +------------------- + +---- +stdio.asm: WORD p_stream_nchars,'STREAM-NCHARS',fasm +---- + diff --git a/adoc/p_strncmp.adoc b/adoc/p_strncmp.adoc new file mode 100644 index 0000000..19f2e69 --- /dev/null +++ b/adoc/p_strncmp.adoc @@ -0,0 +1,9 @@ +anchor:p_strncmp[] + +Word: STRNCMP +------------- + +---- +wordlists.asm: WORD p_strncmp,'STRNCMP',fasm +---- + diff --git a/adoc/p_swap.adoc b/adoc/p_swap.adoc new file mode 100644 index 0000000..981bde7 --- /dev/null +++ b/adoc/p_swap.adoc @@ -0,0 +1,9 @@ +anchor:p_swap[] + +Word: SWAP +---------- + +---- +stack.asm: WORD p_swap, 'SWAP',fasm +---- + diff --git a/adoc/p_system.adoc b/adoc/p_system.adoc new file mode 100644 index 0000000..11224d6 --- /dev/null +++ b/adoc/p_system.adoc @@ -0,0 +1,9 @@ +anchor:p_system[] + +Word: SYSTEM +---------- + +---- +rrqforth.asm: WORD p_system,'SYSTEM',dovariable +---- + diff --git a/adoc/p_tell.adoc b/adoc/p_tell.adoc new file mode 100644 index 0000000..4a607d7 --- /dev/null +++ b/adoc/p_tell.adoc @@ -0,0 +1,9 @@ +anchor:p_tell[] + +Word: TELL +---------- + +---- +stdio.asm: WORD p_tell,'TELL',fasm +---- + diff --git a/adoc/p_terminate0.adoc b/adoc/p_terminate0.adoc new file mode 100644 index 0000000..4f39e85 --- /dev/null +++ b/adoc/p_terminate0.adoc @@ -0,0 +1,9 @@ +anchor:p_terminate0[] + +Word: TERMINATE0 +---------------- + +---- +rrqforth.asm: WORD p_terminate0, 'TERMINATE0',fasm +---- + diff --git a/adoc/p_this_word.adoc b/adoc/p_this_word.adoc new file mode 100644 index 0000000..3380093 --- /dev/null +++ b/adoc/p_this_word.adoc @@ -0,0 +1,15 @@ +anchor:p_this_word[] + +Word: THIS-WORD +--------------- + +---- +compile.asm: WORD p_this_word,'THIS-WORD',dovariable +---- + +"THIS-WORD" is a variable word used in +<> as cache for the [n:char*] +values of the successive words being evaluated. This typically points +into the input stream buffer and remain valid until further stream +buffering functions are used. + diff --git a/adoc/p_true.adoc b/adoc/p_true.adoc new file mode 100644 index 0000000..30e1fcc --- /dev/null +++ b/adoc/p_true.adoc @@ -0,0 +1,9 @@ +anchor:p_true[] + +Word: TRUE +---------- + +---- +logic.asm: WORD p_true, 'TRUE',fasm +---- + diff --git a/adoc/p_tuck.adoc b/adoc/p_tuck.adoc new file mode 100644 index 0000000..d06a678 --- /dev/null +++ b/adoc/p_tuck.adoc @@ -0,0 +1,9 @@ +anchor:p_tuck[] + +Word: TUCK +---------- + +---- +stack.asm: WORD p_tuck, 'TUCK',fasm +---- + diff --git a/adoc/p_unequal.adoc b/adoc/p_unequal.adoc new file mode 100644 index 0000000..2a1791d --- /dev/null +++ b/adoc/p_unequal.adoc @@ -0,0 +1,9 @@ +anchor:p_unequal[] + +Word: != +---------- + +---- +logic.asm: WORD p_unequal, '!=',fasm +---- + diff --git a/adoc/p_within.adoc b/adoc/p_within.adoc new file mode 100644 index 0000000..3d7ea49 --- /dev/null +++ b/adoc/p_within.adoc @@ -0,0 +1,9 @@ +anchor:p_within[] + +Word: WITHIN +---------- + +---- +logic.asm: WORD p_within, 'WITHIN',fasm +---- + diff --git a/adoc/p_words.adoc b/adoc/p_words.adoc new file mode 100644 index 0000000..b2cae3d --- /dev/null +++ b/adoc/p_words.adoc @@ -0,0 +1,9 @@ +anchor:p_words[] + +Word: WORDS +----------- + +---- +wordlists.asm: WORD p_words,'WORDS',fasm +---- + diff --git a/adoc/p_xor.adoc b/adoc/p_xor.adoc new file mode 100644 index 0000000..04f763a --- /dev/null +++ b/adoc/p_xor.adoc @@ -0,0 +1,9 @@ +anchor:p_xor[] + +Word: XOR +---------- + +---- +logic.asm: WORD p_xor, 'XOR',fasm +---- + diff --git a/adoc/return_stack.adoc b/adoc/return_stack.adoc new file mode 100644 index 0000000..649902c --- /dev/null +++ b/adoc/return_stack.adoc @@ -0,0 +1,8 @@ +anchor:return_stack[] + +Word: RETURN-STACK +------------------ + +---- +rrqforth.asm: WORD return_stack,'RETURN-STACK',dovariable +---- diff --git a/reference.adoc b/reference.adoc new file mode 100644 index 0000000..0d71f8f --- /dev/null +++ b/reference.adoc @@ -0,0 +1,113 @@ +RRQFORTH Reference Documentation +================================ +// :toc: + +// include::compile.adoc[] +include::adoc/p_allot.adoc[] +include::adoc/p_base.adoc[] +include::adoc/p_Ccomma.adoc[] +include::adoc/p_colon.adoc[] +include::adoc/p_comma.adoc[] +include::adoc/p_create.adoc[] +include::adoc/p_decimal.adoc[] +include::adoc/p_does.adoc[] +include::adoc/p_evaluate_stream.adoc[] +include::adoc/p_here.adoc[] +include::adoc/p_hex.adoc[] +include::adoc/p_left_bracket.adoc[] +include::adoc/p_literal.adoc[] +include::adoc/p_literal_string.adoc[] +include::adoc/p_number.adoc[] +include::adoc/p_right_bracket.adoc[] +include::adoc/p_state.adoc[] +include::adoc/p_this_word.adoc[] + +//include::logic.adoc[] +include::adoc/p_0equal.adoc[] +include::adoc/p_0less.adoc[] +include::adoc/p_and.adoc[] +include::adoc/p_equal.adoc[] +include::adoc/p_false.adoc[] +include::adoc/p_greaterequal.adoc[] +include::adoc/p_greaterthan.adoc[] +include::adoc/p_lessequal.adoc[] +include::adoc/p_lessthan.adoc[] +include::adoc/p_not.adoc[] +include::adoc/p_or.adoc[] +include::adoc/p_true.adoc[] +include::adoc/p_unequal.adoc[] +include::adoc/p_within.adoc[] +include::adoc/p_xor.adoc[] + +// include::math.adoc[] +include::adoc/p_abs.adoc[] +include::adoc/p_divmod.adoc[] +include::adoc/p_minus.adoc[] +include::adoc/p_mult.adoc[] +include::adoc/p_negate.adoc[] +include::adoc/p_plus.adoc[] + +//include::rrqforth.adoc[] +include::adoc/data_stack.adoc[] +include::adoc/inline_code.adoc[] +include::adoc/p_0branch.adoc[] +include::adoc/p_args.adoc[] +include::adoc/p_branch.adoc[] +include::adoc/p_dodoes.adoc[] +include::adoc/p_dofasm.adoc[] +include::adoc/p_doforth.adoc[] +include::adoc/p_dostring.adoc[] +include::adoc/p_dovalue.adoc[] +include::adoc/p_dovariable.adoc[] +include::adoc/p_execute.adoc[] +include::adoc/p_exit.adoc[] +include::adoc/p_program_version.adoc[] +include::adoc/p_quit.adoc[] +include::adoc/p_stdin.adoc[] +include::adoc/p_system.adoc[] +include::adoc/p_terminate0.adoc[] +include::adoc/return_stack.adoc[] + +//include::stack.adoc[] +include::adoc/p_2drop.adoc[] +include::adoc/p_2dup.adoc[] +include::adoc/p_2over.adoc[] +include::adoc/p_2swap.adoc[] +include::adoc/p_depth.adoc[] +include::adoc/p_drop.adoc[] +include::adoc/p_dup.adoc[] +include::adoc/p_ltR.adoc[] +include::adoc/p_nip.adoc[] +include::adoc/p_over.adoc[] +include::adoc/p_pick.adoc[] +include::adoc/p_Rget.adoc[] +include::adoc/p_Rgt.adoc[] +include::adoc/p_roll.adoc[] +include::adoc/p_rot.adoc[] +include::adoc/p_swap.adoc[] +include::adoc/p_tuck.adoc[] + +//include::stdio.adoc[] +include::adoc/p_clear_stream.adoc[] +include::adoc/p_digits.adoc[] +include::adoc/p_dot.adoc[] +include::adoc/p_double_quote.adoc[] +include::adoc/p_emit.adoc[] +include::adoc/p_malloc.adoc[] +include::adoc/p_nl.adoc[] +include::adoc/p_pad.adoc[] +include::adoc/p_read_stream_char.adoc[] +include::adoc/p_read_word.adoc[] +include::adoc/p_sp.adoc[] +include::adoc/p_stream.adoc[] +include::adoc/p_stream_nchars.adoc[] +include::adoc/p_tell.adoc[] + +//include::wordlists.adoc[] +include::adoc/p_current_wordlist.adoc[] +include::adoc/p_find.adoc[] +include::adoc/p_forth.adoc[] +include::adoc/p_strncmp.adoc[] +include::adoc/p_words.adoc[] + +//include::syscalls.adoc[] diff --git a/syscalls.adoc b/syscalls.adoc new file mode 100644 index 0000000..baf5765 --- /dev/null +++ b/syscalls.adoc @@ -0,0 +1,375 @@ + +==== +;;; https://chromium.googlesource.com/chromiumos/docs/+/master/constants/syscalls.md +;;; +;;; id rtn 0 1 2 3 4 5 +;;; x86_64: rax, rax, rdi, rsi, rdx, r10, r8, r9 + +;;; %rax System call %rdi %rsi %rdx %r10 %r8 %r9 + +;;; ============================== +;;; Helper macro for layout of syscall argument registers + +macro SYSCALLARG register,count,nargs { +if count < nargs + mov register, [rsp + ((nargs-count-1)*8)] +end if +} + +;;; Code layout for system call with up to 6 arguments +macro SYSCALL id,name,fname,nargs { + WORD name,fname,fasm + pushr rsi +name#_asm: + mov rax,qword id + SYSCALLARG r9,5,nargs + SYSCALLARG r8,4,nargs + SYSCALLARG r10,3,nargs + SYSCALLARG rdx,2,nargs + SYSCALLARG rsi,1,nargs + SYSCALLARG rdi,0,nargs +if nargs > 0 + add rsp,nargs*8 +end if + syscall + push rax + jmp exit +} + + SYSCALL 0,sys_read,'SYS_READ',3 + SYSCALL 1,sys_write,'SYS_WRITE',3 + SYSCALL 2,sys_open,'SYS_OPEN',3 + SYSCALL 3,sys_close,'SYS_CLOSE',1 + SYSCALL 4,sys_stat,'SYS_STAT',2 + SYSCALL 5,sys_fstat,'SYS_FSTAT',2 + SYSCALL 6,sys_lstat,'SYS_LSTAT',2 + SYSCALL 7,sys_poll,'SYS_POLL',3 + SYSCALL 8,sys_lseek,'SYS_LSEEK',3 + SYSCALL 9,sys_mmap,'SYS_MMAP',6 + SYSCALL 10,sys_mprotect,'SYS_MPROTECT',3 + SYSCALL 11,sys_munmap,'SYS_MUNMAP',2 + SYSCALL 12,sys_brk,'SYS_BRK',1 + SYSCALL 13,sys_rt_sigaction,'SYS_RT_SIGACTION',4 + SYSCALL 14,sys_rt_sigprocmask,'SYS_RT_SIGPROCMASK',4 + SYSCALL 15,sys_rt_sigreturn,'SYS_RT_SIGRETURN',1 + SYSCALL 16,sys_ioctl,'SYS_IOCTL',3 + SYSCALL 17,sys_pread64,'SYS_PREAD64',4 + SYSCALL 18,sys_pwrite64,'SYS_PWRITE64',4 + SYSCALL 19,sys_readv,'SYS_READV',3 + SYSCALL 20,sys_writev,'SYS_WRITEV',3 + SYSCALL 21,sys_access,'SYS_ACCESS',2 + SYSCALL 22,sys_pipe,'SYS_PIPE',1 + SYSCALL 23,sys_select,'SYS_SELECT',5 + SYSCALL 24,sys_sched_yield,'SYS_SCHED_YIELD',0 + SYSCALL 25,sys_mremap,'SYS_MREMAP',5 + SYSCALL 26,sys_msync,'SYS_MSYNC',3 + SYSCALL 27,sys_mincore,'SYS_MINCORE',3 + SYSCALL 28,sys_madvise,'SYS_MADVISE',3 + SYSCALL 29,sys_shmget,'SYS_SHMGET',3 + SYSCALL 30,sys_shmat,'SYS_SHMAT',3 + SYSCALL 31,sys_shmctl,'SYS_SHMCTL',3 + SYSCALL 32,sys_dup,'SYS_DUP',1 + SYSCALL 33,sys_dup2,'SYS_DUP2',2 + SYSCALL 34,sys_pause,'SYS_PAUSE',0 + SYSCALL 35,sys_nanosleep,'SYS_NANOSLEEP',2 + SYSCALL 36,sys_getitimer,'SYS_GETITIMER',2 + SYSCALL 37,sys_alarm,'SYS_ALARM',1 + SYSCALL 38,sys_setitimer,'SYS_SETITIMER',3 + SYSCALL 39,sys_getpid,'SYS_GETPID',0 + SYSCALL 40,sys_sendfile,'SYS_SENDFILE',4 + SYSCALL 41,sys_socket,'SYS_SOCKET',3 + SYSCALL 42,sys_connect,'SYS_CONNECT',3 + SYSCALL 43,sys_accept,'SYS_ACCEPT',3 + SYSCALL 44,sys_sendto,'SYS_SENDTO',6 + SYSCALL 45,sys_recvfrom,'SYS_RECVFROM',6 + SYSCALL 46,sys_sendmsg,'SYS_SENDMSG',3 + SYSCALL 47,sys_recvmsg,'SYS_RECVMSG',3 + SYSCALL 48,sys_shutdown,'SYS_SHUTDOWN',2 + SYSCALL 49,sys_bind,'SYS_BIND',3 + SYSCALL 50,sys_listen,'SYS_LISTEN',2 + SYSCALL 51,sys_getsockname,'SYS_GETSOCKNAME',3 + SYSCALL 52,sys_getpeername,'SYS_GETPEERNAME',3 + SYSCALL 53,sys_socketpair,'SYS_SOCKETPAIR',4 + SYSCALL 54,sys_setsockopt,'SYS_SETSOCKOPT',5 + SYSCALL 55,sys_getsockopt,'SYS_GETSOCKOPT',5 + SYSCALL 56,sys_clone,'SYS_CLONE',5 + SYSCALL 57,sys_fork,'SYS_FORK',0 + SYSCALL 58,sys_vfork,'SYS_VFORK',0 + SYSCALL 59,sys_execve,'SYS_EXECVE',3 + SYSCALL 60,sys_exit,'SYS_EXIT',1 + SYSCALL 61,sys_wait4,'SYS_WAIT4',4 + SYSCALL 62,sys_kill,'SYS_KILL',2 + SYSCALL 63,sys_uname,'SYS_UNAME',1 + SYSCALL 64,sys_semget,'SYS_SEMGET',3 + SYSCALL 65,sys_semop,'SYS_SEMOP',3 + SYSCALL 66,sys_semctl,'SYS_SEMCTL',4 + SYSCALL 67,sys_shmdt,'SYS_SHMDT',1 + SYSCALL 68,sys_msgget,'SYS_MSGGET',2 + SYSCALL 69,sys_msgsnd,'SYS_MSGSND',4 + SYSCALL 70,sys_msgrcv,'SYS_MSGRCV',5 + SYSCALL 71,sys_msgctl,'SYS_MSGCTL',3 + SYSCALL 72,sys_fcntl,'SYS_FCNTL',3 + SYSCALL 73,sys_flock,'SYS_FLOCK',2 + SYSCALL 74,sys_fsync,'SYS_FSYNC',1 + SYSCALL 75,sys_fdatasync,'SYS_FDATASYNC',1 + SYSCALL 76,sys_truncate,'SYS_TRUNCATE',2 + SYSCALL 77,sys_ftruncate,'SYS_FTRUNCATE',2 + SYSCALL 78,sys_getdents,'SYS_GETDENTS',3 + SYSCALL 79,sys_getcwd,'SYS_GETCWD',2 + SYSCALL 80,sys_chdir,'SYS_CHDIR',1 + SYSCALL 81,sys_fchdir,'SYS_FCHDIR',1 + SYSCALL 82,sys_rename,'SYS_RENAME',2 + SYSCALL 83,sys_mkdir,'SYS_MKDIR',2 + SYSCALL 84,sys_rmdir,'SYS_RMDIR',1 + SYSCALL 85,sys_creat,'SYS_CREAT',2 + SYSCALL 86,sys_link,'SYS_LINK',2 + SYSCALL 87,sys_unlink,'SYS_UNLINK',1 + SYSCALL 88,sys_symlink,'SYS_SYMLINK',2 + SYSCALL 89,sys_readlink,'SYS_READLINK',3 + SYSCALL 90,sys_chmod,'SYS_CHMOD',2 + SYSCALL 91,sys_fchmod,'SYS_FCHMOD',2 + SYSCALL 92,sys_chown,'SYS_CHOWN',3 + SYSCALL 93,sys_fchown,'SYS_FCHOWN',3 + SYSCALL 94,sys_lchown,'SYS_LCHOWN',3 + SYSCALL 95,sys_umask,'SYS_UMASK',1 + SYSCALL 96,sys_gettimeofday,'SYS_GETTIMEOFDAY',2 + SYSCALL 97,sys_getrlimit,'SYS_GETRLIMIT',2 + SYSCALL 98,sys_getrusage,'SYS_GETRUSAGE',2 + SYSCALL 99,sys_sysinfo,'SYS_SYSINFO',1 + SYSCALL 100,sys_times,'SYS_TIMES',1 + SYSCALL 101,sys_ptrace,'SYS_PTRACE',4 + SYSCALL 102,sys_getuid,'SYS_GETUID',0 + SYSCALL 103,sys_syslog,'SYS_SYSLOG',3 + SYSCALL 104,sys_getgid,'SYS_GETGID',0 + SYSCALL 105,sys_setuid,'SYS_SETUID',1 + SYSCALL 106,sys_setgid,'SYS_SETGID',1 + SYSCALL 107,sys_geteuid,'SYS_GETEUID',0 + SYSCALL 108,sys_getegid,'SYS_GETEGID',0 + SYSCALL 109,sys_setpgid,'SYS_SETPGID',2 + SYSCALL 110,sys_getppid,'SYS_GETPPID',0 + SYSCALL 111,sys_getpgrp,'SYS_GETPGRP',0 + SYSCALL 112,sys_setsid,'SYS_SETSID',0 + SYSCALL 113,sys_setreuid,'SYS_SETREUID',2 + SYSCALL 114,sys_setregid,'SYS_SETREGID',2 + SYSCALL 115,sys_getgroups,'SYS_GETGROUPS',2 + SYSCALL 116,sys_setgroups,'SYS_SETGROUPS',2 + SYSCALL 117,sys_setresuid,'SYS_SETRESUID',3 + SYSCALL 118,sys_getresuid,'SYS_GETRESUID',3 + SYSCALL 119,sys_setresgid,'SYS_SETRESGID',3 + SYSCALL 120,sys_getresgid,'SYS_GETRESGID',3 + SYSCALL 121,sys_getpgid,'SYS_GETPGID',1 + SYSCALL 122,sys_setfsuid,'SYS_SETFSUID',1 + SYSCALL 123,sys_setfsgid,'SYS_SETFSGID',1 + SYSCALL 124,sys_getsid,'SYS_GETSID',1 + SYSCALL 125,sys_capget,'SYS_CAPGET',2 + SYSCALL 126,sys_capset,'SYS_CAPSET',2 + SYSCALL 127,sys_rt_sigpending,'SYS_RT_SIGPENDING',2 + SYSCALL 128,sys_rt_sigtimedwait,'SYS_RT_SIGTIMEDWAIT',4 + SYSCALL 129,sys_rt_sigqueueinfo,'SYS_RT_SIGQUEUEINFO',3 + SYSCALL 130,sys_rt_sigsuspend,'SYS_RT_SIGSUSPEND',2 + SYSCALL 131,sys_sigaltstack,'SYS_SIGALTSTACK',2 + SYSCALL 132,sys_utime,'SYS_UTIME',2 + SYSCALL 133,sys_mknod,'SYS_MKNOD',3 + ;SYSCALL 134,sys_uselib,'SYS_USELIB', NOT IMPLEMENTED + SYSCALL 135,sys_personality,'SYS_PERSONALITY',1 + SYSCALL 136,sys_ustat,'SYS_USTAT',2 + SYSCALL 137,sys_statfs,'SYS_STATFS',2 + SYSCALL 138,sys_fstatfs,'SYS_FSTATFS',2 + SYSCALL 139,sys_sysfs,'SYS_SYSFS',3 + SYSCALL 140,sys_getpriority,'SYS_GETPRIORITY',2 + SYSCALL 141,sys_setpriority,'SYS_SETPRIORITY',3 + SYSCALL 142,sys_sched_setparam,'SYS_SCHED_SETPARAM',2 + SYSCALL 143,sys_sched_getparam,'SYS_SCHED_GETPARAM',2 + SYSCALL 144,sys_sched_setscheduler,'SYS_SCHED_SETSCHEDULER',3 + SYSCALL 145,sys_sched_getscheduler,'SYS_SCHED_GETSCHEDULER',1 + SYSCALL 146,sys_sched_get_priority_max,'SYS_SCHED_GET_PRIORITY_MAX',1 + SYSCALL 147,sys_sched_get_priority_min,'SYS_SCHED_GET_PRIORITY_MIN',1 + SYSCALL 148,sys_sched_rr_get_interval,'SYS_SCHED_RR_GET_INTERVAL',2 + SYSCALL 149,sys_mlock,'SYS_MLOCK',2 + SYSCALL 150,sys_munlock,'SYS_MUNLOCK',2 + SYSCALL 151,sys_mlockall,'SYS_MLOCKALL',1 + SYSCALL 152,sys_munlockall,'SYS_MUNLOCKALL',0 + SYSCALL 153,sys_vhangup,'SYS_VHANGUP',0 + SYSCALL 154,sys_modify_ldt,'SYS_MODIFY_LDT',3 + SYSCALL 155,sys_pivot_root,'SYS_PIVOT_ROOT',2 + SYSCALL 156,sys__sysctl,'SYS__SYSCTL',1 + SYSCALL 157,sys_prctl,'SYS_PRCTL',6 + SYSCALL 158,sys_arch_prctl,'SYS_ARCH_PRCTL',3 + SYSCALL 159,sys_adjtimex,'SYS_ADJTIMEX',1 + SYSCALL 160,sys_setrlimit,'SYS_SETRLIMIT',2 + SYSCALL 161,sys_chroot,'SYS_CHROOT',1 + SYSCALL 162,sys_sync,'SYS_SYNC',0 + SYSCALL 163,sys_acct,'SYS_ACCT',1 + SYSCALL 164,sys_settimeofday,'SYS_SETTIMEOFDAY',2 + SYSCALL 165,sys_mount,'SYS_MOUNT',5 + SYSCALL 166,sys_umount2,'SYS_UMOUNT2',2 + SYSCALL 167,sys_swapon,'SYS_SWAPON',2 + SYSCALL 168,sys_swapoff,'SYS_SWAPOFF',1 + SYSCALL 169,sys_reboot,'SYS_REBOOT',4 + SYSCALL 170,sys_sethostname,'SYS_SETHOSTNAME',2 + SYSCALL 171,sys_setdomainname,'SYS_SETDOMAINNAME',2 + SYSCALL 172,sys_iopl,'SYS_IOPL',2 + SYSCALL 173,sys_ioperm,'SYS_IOPERM',3 + ;SYSCALL 174,sys_create_module,'SYS_CREATE_MODULE' REMOVED IN Linux 2.6 + SYSCALL 175,sys_init_module,'SYS_INIT_MODULE',3 + SYSCALL 176,sys_delete_module,'SYS_DELETE_MODULE',2 + ;SYSCALL 177,sys_get_kernel_syms, REMOVED IN Linux 2.6 + ;SYSCALL 178,sys_query_module,'SYS_QUERY_MODULE', REMOVED IN Linux 2.6 + SYSCALL 179,sys_quotactl,'SYS_QUOTACTL',4 + ;SYSCALL 180,sys_nfsservctl,'SYS_NFSSERVCTL', NOT IMPLEMENTED + ;SYSCALL 181,sys_getpmsg,'SYS_GETPMSG', NOT IMPLEMENTED + ;SYSCALL 182,sys_putpmsg,'SYS_PUTPMSG', NOT IMPLEMENTED + ;SYSCALL 183,sys_afs_syscall,'SYS_AFS_SYSCALL', NOT IMPLEMENTED + ;SYSCALL 184,sys_tuxcall,'SYS_TUXCALL', NOT IMPLEMENTED + ;SYSCALL 185,sys_security,'SYS_SECURITY', NOT IMPLEMENTED + SYSCALL 186,sys_gettid,'SYS_GETTID',0 + SYSCALL 187,sys_readahead,'SYS_READAHEAD',3 + SYSCALL 188,sys_setxattr,'SYS_SETXATTR',5 + SYSCALL 189,sys_lsetxattr,'SYS_LSETXATTR',5 + SYSCALL 190,sys_fsetxattr,'SYS_FSETXATTR',5 + SYSCALL 191,sys_getxattr,'SYS_GETXATTR',4 + SYSCALL 192,sys_lgetxattr,'SYS_LGETXATTR',4 + SYSCALL 193,sys_fgetxattr,'SYS_FGETXATTR',4 + SYSCALL 194,sys_listxattr,'SYS_LISTXATTR',3 + SYSCALL 195,sys_llistxattr,'SYS_LLISTXATTR',4 + SYSCALL 196,sys_flistxattr,'SYS_FLISTXATTR',3 + SYSCALL 197,sys_removexattr,'SYS_REMOVEXATTR',2 + SYSCALL 198,sys_lremovexattr,'SYS_LREMOVEXATTR',2 + SYSCALL 199,sys_fremovexattr,'SYS_FREMOVEXATTR',2 + SYSCALL 200,sys_tkill,'SYS_TKILL',2 + SYSCALL 201,sys_time,'SYS_TIME',1 + SYSCALL 202,sys_futex,'SYS_FUTEX',6 + SYSCALL 203,sys_sched_setaffinity,'SYS_SCHED_SETAFFINITY',3 + SYSCALL 204,sys_sched_getaffinity,'SYS_SCHED_GETAFFINITY',3 + ;SYSCALL 205,sys_set_thread_area, NOT IMPLEMENTED. Use arch_prctl + SYSCALL 206,sys_io_setup,'SYS_IO_SETUP',2 + SYSCALL 207,sys_io_destroy,'SYS_IO_DESTROY',2 + SYSCALL 208,sys_io_getevents,'SYS_IO_GETEVENTS',4 + SYSCALL 209,sys_io_submit,'SYS_IO_SUBMIT',3 + SYSCALL 210,sys_io_cancel,'SYS_IO_CANCEL',3 + ;SYSCALL 211,sys_get_thread_area, NOT IMPLEMENTED. Use arch_prctl + SYSCALL 212,sys_lookup_dcookie,'SYS_LOOKUP_DCOOKIE',3 + SYSCALL 213,sys_epoll_create,'SYS_EPOLL_CREATE',1 + ;SYSCALL 214,sys_epoll_ctl_old,'SYS_EPOLL_CTL_OLD', NOT IMPLEMENTED + ;SYSCALL 215,sys_epoll_wait_old,'SYS_EPOLL_WAIT_OLD', NOT IMPLEMENTED + SYSCALL 216,sys_remap_file_pages,'SYS_REMAP_FILE_PAGES',5 + SYSCALL 217,sys_getdents64,'SYS_GETDENTS64',3 + SYSCALL 218,sys_set_tid_address,'SYS_SET_TID_ADDRESS',1 + SYSCALL 219,sys_restart_syscall,'SYS_RESTART_SYSCALL',0 + SYSCALL 220,sys_semtimedop,'SYS_SEMTIMEDOP',4 + SYSCALL 221,sys_fadvise64,'SYS_FADVISE64',4 + SYSCALL 222,sys_timer_create,'SYS_TIMER_CREATE',3 + SYSCALL 223,sys_timer_settime,'SYS_TIMER_SETTIME',4 + SYSCALL 224,sys_timer_gettime,'SYS_TIMER_GETTIME',2 + SYSCALL 225,sys_timer_getoverrun,'SYS_TIMER_GETOVERRUN',1 + SYSCALL 226,sys_timer_delete,'SYS_TIMER_DELETE',1 + SYSCALL 227,sys_clock_settime,'SYS_CLOCK_SETTIME',2 + SYSCALL 228,sys_clock_gettime,'SYS_CLOCK_GETTIME',2 + SYSCALL 229,sys_clock_getres,'SYS_CLOCK_GETRES',2 + SYSCALL 230,sys_clock_nanosleep,'SYS_CLOCK_NANOSLEEP',4 + SYSCALL 231,sys_exit_group,'SYS_EXIT_GROUP',1 + SYSCALL 232,sys_epoll_wait,'SYS_EPOLL_WAIT',4 + SYSCALL 233,sys_epoll_ctl,'SYS_EPOLL_CTL',4 + SYSCALL 234,sys_tgkill,'SYS_TGKILL',3 + SYSCALL 235,sys_utimes,'SYS_UTIMES',2 + ;SYSCALL 236,sys_vserver,'SYS_VSERVER', NOT IMPLEMENTED + SYSCALL 237,sys_mbind,'SYS_MBIND',6 + SYSCALL 238,sys_set_mempolicy,'SYS_SET_MEMPOLICY',3 + SYSCALL 239,sys_get_mempolicy,'SYS_GET_MEMPOLICY',5 + SYSCALL 240,sys_mq_open,'SYS_MQ_OPEN',4 + SYSCALL 241,sys_mq_unlink,'SYS_MQ_UNLINK',1 + SYSCALL 242,sys_mq_timedsend,'SYS_MQ_TIMEDSEND',5 + SYSCALL 243,sys_mq_timedreceive,'SYS_MQ_TIMEDRECEIVE',5 + SYSCALL 244,sys_mq_notify,'SYS_MQ_NOTIFY',2 + SYSCALL 245,sys_mq_getsetattr,'SYS_MQ_GETSETATTR',3 + SYSCALL 246,sys_kexec_load,'SYS_KEXEC_LOAD',4 + SYSCALL 247,sys_waitid,'SYS_WAITID',5 + SYSCALL 248,sys_add_key,'SYS_ADD_KEY',4 + SYSCALL 249,sys_request_key,'SYS_REQUEST_KEY',4 + SYSCALL 250,sys_keyctl,'SYS_KEYCTL',5 + SYSCALL 251,sys_ioprio_set,'SYS_IOPRIO_SET',3 + SYSCALL 252,sys_ioprio_get,'SYS_IOPRIO_GET',2 + SYSCALL 253,sys_inotify_init,'SYS_INOTIFY_INIT',0 + SYSCALL 254,sys_inotify_add_watch,'SYS_INOTIFY_ADD_WATCH',3 + SYSCALL 255,sys_inotify_rm_watch,'SYS_INOTIFY_RM_WATCH',2 + SYSCALL 256,sys_migrate_pages,'SYS_MIGRATE_PAGES',4 + SYSCALL 257,sys_openat,'SYS_OPENAT',4 + SYSCALL 258,sys_mkdirat,'SYS_MKDIRAT',3 + SYSCALL 259,sys_mknodat,'SYS_MKNODAT',4 + SYSCALL 260,sys_fchownat,'SYS_FCHOWNAT',5 + SYSCALL 261,sys_futimesat,'SYS_FUTIMESAT',3 + SYSCALL 262,sys_newfstatat,'SYS_NEWFSTATAT',4 + SYSCALL 263,sys_unlinkat,'SYS_UNLINKAT',3 + SYSCALL 264,sys_renameat,'SYS_RENAMEAT',4 + SYSCALL 265,sys_linkat,'SYS_LINKAT',5 + SYSCALL 266,sys_symlinkat,'SYS_SYMLINKAT',3 + SYSCALL 267,sys_readlinkat,'SYS_READLINKAT',4 + SYSCALL 268,sys_fchmodat,'SYS_FCHMODAT',3 + SYSCALL 269,sys_faccessat,'SYS_FACCESSAT',3 + SYSCALL 270,sys_pselect6,'SYS_PSELECT6',6 + SYSCALL 271,sys_ppoll,'SYS_PPOLL',5 + SYSCALL 272,sys_unshare,'SYS_UNSHARE',1 + SYSCALL 273,sys_set_robust_list,'SYS_SET_ROBUST_LIST',2 + SYSCALL 274,sys_get_robust_list,'SYS_GET_ROBUST_LIST',3 + SYSCALL 275,sys_splice,'SYS_SPLICE',6 + SYSCALL 276,sys_tee,'SYS_TEE',4 + SYSCALL 277,sys_sync_file_range,'SYS_SYNC_FILE_RANGE',4 + SYSCALL 278,sys_vmsplice,'SYS_VMSPLICE',4 + SYSCALL 279,sys_move_pages,'SYS_MOVE_PAGES',6 + SYSCALL 280,sys_utimensat,'SYS_UTIMENSAT',4 + SYSCALL 281,sys_epoll_pwait,'SYS_EPOLL_PWAIT',6 + SYSCALL 282,sys_signalfd,'SYS_SIGNALFD',3 + SYSCALL 283,sys_timerfd_create,'SYS_TIMERFD_CREATE',2 + SYSCALL 284,sys_eventfd,'SYS_EVENTFD',1 + SYSCALL 285,sys_fallocate,'SYS_FALLOCATE',4 + SYSCALL 286,sys_timerfd_settime,'SYS_TIMERFD_SETTIME',4 + SYSCALL 287,sys_timerfd_gettime,'SYS_TIMERFD_GETTIME',2 + SYSCALL 288,sys_accept4,'SYS_ACCEPT4',4 + SYSCALL 289,sys_signalfd4,'SYS_SIGNALFD4',4 + SYSCALL 290,sys_eventfd2,'SYS_EVENTFD2',2 + SYSCALL 291,sys_epoll_create1,'SYS_EPOLL_CREATE1',1 + SYSCALL 292,sys_dup3,'SYS_DUP3',3 + SYSCALL 293,sys_pipe2,'SYS_PIPE2',2 + SYSCALL 294,sys_inotify_init1,'SYS_INOTIFY_INIT1',1 + SYSCALL 295,sys_preadv,'SYS_PREADV',5 + SYSCALL 296,sys_pwritev,'SYS_PWRITEV',5 + SYSCALL 297,sys_rt_tgsigqueueinfo,'SYS_RT_TGSIGQUEUEINFO',4 + SYSCALL 298,sys_perf_event_open,'SYS_PERF_EVENT_OPEN',5 + SYSCALL 299,sys_recvmmsg,'SYS_RECVMMSG',5 + SYSCALL 300,sys_fanotify_init,'SYS_FANOTIFY_INIT',2 + SYSCALL 301,sys_fanotify_mark,'SYS_FANOTIFY_MARK',5 + SYSCALL 302,sys_prlimit64,'SYS_PRLIMIT64',4 + SYSCALL 303,sys_name_to_handle_at,'SYS_NAME_TO_HANDLE_AT',5 + SYSCALL 304,sys_open_by_handle_at,'SYS_OPEN_BY_HANDLE_AT',5 + SYSCALL 305,sys_clock_adjtime,'SYS_CLOCK_ADJTIME',2 + SYSCALL 306,sys_syncfs,'SYS_SYNCFS',1 + SYSCALL 307,sys_sendmmsg,'SYS_SENDMMSG',4 + SYSCALL 308,sys_setns,'SYS_SETNS',2 + SYSCALL 309,sys_getcpu,'SYS_GETCPU',3 + SYSCALL 310,sys_process_vm_readv,'SYS_PROCESS_VM_READV',6 + SYSCALL 311,sys_process_vm_writev,'SYS_PROCESS_VM_WRITEV',6 + SYSCALL 312,sys_kcmp,'SYS_KCMP',5 + SYSCALL 313,sys_finit_module,'SYS_FINIT_MODULE',3 + SYSCALL 314,sys_sched_setattr,'SYS_SCHED_SETATTR',3 + SYSCALL 315,sys_sched_getattr,'SYS_SCHED_GETATTR',4 + SYSCALL 316,sys_renameat2,'SYS_RENAMEAT2',5 + SYSCALL 317,sys_seccomp,'SYS_SECCOMP',3 + SYSCALL 318,sys_getrandom,'SYS_GETRANDOM',3 + SYSCALL 319,sys_memfd_create,'SYS_MEMFD_CREATE',2 + SYSCALL 320,sys_kexec_file_load,'SYS_KEXEC_FILE_LOAD',5 + SYSCALL 321,sys_bpf,'SYS_BPF',3 + SYSCALL 322,sys_stub_execveat,'SYS_STUB_EXECVEAT',5 + SYSCALL 323,sys_userfaultfd,'SYS_USERFAULTFD',1 + SYSCALL 324,sys_membarrier,'SYS_MEMBARRIER',2 + SYSCALL 325,sys_mlock2,'SYS_MLOCK2',3 + SYSCALL 326,sys_copy_file_range,'SYS_COPY_FILE_RANGE',6 + SYSCALL 327,sys_preadv2,'SYS_PREADV2',6 + SYSCALL 328,sys_pwritev2,'SYS_PWRITEV2',6 + SYSCALL 329,sys_pkey_mprotect,'SYS_PKEY_MPROTECT',0 + SYSCALL 330,sys_pkey_alloc,'SYS_PKEY_ALLOC',0 + SYSCALL 331,sys_pkey_free,'SYS_PKEY_FREE',0 + SYSCALL 332,sys_statx,'SYS_STATX',0 + SYSCALL 333,sys_io_pgetevents,'SYS_IO_PGETEVENTS',0 + SYSCALL 334,sys_rseq,'SYS_RSEQ',0 + SYSCALL 335,sys_pkey_mprotect1,'SYS_PKEY_MPROTECT1',0 +==== -- 2.39.2