rre: add a sys:system word

FossilOrigin-Name: 72327d3b0cc6574bc791de4b5bb6ecbd27e0b41cf198e110a19e42e1f967dfbb
This commit is contained in:
crc 2017-11-04 14:23:49 +00:00
parent 70a4095f09
commit 0b4e17e66b
5 changed files with 11 additions and 4 deletions

File diff suppressed because one or more lines are too long

View file

@ -339,6 +339,7 @@ void execute(int cell) {
stack_push(string_inject(sys_argv[a + 2], b));
break;
case -6200: ngaGopherUnit(); break;
case -8000: system(string_extract(stack_pop())); break;
default: printf("Invalid instruction!\n");
printf("At %d, opcode %d\n", ip, opcode);
exit(1);

View file

@ -73,6 +73,12 @@ Returns:
:sys:argv (n-s) s:empty swap `-6101 ;
~~~
# System Interaction
~~~
:sys:system (s-) `-8000 ;
~~~
---------------------------------------------------------------
# File I/O

View file

@ -1,7 +1,7 @@
____ _ _
|| \\ \\ //
||_// )x(
|| \\ // \\ 2017.11
|| \\ // \\ 2017.12
a minimalist forth for nga
*Rx* (*retro experimental*) is a minimal Forth implementation for the
@ -55,7 +55,7 @@ r 9999
d 1536
: Version
d 201711
d 201712
~~~
Both of these are pointers. `Dictionary` points to the most recent

BIN
ngaImage

Binary file not shown.