From 68df24fa778f7f5a2651a4623681f38dc920c490 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Mon, 7 Sep 2020 16:38:14 -0700 Subject: 6746 --- html/400.mu.html | 227 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 115 insertions(+), 112 deletions(-) (limited to 'html/400.mu.html') diff --git a/html/400.mu.html b/html/400.mu.html index 5464f1e1..9dd0217a 100644 --- a/html/400.mu.html +++ b/html/400.mu.html @@ -80,7 +80,7 @@ if ('onhashchange' in window) { 25 # grep -h '^[a-z]' [0-9]*.subx |grep -v '^test-' 26 # Functions we don't want to make accessible from Mu are commented out. 27 # Many functions here may not be usable yet because of missing features - 28 # (global variable support, type definitions for stuff like `stream`) + 28 # (global variable support, etc.) 29 sig check-ints-equal a: int, b: int, msg: (addr array byte) 30 sig kernel-string-equal? s: (addr kernel-string), benchmark: (addr array byte) -> result/eax: boolean 31 sig new-segment len: int, ad: (addr allocation-descriptor) @@ -97,7 +97,7 @@ if ('onhashchange' in window) { 42 sig next-line-matches? t: (addr stream byte), line: (addr array byte) -> result/eax: boolean 43 sig skip-next-line t: (addr stream byte) 44 sig clear-trace-stream - 45 #sig write f: fd or (addr stream byte), s: (addr array byte) + 45 sig write f: (addr stream byte), s: (addr array byte) # writing to file descriptor not supported; use buffered-file 46 sig stream-data-equal? f: (addr stream byte), s: (addr array byte) -> result/eax: boolean 47 sig check-stream-equal f: (addr stream byte), s: (addr array byte), msg: (addr array byte) 48 sig next-stream-line-equal? f: (addr stream byte), s: (addr array byte) -> result/eax: boolean @@ -106,116 +106,119 @@ if ('onhashchange' in window) { 51 sig stop ed: (addr exit-descriptor), value: int 52 #sig read f: fd or (addr stream byte), s: (addr stream byte) -> num-bytes-read/eax: int 53 sig read-byte-buffered f: (addr buffered-file) -> byte-or-Eof/eax: byte - 54 #sig write-stream f: fd or (addr stream byte), s: (addr stream byte) - 55 #sig error ed: (addr exit-descriptor), out: fd or (addr stream byte), msg: (addr array byte) - 56 sig write-byte-buffered f: (addr buffered-file), n: int - 57 sig flush f: (addr buffered-file) - 58 sig append-byte f: (addr stream byte), n: int - 59 sig write-buffered f: (addr buffered-file), msg: (addr array byte) - 60 #sig to-hex-char in/eax: int -> out/eax: int - 61 sig append-byte-hex f: (addr stream byte), n: int - 62 sig write-byte-hex-buffered f: (addr buffered-file), n: int - 63 sig write-int32-hex f: (addr stream byte), n: int - 64 sig write-int32-hex-buffered f: (addr buffered-file), n: int - 65 sig is-hex-int? in: (addr slice) -> result/eax: boolean - 66 sig parse-hex-int in: (addr array byte) -> result/eax: int - 67 sig parse-hex-int-from-slice in: (addr slice) -> result/eax: int - 68 #sig parse-hex-int-helper start: (addr byte), end: (addr byte) -> result/eax: int - 69 sig is-hex-digit? c: byte -> result/eax: boolean - 70 #sig from-hex-char in/eax: byte -> out/eax: nibble - 71 sig error-byte ed: (addr exit-descriptor), out: (addr buffered-file), msg: (addr array byte), n: byte - 72 #sig allocate ad: (addr allocation-descriptor), n: int, out: (addr handle _) - 73 #sig allocate-raw ad: (addr allocation-descriptor), n: int, out: (addr handle _) - 74 sig lookup h: (handle _T) -> result/eax: (addr _T) - 75 sig handle-equal? a: (handle _T), b: (handle _T) -> result/eax: boolean - 76 sig copy-handle src: (handle _T), dest: (addr handle _T) - 77 #sig allocate-region ad: (addr allocation-descriptor), n: int, out: (addr handle allocation-descriptor) - 78 #sig allocate-array ad: (addr allocation-descriptor), n: int, out: (addr handle _) - 79 sig copy-array ad: (addr allocation-descriptor), src: (addr array _T), out: (addr handle array _T) - 80 #sig zero-out start: (addr byte), size: int - 81 #sig new-stream ad: (addr allocation-descriptor), length: int, elemsize: int, out: (addr handle stream _) - 82 sig read-line-buffered f: (addr buffered-file), s: (addr stream byte) - 83 sig read-line f: (addr stream byte), s: (addr stream byte) - 84 sig slice-empty? s: (addr slice) -> result/eax: boolean - 85 sig slice-equal? s: (addr slice), p: (addr array byte) -> result/eax: boolean - 86 sig slice-starts-with? s: (addr slice), head: (addr array byte) -> result/eax: boolean - 87 sig write-slice out: (addr stream byte), s: (addr slice) - 88 sig write-slice-buffered out: (addr buffered-file), s: (addr slice) - 89 sig slice-to-string ad: (addr allocation-descriptor), in: (addr slice), out: (addr handle array byte) - 90 sig next-token in: (addr stream byte), delimiter: byte, out: (addr slice) - 91 sig next-token-from-slice start: (addr byte), end: (addr byte), delimiter: byte, out: (addr slice) - 92 sig skip-chars-matching in: (addr stream byte), delimiter: byte - 93 sig skip-chars-matching-whitespace in: (addr stream byte) - 94 sig skip-chars-not-matching in: (addr stream byte), delimiter: byte - 95 sig skip-chars-not-matching-whitespace in: (addr stream byte) - 96 #sig skip-chars-matching-in-slice curr: (addr byte), end: (addr byte), delimiter: byte -> curr/eax: (addr byte) - 97 #sig skip-chars-matching-whitespace-in-slice curr: (addr byte), end: (addr byte) -> curr/eax: (addr byte) - 98 #sig skip-chars-not-matching-in-slice curr: (addr byte), end: (addr byte), delimiter: byte -> curr/eax: (addr byte) - 99 #sig skip-chars-not-matching-whitespace-in-slice curr: (addr byte), end: (addr byte) -> curr/eax: (addr byte) -100 sig skip-string line: (addr stream byte) -101 #sig skip-string-in-slice curr: (addr byte), end: (addr byte) -> curr/eax: (addr byte) -102 sig skip-until-close-paren line: (addr stream byte) -103 #sig skip-until-close-paren-in-slice curr: (addr byte), end: (addr byte) -> curr/eax: (addr byte) -104 sig write-stream-data f: (addr buffered-file), s: (addr stream byte) -105 sig write-int32-decimal out: (addr stream byte), n: int32 -106 sig is-decimal-digit? c: byte -> result/eax: boolean -107 sig to-decimal-digit in: byte -> out/eax: int -108 sig next-word line: (addr stream byte), out: (addr slice) -109 sig has-metadata? word: (addr slice), s: (addr string) -> result/eax: boolean -110 sig is-valid-name? in: (addr slice) -> result/eax: boolean -111 sig is-label? word: (addr slice) -> result/eax: boolean -112 sig emit-hex out: (addr buffered-file), n: int, width: int -113 sig emit out: (addr buffered-file), word: (addr slice), width: int -114 #sig get table: (addr stream {(handle array byte), T}), key: (addr array byte), row-size: int, abort-message-prefix: (addr array byte) -> result/eax: (addr T) -115 #sig get-slice table: (addr stream {(handle array byte), T}), key: (addr slice), row-size: int, abort-message-prefix: (addr array byte) -> result/eax: (addr T) -116 #sig get-or-insert table: (addr stream {(handle array byte), T}), key: (addr array byte), row-size: int, ad: (addr allocation-descriptor) -> result/eax: (addr T) -117 #sig get-or-insert-handle table: (addr stream {(handle array byte), T}), key: (handle array byte), row-size: int -> result/eax: (addr T) -118 #sig get-or-insert-slice table: (addr stream {(handle array byte), T}), key: (addr slice), row-size: int, ad: (addr allocation-descriptor) -> result/eax: (addr T) -119 #sig get-or-stop table: (addr stream {(handle array byte), T}), key: (addr array byte), row-size: int -120 #sig get-slice-or-stop table: (addr stream {(handle array byte), _}), key: (addr slice), row-size: int -121 #sig maybe-get table: (addr stream {(handle array byte), T}), key: (addr array byte), row-size: int -> result/eax: (addr T) -122 #sig maybe-get-slice table: (addr stream {(handle array byte), T}), key: (addr slice), row-size: int -> result/eax: (addr T) -123 sig slurp f: (addr buffered-file), s: (addr stream byte) -124 sig compute-width word: (addr array byte) -> result/eax: int -125 sig compute-width-of-slice s: (addr slice) -> result/eax: int -126 sig emit-hex-array out: (addr buffered-file), arr: (addr array byte) -127 sig next-word-or-string line: (addr stream byte), out: (addr slice) -128 sig write-int out: (addr stream byte), n: int -129 sig clear-stack s: (addr stack) -130 sig push s: (addr stack), n: int -131 sig pop s: (addr stack) -> n/eax: int -132 sig top s: (addr stack) -> n/eax: int -133 sig array-equal? a: (addr array int), b: (addr array int) -> result/eax: boolean -134 sig parse-array-of-ints ad: (addr allocation-descriptor), s: (addr string), out: (addr handle array int) -135 sig check-array-equal a: (addr array int), expected: (addr string), msg: (addr string) -136 #sig push-n-zero-bytes n: int -137 sig kernel-string-to-string ad: (addr allocation-descriptor), in: (addr kernel-string), out: (addr handle array byte) -138 sig kernel-string-length in: (addr kernel-string) -> result/eax: int -139 sig enable-screen-grid-mode -140 sig enable-screen-type-mode -141 sig real-screen-size -> nrows/eax: int, ncols/ecx: int -142 sig clear-real-screen -143 sig move-cursor-on-real-screen row: int, column: int -144 sig print-string-to-real-screen s: (addr array byte) -145 sig print-stream-to-real-screen s: (addr stream byte) -146 sig print-grapheme-to-real-screen c: grapheme -147 sig print-int32-hex-to-real-screen n: int -148 sig reset-formatting-on-real-screen -149 sig start-color-on-real-screen fg: int, bg: int -150 sig start-bold-on-real-screen -151 sig start-underline-on-real-screen -152 sig start-reverse-video-on-real-screen -153 sig start-blinking-on-real-screen -154 sig hide-cursor-on-real-screen -155 sig show-cursor-on-real-screen -156 sig enable-keyboard-immediate-mode -157 sig enable-keyboard-type-mode -158 sig read-key -> result/eax: byte -159 sig open filename: (addr array byte), write?: boolean, out: (addr handle buffered-file) -160 #sig size in: (addr array _) -> result/eax: int -161 -162 sig stream-empty? s: (addr stream _) -> result/eax: boolean -163 sig stream-full? s: (addr stream _) -> result/eax: boolean + 54 sig read-byte s: (addr stream byte) -> result/eax: byte + 55 #sig write-stream f: fd or (addr stream byte), s: (addr stream byte) + 56 #sig error ed: (addr exit-descriptor), out: fd or (addr stream byte), msg: (addr array byte) + 57 sig write-byte-buffered f: (addr buffered-file), n: int + 58 sig flush f: (addr buffered-file) + 59 sig append-byte f: (addr stream byte), n: int + 60 sig write-buffered f: (addr buffered-file), msg: (addr array byte) + 61 #sig to-hex-char in/eax: int -> out/eax: int + 62 sig append-byte-hex f: (addr stream byte), n: int + 63 sig write-byte-hex-buffered f: (addr buffered-file), n: int + 64 sig write-int32-hex f: (addr stream byte), n: int + 65 sig write-int32-hex-buffered f: (addr buffered-file), n: int + 66 sig is-hex-int? in: (addr slice) -> result/eax: boolean + 67 sig parse-hex-int in: (addr array byte) -> result/eax: int + 68 sig parse-hex-int-from-slice in: (addr slice) -> result/eax: int + 69 #sig parse-hex-int-helper start: (addr byte), end: (addr byte) -> result/eax: int + 70 sig is-hex-digit? c: byte -> result/eax: boolean + 71 #sig from-hex-char in/eax: byte -> out/eax: nibble + 72 sig error-byte ed: (addr exit-descriptor), out: (addr buffered-file), msg: (addr array byte), n: byte + 73 #sig allocate ad: (addr allocation-descriptor), n: int, out: (addr handle _) + 74 #sig allocate-raw ad: (addr allocation-descriptor), n: int, out: (addr handle _) + 75 sig lookup h: (handle _T) -> result/eax: (addr _T) + 76 sig handle-equal? a: (handle _T), b: (handle _T) -> result/eax: boolean + 77 sig copy-handle src: (handle _T), dest: (addr handle _T) + 78 #sig allocate-region ad: (addr allocation-descriptor), n: int, out: (addr handle allocation-descriptor) + 79 #sig allocate-array ad: (addr allocation-descriptor), n: int, out: (addr handle _) + 80 sig copy-array ad: (addr allocation-descriptor), src: (addr array _T), out: (addr handle array _T) + 81 #sig zero-out start: (addr byte), size: int + 82 #sig new-stream ad: (addr allocation-descriptor), length: int, elemsize: int, out: (addr handle stream _) + 83 sig read-line-buffered f: (addr buffered-file), s: (addr stream byte) + 84 sig read-line f: (addr stream byte), s: (addr stream byte) + 85 sig slice-empty? s: (addr slice) -> result/eax: boolean + 86 sig slice-equal? s: (addr slice), p: (addr array byte) -> result/eax: boolean + 87 sig slice-starts-with? s: (addr slice), head: (addr array byte) -> result/eax: boolean + 88 sig write-slice out: (addr stream byte), s: (addr slice) + 89 sig write-slice-buffered out: (addr buffered-file), s: (addr slice) + 90 sig slice-to-string ad: (addr allocation-descriptor), in: (addr slice), out: (addr handle array byte) + 91 sig next-token in: (addr stream byte), delimiter: byte, out: (addr slice) + 92 sig next-token-from-slice start: (addr byte), end: (addr byte), delimiter: byte, out: (addr slice) + 93 sig skip-chars-matching in: (addr stream byte), delimiter: byte + 94 sig skip-chars-matching-whitespace in: (addr stream byte) + 95 sig skip-chars-not-matching in: (addr stream byte), delimiter: byte + 96 sig skip-chars-not-matching-whitespace in: (addr stream byte) + 97 #sig skip-chars-matching-in-slice curr: (addr byte), end: (addr byte), delimiter: byte -> curr/eax: (addr byte) + 98 #sig skip-chars-matching-whitespace-in-slice curr: (addr byte), end: (addr byte) -> curr/eax: (addr byte) + 99 #sig skip-chars-not-matching-in-slice curr: (addr byte), end: (addr byte), delimiter: byte -> curr/eax: (addr byte) +100 #sig skip-chars-not-matching-whitespace-in-slice curr: (addr byte), end: (addr byte) -> curr/eax: (addr byte) +101 sig skip-string line: (addr stream byte) +102 #sig skip-string-in-slice curr: (addr byte), end: (addr byte) -> curr/eax: (addr byte) +103 sig skip-until-close-paren line: (addr stream byte) +104 #sig skip-until-close-paren-in-slice curr: (addr byte), end: (addr byte) -> curr/eax: (addr byte) +105 sig write-stream-data f: (addr buffered-file), s: (addr stream byte) +106 sig write-int32-decimal out: (addr stream byte), n: int32 +107 sig is-decimal-digit? c: byte -> result/eax: boolean +108 sig to-decimal-digit in: byte -> out/eax: int +109 sig next-word line: (addr stream byte), out: (addr slice) +110 sig has-metadata? word: (addr slice), s: (addr string) -> result/eax: boolean +111 sig is-valid-name? in: (addr slice) -> result/eax: boolean +112 sig is-label? word: (addr slice) -> result/eax: boolean +113 sig emit-hex out: (addr buffered-file), n: int, width: int +114 sig emit out: (addr buffered-file), word: (addr slice), width: int +115 #sig get table: (addr stream {(handle array byte), T}), key: (addr array byte), row-size: int, abort-message-prefix: (addr array byte) -> result/eax: (addr T) +116 #sig get-slice table: (addr stream {(handle array byte), T}), key: (addr slice), row-size: int, abort-message-prefix: (addr array byte) -> result/eax: (addr T) +117 #sig get-or-insert table: (addr stream {(handle array byte), T}), key: (addr array byte), row-size: int, ad: (addr allocation-descriptor) -> result/eax: (addr T) +118 #sig get-or-insert-handle table: (addr stream {(handle array byte), T}), key: (handle array byte), row-size: int -> result/eax: (addr T) +119 #sig get-or-insert-slice table: (addr stream {(handle array byte), T}), key: (addr slice), row-size: int, ad: (addr allocation-descriptor) -> result/eax: (addr T) +120 #sig get-or-stop table: (addr stream {(handle array byte), T}), key: (addr array byte), row-size: int +121 #sig get-slice-or-stop table: (addr stream {(handle array byte), _}), key: (addr slice), row-size: int +122 #sig maybe-get table: (addr stream {(handle array byte), T}), key: (addr array byte), row-size: int -> result/eax: (addr T) +123 #sig maybe-get-slice table: (addr stream {(handle array byte), T}), key: (addr slice), row-size: int -> result/eax: (addr T) +124 sig slurp f: (addr buffered-file), s: (addr stream byte) +125 sig compute-width word: (addr array byte) -> result/eax: int +126 sig compute-width-of-slice s: (addr slice) -> result/eax: int +127 sig emit-hex-array out: (addr buffered-file), arr: (addr array byte) +128 sig next-word-or-string line: (addr stream byte), out: (addr slice) +129 sig write-int out: (addr stream byte), n: int +130 sig clear-stack s: (addr stack) +131 sig push s: (addr stack), n: int +132 sig pop s: (addr stack) -> n/eax: int +133 sig top s: (addr stack) -> n/eax: int +134 sig array-equal? a: (addr array int), b: (addr array int) -> result/eax: boolean +135 sig parse-array-of-ints ad: (addr allocation-descriptor), s: (addr string), out: (addr handle array int) +136 sig check-array-equal a: (addr array int), expected: (addr string), msg: (addr string) +137 #sig push-n-zero-bytes n: int +138 sig kernel-string-to-string ad: (addr allocation-descriptor), in: (addr kernel-string), out: (addr handle array byte) +139 sig kernel-string-length in: (addr kernel-string) -> result/eax: int +140 sig enable-screen-grid-mode +141 sig enable-screen-type-mode +142 sig real-screen-size -> nrows/eax: int, ncols/ecx: int +143 sig clear-real-screen +144 sig move-cursor-on-real-screen row: int, column: int +145 sig print-string-to-real-screen s: (addr array byte) +146 sig print-stream-to-real-screen s: (addr stream byte) +147 sig print-grapheme-to-real-screen c: grapheme +148 sig print-int32-hex-to-real-screen n: int +149 sig reset-formatting-on-real-screen +150 sig start-color-on-real-screen fg: int, bg: int +151 sig start-bold-on-real-screen +152 sig start-underline-on-real-screen +153 sig start-reverse-video-on-real-screen +154 sig start-blinking-on-real-screen +155 sig hide-cursor-on-real-screen +156 sig show-cursor-on-real-screen +157 sig enable-keyboard-immediate-mode +158 sig enable-keyboard-type-mode +159 sig read-key -> result/eax: byte +160 sig open filename: (addr array byte), write?: boolean, out: (addr handle buffered-file) +161 #sig size in: (addr array _) -> result/eax: int +162 +163 sig stream-empty? s: (addr stream _) -> result/eax: boolean +164 sig stream-full? s: (addr stream _) -> result/eax: boolean +165 +166 sig copy-bytes src: (addr byte), dest: (addr byte), n: int -- cgit 1.4.1-2-gfad0