From d696221f2ad7dbb3d92e5c474d5bc5a73815ba8e Mon Sep 17 00:00:00 2001 From: crc Date: Thu, 20 Feb 2020 20:28:48 +0000 Subject: [PATCH] fix some references to the old end instruction (now called halt) FossilOrigin-Name: 9ec683cd989ae9f7186047422149200d256146cb68bf0f273e702054fcfae3c0 --- doc/Muri.md | 4 ++-- doc/RETRO-Book.md | 7 +------ doc/book/internals/nga | 7 +------ example/export-as-html.retro | 4 ++-- 4 files changed, 6 insertions(+), 16 deletions(-) diff --git a/doc/Muri.md b/doc/Muri.md index d1049ed..005601c 100644 --- a/doc/Muri.md +++ b/doc/Muri.md @@ -26,7 +26,7 @@ instruction name. For a non operation, use '..' instead of 2 dup 9 ccall 16 store 23 xor 3 drop 10 return 17 add 24 shift 4 swap 11 eq 18 sub 25 zret - 5 push 12 neq 19 mul 26 end + 5 push 12 neq 19 mul 26 halt 6 pop 13 lt 20 divmod 27 ienum E.g., for a sequence of dup, multiply, no-op, drop: @@ -178,7 +178,7 @@ int32_t opcode_for(char *s) { if (strcmp(s, "di") == 0) return 20; if (strcmp(s, "an") == 0) return 21; if (strcmp(s, "or") == 0) return 22; if (strcmp(s, "xo") == 0) return 23; if (strcmp(s, "sh") == 0) return 24; if (strcmp(s, "zr") == 0) return 25; - if (strcmp(s, "en") == 0) return 26; if (strcmp(s, "ie") == 0) return 27; + if (strcmp(s, "ha") == 0) return 26; if (strcmp(s, "ie") == 0) return 27; if (strcmp(s, "iq") == 0) return 28; if (strcmp(s, "ii") == 0) return 29; return 0; } diff --git a/doc/RETRO-Book.md b/doc/RETRO-Book.md index b16f824..6ecea5a 100644 --- a/doc/RETRO-Book.md +++ b/doc/RETRO-Book.md @@ -3473,7 +3473,7 @@ for return addresses. | 23 | xo | bitwise xor | xy-n | - | | 24 | sh | shift | xy-n | - | | 25 | zr | zero return | n-? | - | -| 26 | en | end | - | - | +| 26 | ha | halt | - | - | | 27 | ie | i/o enumerate | -n | - | | 28 | iq | i/o query | n-xy | - | | 29 | ii | i/o invoke | ...n- | - | @@ -3587,11 +3587,6 @@ The currently supported and reserved device identifiers are: This list may be revised in the future. The only guaranteed stable indentifier is 0000 for generic output. -## Trivia - -There are 810,000 possible combinations of instructions. Only -73 are used in the implementation of RETRO. - # Internals: Interface Layers Nga provides a virtual processor and an extensible way of adding diff --git a/doc/book/internals/nga b/doc/book/internals/nga index 07790cd..3f7ce5e 100644 --- a/doc/book/internals/nga +++ b/doc/book/internals/nga @@ -40,7 +40,7 @@ for return addresses. | 23 | xo | bitwise xor | xy-n | - | | 24 | sh | shift | xy-n | - | | 25 | zr | zero return | n-? | - | -| 26 | en | end | - | - | +| 26 | ha | halt | - | - | | 27 | ie | i/o enumerate | -n | - | | 28 | iq | i/o query | n-xy | - | | 29 | ii | i/o invoke | ...n- | - | @@ -153,8 +153,3 @@ The currently supported and reserved device identifiers are: This list may be revised in the future. The only guaranteed stable indentifier is 0000 for generic output. - -## Trivia - -There are 810,000 possible combinations of instructions. Only -73 are used in the implementation of RETRO. diff --git a/example/export-as-html.retro b/example/export-as-html.retro index 2eddac1..bebab2a 100755 --- a/example/export-as-html.retro +++ b/example/export-as-html.retro @@ -55,7 +55,7 @@ the token type and use `span`. (tokens_with_prefixes) dup fetch $: [ 'colon span ] case - $( [ 'comment span ] case + $( [ 'note span ] case $' [ 'str span ] case $# [ 'num span ] case $. [ 'fnum span ] case @@ -125,7 +125,7 @@ And finally, run it. span { white-space: pre } .text { color: #c5c8c6; white-space: pre } .colon { color: #cc6666; } -.comment { color: #969896; } +.note { color: #969896; } .str { color: #f0c674; } .num { color: #8abeb7; } .fnum { color: #8abeb7; font-weight: bold; }