From 1c349ac7c571a97978e1cbbe726430ae9c741972 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sat, 11 Jul 2020 00:02:29 -0700 Subject: 6631 --- html/400.mu.html | 218 +++++++++++++++++++++++++++++++++++++++ html/401time.mu.html | 101 ++++++++++++++++++ html/apps/arith.mu.html | 2 +- html/apps/browse.mu.html | 2 +- html/apps/crenshaw2-1.subx.html | 4 +- html/apps/crenshaw2-1b.subx.html | 4 +- html/apps/ex1.mu.html | 2 +- html/apps/ex2.mu.html | 2 +- html/apps/ex3.2.mu.html | 2 +- html/apps/ex3.mu.html | 2 +- html/apps/factorial.mu.html | 2 +- html/apps/mu.subx.html | 6 +- html/apps/parse-int.mu.html | 2 +- html/apps/print-file.mu.html | 2 +- html/apps/tui.mu.html | 2 +- html/mu-init.subx.html | 2 +- tools/update_html | 8 +- 17 files changed, 341 insertions(+), 22 deletions(-) create mode 100644 html/400.mu.html create mode 100644 html/401time.mu.html diff --git a/html/400.mu.html b/html/400.mu.html new file mode 100644 index 00000000..5d751ef2 --- /dev/null +++ b/html/400.mu.html @@ -0,0 +1,218 @@ + + + + +Mu - 400.mu + + + + + + + + + + +https://github.com/akkartik/mu/blob/master/400.mu +
+  1 # The 4xx series is for primitives implemented in Mu.
+  2 
+  3 # Signatures for major SubX functions defined so far.
+  4 
+  5 # autogenerated
+  6 sig run-tests
+  7 
+  8 # init.linux
+  9 # TODO: make this OS-specific
+ 10 # TODO: include result type at least, even if register args are too much
+ 11 sig syscall_exit  # status/ebx: int
+ 12 sig syscall_read  # fd/ebx: int, buf/ecx: addr, size/edx: int -> nbytes-or-error/eax: int
+ 13 sig syscall_write  # fd/ebx: int, buf/ecx: addr, size/edx: int -> nbytes-or-error/eax: int
+ 14 sig syscall_open  # filename/ebx: (addr kernel-string), flags/ecx: int, dummy=0x180/edx -> fd-or-error/eax: int
+ 15 sig syscall_close  # fd/ebx: int -> status/eax
+ 16 sig syscall_creat  # filename/ebx: (addr kernel-string) -> fd-or-error/eax: int
+ 17 sig syscall_unlink  # filename/ebx: (addr kernel-string) -> status/eax: int
+ 18 sig syscall_rename  # source/ebx: (addr kernel-string), dest/ecx: (addr kernel-string) -> status/eax: int
+ 19 sig syscall_mmap  # arg/ebx: (addr mmap_arg_struct) -> status/eax: int
+ 20 sig syscall_ioctl  # fd/ebx: int, cmd/ecx: int, arg/edx: (addr _)
+ 21 sig syscall_nanosleep  # req/ebx: (addr timespec)
+ 22 sig syscall_clock_gettime  # clock/ebx: int, out/ecx: (addr timespec)
+ 23 
+ 24 # Generated using:
+ 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`)
+ 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)
+ 32 sig string-equal? s: (addr array byte), benchmark: (addr array byte) -> result/eax: boolean
+ 33 sig string-starts-with? s: (addr array byte), benchmark: (addr array byte) -> result/eax: boolean
+ 34 sig check-strings-equal s: (addr array byte), expected: (addr array byte), msg: (addr array byte)
+ 35 sig clear-stream f: (addr stream byte)
+ 36 sig rewind-stream f: (addr stream byte)
+ 37 sig initialize-trace-stream n: int
+ 38 sig trace line: (addr array byte)
+ 39 sig check-trace-contains line: (addr string), msg: (addr string)
+ 40 sig check-trace-scans-to line: (addr string), msg: (addr string)
+ 41 sig trace-scan line: (addr array byte) -> result/eax: boolean
+ 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)
+ 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
+ 49 sig check-next-stream-line-equal
+ 50 sig tailor-exit-descriptor ed: (addr exit-descriptor), nbytes: int
+ 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: int
+ 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, b: handle -> result/eax: boolean
+ 76 sig copy-handle src: handle, dest: (addr handle)
+ 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), out: (addr handle)
+ 80 sig zero-out start: (addr byte), len: 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) -> new_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) -> new_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 screen-size -> nrows/eax: int, ncols/ecx: int
+142 sig clear-screen
+143 sig move-cursor-on-screen row: int, column: int
+144 sig print-string-to-screen s: (addr array byte)
+145 sig print-byte-to-screen c: byte
+146 sig print-int32-hex-to-screen n: int
+147 sig reset-formatting-on-screen
+148 sig start-color-on-screen fg: int, bg: int
+149 sig start-bold-on-screen
+150 sig start-underline-on-screen
+151 sig start-reverse-video-on-screen
+152 sig start-blinking-on-screen
+153 sig hide-cursor-on-screen
+154 sig show-cursor-on-screen
+155 sig enable-keyboard-immediate-mode
+156 sig enable-keyboard-type-mode
+157 sig read-key -> result/eax: byte
+158 sig open filename: (addr array byte), write?: boolean, out: (addr handle buffered-file)
+159 sig size in: (addr array _) -> result/eax: int
+
+ + + diff --git a/html/401time.mu.html b/html/401time.mu.html new file mode 100644 index 00000000..035e21a7 --- /dev/null +++ b/html/401time.mu.html @@ -0,0 +1,101 @@ + + + + +Mu - 401time.mu + + + + + + + + + + +https://github.com/akkartik/mu/blob/master/401time.mu +
+ 1 type timespec {
+ 2   tv_sec: int
+ 3   tv_nsec: int
+ 4 }
+ 5 
+ 6 # TODO: y2038
+ 7 fn time -> secs/eax: int {
+ 8   var t: timespec
+ 9   var clock/ebx: int <- copy 0  # CLOCK_MONOTONIC
+10   var t-addr/ecx: (addr timespec) <- address t
+11   syscall_clock_gettime
+12   var t-secs-addr/ecx: (addr int) <- get t-addr, tv_sec
+13   secs <- copy *t-secs-addr
+14 }
+15 
+16 fn ntime -> nsecs/eax: int {
+17   var t: timespec
+18   var clock/ebx: int <- copy 0  # CLOCK_MONOTONIC
+19   var t-addr/ecx: (addr timespec) <- address t
+20   syscall_clock_gettime
+21   var t-nsecs-addr/ecx: (addr int) <- get t-addr, tv_nsec
+22   nsecs <- copy *t-nsecs-addr
+23 }
+24 
+25 # nsecs must be less than 999999999 or 0x3b9ac9ff nanoseconds
+26 fn sleep secs: int, nsecs: int {
+27   var t: timespec
+28   # initialize t
+29   var tmp/eax: (addr int) <- get t, tv_sec
+30   var tmp2/ecx: int <- copy secs
+31   copy-to *tmp, tmp2
+32   tmp <- get t, tv_nsec
+33   tmp2 <- copy nsecs
+34   copy-to *tmp, tmp2
+35   # perform the syscall
+36   var t-addr/ebx: (addr timespec) <- address t
+37   var rem-addr/ecx: (addr timespec) <- copy 0
+38   syscall_nanosleep
+39 }
+
+ + + diff --git a/html/apps/arith.mu.html b/html/apps/arith.mu.html index 842235c0..ede95c3e 100644 --- a/html/apps/arith.mu.html +++ b/html/apps/arith.mu.html @@ -91,7 +91,7 @@ if ('onhashchange' in window) { 32 # 33 # Error handling is non-existent. This is just a prototype. 34 - 35 fn main -> exit-status/ebx: int { + 35 fn main -> exit-status/ebx: int { 36 var look/esi: byte <- copy 0 # lookahead 37 var n/eax: int <- copy 0 # result of each expression 38 print-string-to-screen "press ctrl-c or ctrl-d to exit\n" diff --git a/html/apps/browse.mu.html b/html/apps/browse.mu.html index a587f8d5..74b1c5f1 100644 --- a/html/apps/browse.mu.html +++ b/html/apps/browse.mu.html @@ -65,7 +65,7 @@ if ('onhashchange' in window) { 6 # 7 # Press 'q' to quit. All other keys scroll down. 8 - 9 fn main args-on-stack: (addr array (addr array byte)) -> exit-status/ebx: int { + 9 fn main args-on-stack: (addr array (addr array byte)) -> exit-status/ebx: int { 10 +-- 20 lines: # var file/esi: (addr buffered-file) = open args-on-stack[1] for reading -------------------------------------------------------------------------------------------------- 30 enable-screen-grid-mode 31 var nrows/eax: int <- copy 0 diff --git a/html/apps/crenshaw2-1.subx.html b/html/apps/crenshaw2-1.subx.html index e21e94bb..23df3be0 100644 --- a/html/apps/crenshaw2-1.subx.html +++ b/html/apps/crenshaw2-1.subx.html @@ -278,7 +278,7 @@ if ('onhashchange' in window) { 217 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp 218 # . if (eax == false) 219 3d/compare-eax-and 0/imm32/false -220 75/jump-if-!= $get-num:main/disp8 +220 75/jump-if-!= $get-num:main/disp8 221 # . expected(ed, err, "integer") 222 # . . push args 223 68/push "integer"/imm32 @@ -288,7 +288,7 @@ if ('onhashchange' in window) { 227 e8/call expected/disp32 # never returns 228 # . . discard args 229 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -230 $get-num:main: +230 $get-num:main: 231 # - otherwise read a digit 232 # . save registers 233 50/push-eax diff --git a/html/apps/crenshaw2-1b.subx.html b/html/apps/crenshaw2-1b.subx.html index ee5a830c..ebe6226e 100644 --- a/html/apps/crenshaw2-1b.subx.html +++ b/html/apps/crenshaw2-1b.subx.html @@ -283,7 +283,7 @@ if ('onhashchange' in window) { 222 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32 # add to esp 223 # . if (eax == false) 224 3d/compare-eax-and 0/imm32/false -225 75/jump-if-!= $get-num:main/disp8 +225 75/jump-if-!= $get-num:main/disp8 226 # . expected(ed, err, "integer") 227 # . . push args 228 68/push "integer"/imm32 @@ -293,7 +293,7 @@ if ('onhashchange' in window) { 232 e8/call expected/disp32 # never returns 233 # . . discard args 234 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32 # add to esp -235 $get-num:main: +235 $get-num:main: 236 # - otherwise read a digit 237 # . save registers 238 50/push-eax diff --git a/html/apps/ex1.mu.html b/html/apps/ex1.mu.html index aa62b62e..159569ff 100644 --- a/html/apps/ex1.mu.html +++ b/html/apps/ex1.mu.html @@ -66,7 +66,7 @@ if ('onhashchange' in window) { 8 # $ echo $? 9 # 42 10 -11 fn main -> result/ebx: int { +11 fn main -> result/ebx: int { 12 result <- copy 0x2a # Mu requires hexadecimal 13 } diff --git a/html/apps/ex2.mu.html b/html/apps/ex2.mu.html index e3410433..b88c8e1d 100644 --- a/html/apps/ex2.mu.html +++ b/html/apps/ex2.mu.html @@ -65,7 +65,7 @@ if ('onhashchange' in window) { 7 # $ echo $? 8 # 7 9 -10 fn main -> result/ebx: int { +10 fn main -> result/ebx: int { 11 result <- do-add 3 4 12 } 13 diff --git a/html/apps/ex3.2.mu.html b/html/apps/ex3.2.mu.html index ea4eb2eb..cc0c290d 100644 --- a/html/apps/ex3.2.mu.html +++ b/html/apps/ex3.2.mu.html @@ -64,7 +64,7 @@ if ('onhashchange' in window) { 6 # $ echo $? 7 # 55 8 - 9 fn main -> result/ebx: int { + 9 fn main -> result/ebx: int { 10 # populate a 11 var a: (array int 0xb) # 11; we waste index 0 12 var i/ecx: int <- copy 1 diff --git a/html/apps/ex3.mu.html b/html/apps/ex3.mu.html index 3c68aed1..cb76985a 100644 --- a/html/apps/ex3.mu.html +++ b/html/apps/ex3.mu.html @@ -65,7 +65,7 @@ if ('onhashchange' in window) { 7 # $ echo $? 8 # 55 9 -10 fn main -> result/ebx: int { +10 fn main -> result/ebx: int { 11 result <- copy 0 12 var i/eax: int <- copy 1 13 { diff --git a/html/apps/factorial.mu.html b/html/apps/factorial.mu.html index e735e68e..bce88f11 100644 --- a/html/apps/factorial.mu.html +++ b/html/apps/factorial.mu.html @@ -90,7 +90,7 @@ if ('onhashchange' in window) { 31 check-ints-equal result 0x78 "F - test-factorial" 32 } 33 -34 fn main args-on-stack: (addr array (addr array byte)) -> exit-status/ebx: int { +34 fn main args-on-stack: (addr array (addr array byte)) -> exit-status/ebx: int { 35 var args/eax: (addr array (addr array byte)) <- copy args-on-stack 36 var tmp/ecx: int <- length args 37 $main-body: { diff --git a/html/apps/mu.subx.html b/html/apps/mu.subx.html index 10d87927..f4a10378 100644 --- a/html/apps/mu.subx.html +++ b/html/apps/mu.subx.html @@ -886,7 +886,7 @@ if ('onhashchange' in window) { 864 (clear-stream _test-output-stream) 865 (clear-stream $_test-output-buffered-file->buffer) 866 # - 867 (write _test-input-stream "fn main -> result/ebx: int {\n") + 867 (write _test-input-stream "fn main -> result/ebx: int {\n") 868 (write _test-input-stream " result <- do-add 3 4\n") 869 (write _test-input-stream "}\n") 870 (write _test-input-stream "fn do-add a: int, b: int -> result/ebx: int {\n") @@ -940,7 +940,7 @@ if ('onhashchange' in window) { 923 (clear-stream _test-output-stream) 924 (clear-stream $_test-output-buffered-file->buffer) 925 # - 926 (write _test-input-stream "fn main -> result/ebx: int {\n") + 926 (write _test-input-stream "fn main -> result/ebx: int {\n") 927 (write _test-input-stream " result <- do-add 3 4\n") 928 (write _test-input-stream "}\n") 929 (write _test-input-stream "sig do-add a: int, b: int -> result/ebx: int\n") @@ -1218,7 +1218,7 @@ if ('onhashchange' in window) { 1236 (clear-stream _test-output-stream) 1237 (clear-stream $_test-output-buffered-file->buffer) 1238 # - 1239 (write _test-input-stream "fn main -> result/ebx: int {\n") + 1239 (write _test-input-stream "fn main -> result/ebx: int {\n") 1240 (write _test-input-stream " result <- foo\n") 1241 (write _test-input-stream "}\n") 1242 (write _test-input-stream "fn foo -> result/ebx: int {\n") diff --git a/html/apps/parse-int.mu.html b/html/apps/parse-int.mu.html index e347f1a5..e1784221 100644 --- a/html/apps/parse-int.mu.html +++ b/html/apps/parse-int.mu.html @@ -64,7 +64,7 @@ if ('onhashchange' in window) { 6 # $ echo $? 7 # 123 8 - 9 fn main _args: (addr array (addr array byte)) -> exit-status/ebx: int { + 9 fn main _args: (addr array (addr array byte)) -> exit-status/ebx: int { 10 $main-body: { 11 # if no args, print a message and exit 12 var args/esi: (addr array (addr array byte)) <- copy _args diff --git a/html/apps/print-file.mu.html b/html/apps/print-file.mu.html index fae1ca3f..17069ce9 100644 --- a/html/apps/print-file.mu.html +++ b/html/apps/print-file.mu.html @@ -65,7 +65,7 @@ if ('onhashchange' in window) { 7 # $ ./a.elf x 8 # abc 9 -10 fn main _args: (addr array (addr array byte)) -> exit-status/ebx: int { +10 fn main _args: (addr array (addr array byte)) -> exit-status/ebx: int { 11 var args/eax: (addr array (addr array byte)) <- copy _args 12 $main-body: { 13 var n/ecx: int <- length args diff --git a/html/apps/tui.mu.html b/html/apps/tui.mu.html index 93733c11..cc259340 100644 --- a/html/apps/tui.mu.html +++ b/html/apps/tui.mu.html @@ -62,7 +62,7 @@ if ('onhashchange' in window) { 4 # $ ./translate_mu apps/tui.mu 5 # $ ./a.elf 6 - 7 fn main -> exit-status/ebx: int { + 7 fn main -> exit-status/ebx: int { 8 var nrows/eax: int <- copy 0 9 var ncols/ecx: int <- copy 0 10 nrows, ncols <- screen-size diff --git a/html/mu-init.subx.html b/html/mu-init.subx.html index 80ad77ed..231ff08d 100644 --- a/html/mu-init.subx.html +++ b/html/mu-init.subx.html @@ -113,7 +113,7 @@ if ('onhashchange' in window) { 57 eb/jump loop/disp8 58 } 59 # - run Mu program -60 (main %edi) # => ebx +60 (main %edi) # => ebx 61 # - exit 62 (syscall_exit) diff --git a/tools/update_html b/tools/update_html index 7efddfe7..c5589418 100755 --- a/tools/update_html +++ b/tools/update_html @@ -45,8 +45,8 @@ do process $f done -ctags -x *.subx > /tmp/tags -for f in *.subx +ctags -x [0-9]*.subx [0-9]*.mu > /tmp/tags +for f in *.subx *.mu do test $# -gt 0 && test $1 != $f && continue process $f @@ -56,7 +56,7 @@ for f in apps/*.subx do test $# -gt 0 && test $1 != $f && continue ( cd apps - ctags -x ../*.subx `basename $f` > /tmp/tags + ctags -x ../[0-9]*.subx ../[0-9]*.mu `basename $f` > /tmp/tags ) process $f done @@ -65,7 +65,7 @@ for f in apps/*.mu do test $# -gt 0 && test $1 != $f && continue ( cd apps - ctags -x ../*.subx `basename $f` > /tmp/tags + ctags -x ../[0-9]*.subx ../[0-9]*.mu `basename $f` > /tmp/tags ) process $f done -- cgit 1.4.1-2-gfad0