rre: add a sys:system
word
FossilOrigin-Name: 72327d3b0cc6574bc791de4b5bb6ecbd27e0b41cf198e110a19e42e1f967dfbb
This commit is contained in:
parent
70a4095f09
commit
0b4e17e66b
5 changed files with 11 additions and 4 deletions
File diff suppressed because one or more lines are too long
|
@ -339,6 +339,7 @@ void execute(int cell) {
|
||||||
stack_push(string_inject(sys_argv[a + 2], b));
|
stack_push(string_inject(sys_argv[a + 2], b));
|
||||||
break;
|
break;
|
||||||
case -6200: ngaGopherUnit(); break;
|
case -6200: ngaGopherUnit(); break;
|
||||||
|
case -8000: system(string_extract(stack_pop())); break;
|
||||||
default: printf("Invalid instruction!\n");
|
default: printf("Invalid instruction!\n");
|
||||||
printf("At %d, opcode %d\n", ip, opcode);
|
printf("At %d, opcode %d\n", ip, opcode);
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
|
@ -73,6 +73,12 @@ Returns:
|
||||||
:sys:argv (n-s) s:empty swap `-6101 ;
|
:sys:argv (n-s) s:empty swap `-6101 ;
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
|
# System Interaction
|
||||||
|
|
||||||
|
~~~
|
||||||
|
:sys:system (s-) `-8000 ;
|
||||||
|
~~~
|
||||||
|
|
||||||
---------------------------------------------------------------
|
---------------------------------------------------------------
|
||||||
|
|
||||||
# File I/O
|
# File I/O
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
____ _ _
|
____ _ _
|
||||||
|| \\ \\ //
|
|| \\ \\ //
|
||||||
||_// )x(
|
||_// )x(
|
||||||
|| \\ // \\ 2017.11
|
|| \\ // \\ 2017.12
|
||||||
a minimalist forth for nga
|
a minimalist forth for nga
|
||||||
|
|
||||||
*Rx* (*retro experimental*) is a minimal Forth implementation for the
|
*Rx* (*retro experimental*) is a minimal Forth implementation for the
|
||||||
|
@ -55,7 +55,7 @@ r 9999
|
||||||
d 1536
|
d 1536
|
||||||
|
|
||||||
: Version
|
: Version
|
||||||
d 201711
|
d 201712
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
Both of these are pointers. `Dictionary` points to the most recent
|
Both of these are pointers. `Dictionary` points to the most recent
|
||||||
|
|
BIN
ngaImage
BIN
ngaImage
Binary file not shown.
Loading…
Reference in a new issue