mu/linux
Kartik K. Agaram 77207192ea . 2021-09-13 04:53:38 -07:00
..
apps . 2021-07-20 08:43:25 -07:00
bootstrap . 2021-07-16 08:28:56 -07:00
browse 7846 2021-03-04 00:11:23 -08:00
tile . 2021-03-29 18:47:52 -07:00
000init.subx
100.txt . 2021-03-29 18:47:52 -07:00
101_write.subx start throwing error on duplicate label 2021-08-22 21:09:28 -07:00
102test.subx start throwing error on duplicate label 2021-08-22 21:09:28 -07:00
103kernel-string-equal.subx start throwing error on duplicate label 2021-08-22 21:09:28 -07:00
104new-segment.subx start throwing error on duplicate label 2021-08-22 21:09:28 -07:00
105string-equal.subx start throwing error on duplicate label 2021-08-22 21:09:28 -07:00
106stream.subx
107trace.subx . 2021-07-20 08:43:25 -07:00
108write.subx
109stream-equal.subx
110stop.subx . 2021-07-20 08:43:25 -07:00
111read.subx . 2021-07-20 08:43:25 -07:00
112read-byte.subx . 2021-07-20 08:43:25 -07:00
113write-stream.subx . 2021-07-20 08:43:25 -07:00
114error.subx
115write-byte.subx . 2021-07-20 08:43:25 -07:00
116write-buffered.subx
117write-int-hex.subx
118parse-hex-int.subx . 2021-07-20 08:43:25 -07:00
119error-byte.subx . 2021-07-20 08:43:25 -07:00
120allocate.subx start throwing error on duplicate label 2021-08-22 21:09:28 -07:00
121new-stream.subx . 2021-07-20 08:43:25 -07:00
122read-line.subx . 2021-07-20 08:43:25 -07:00
123slice.subx . 2021-07-20 08:43:25 -07:00
124next-token.subx
125write-stream-data.subx
126write-int-decimal.subx . 2021-07-20 08:43:25 -07:00
127next-word.subx support non-line-oriented processing in next-word 2021-07-29 20:07:13 -07:00
128subx-words.subx 7867 2021-03-07 21:05:45 -08:00
129emit-hex.subx
130emit.subx 7867 2021-03-07 21:05:45 -08:00
131table.subx start throwing error on duplicate label 2021-08-22 21:09:28 -07:00
132slurp.subx . 2021-07-20 08:43:25 -07:00
133subx-widths.subx
134emit-hex-array.subx
135next-word-or-string.subx
200.txt . 2021-03-29 18:47:52 -07:00
201register-names.subx
202write-int.subx . 2021-07-20 08:43:25 -07:00
203stack.subx . 2021-07-20 08:43:25 -07:00
300.txt
301array-equal.subx
302stack_allocate.subx
303kernel-string.subx
304screen.subx . 2021-05-14 23:15:46 -07:00
305keyboard.subx
306files.subx . 2021-05-14 07:59:32 -07:00
307size.subx
308allocate-array.subx
309stream.subx
310copy-bytes.subx
311decimal-int.subx . 2021-05-14 23:15:46 -07:00
312copy.subx
313index-bounds-check.subx always check for null in 'index' instructions 2021-05-07 21:04:45 -07:00
314divide.subx
315slice.subx
400.mu 7867 2021-03-07 21:05:45 -08:00
401test.mu update vocabulary documentation 2021-03-08 23:50:35 -08:00
402time.mu
403unicode.mu fix bad terminology: grapheme -> code point 2021-08-29 22:20:09 -07:00
404stream.mu update vocabulary documentation 2021-03-08 23:50:35 -08:00
405screen.mu
406int32.mu
407right-justify.mu
408float.mu
409print-float-hex.mu
410file.mu
411string.mu
412print-float-decimal.mu update vocabulary documentation 2021-03-08 23:50:35 -08:00
README.md . 2021-07-16 08:28:56 -07:00
assort start throwing error on duplicate label 2021-08-22 21:09:28 -07:00
assort.subx . 2021-07-20 08:43:25 -07:00
braces start throwing error on duplicate label 2021-08-22 21:09:28 -07:00
braces.subx . 2021-07-20 08:43:25 -07:00
branches.mu support checking overflow flag everywhere 2021-05-08 21:49:50 -07:00
branches.out support checking overflow flag everywhere 2021-05-08 21:49:50 -07:00
calls start throwing error on duplicate label 2021-08-22 21:09:28 -07:00
calls.subx . 2021-07-20 08:43:25 -07:00
dquotes start throwing error on duplicate label 2021-08-22 21:09:28 -07:00
dquotes.subx . 2021-07-20 08:43:25 -07:00
help make online help more obvious 2021-04-04 20:12:43 -07:00
hex start throwing error on duplicate label 2021-08-22 21:09:28 -07:00
hex.subx . 2021-07-20 08:43:25 -07:00
labels_baremetal start throwing error on labels too far for /disp8 2021-08-22 21:40:03 -07:00
labels_baremetal.subx start throwing error on labels too far for /disp8 2021-08-22 21:40:03 -07:00
mu compute-offset: literal index 2021-08-25 22:19:24 -07:00
mu-init-test.subx
mu-init.subx
mu.subx compute-offset: literal index 2021-08-25 22:19:24 -07:00
pack start throwing error on duplicate label 2021-08-22 21:09:28 -07:00
pack.subx . 2021-07-20 08:43:25 -07:00
sigils start throwing error on duplicate label 2021-08-22 21:09:28 -07:00
sigils.subx . 2021-07-20 08:43:25 -07:00
stack_array.subx . 2021-03-24 09:12:32 -07:00
stats.txt . 2021-03-29 18:47:52 -07:00
subx-params.subx
subx_debugging.md 7847 2021-03-04 00:24:24 -08:00
survey_baremetal start throwing error on duplicate label 2021-08-22 21:09:28 -07:00
survey_baremetal.subx start throwing error on duplicate label 2021-08-22 21:09:28 -07:00
survey_elf start throwing error on duplicate label 2021-08-22 21:09:28 -07:00
survey_elf.subx start throwing error on duplicate label 2021-08-22 21:09:28 -07:00
test_apps start throwing error on duplicate label 2021-08-22 21:09:28 -07:00
test_apps_emulated . 2021-07-20 08:43:25 -07:00
tests start throwing error on duplicate label 2021-08-22 21:09:28 -07:00
tests.subx . 2021-07-20 08:43:25 -07:00
translate
translate_debug
translate_emulated
translate_subx
translate_subx_debug
translate_subx_emulated
vocabulary.md . 2021-07-16 09:24:02 -07:00
x86_approx.md . 2021-09-13 04:53:38 -07:00

README.md

This directory contains Mu programs and infrastructure that require a Linux kernel. To run programs under this directory, you must first cd into it.

$ cd linux/
$ ./translate apps/hello.mu      # generates a.elf
$ ./a.elf
Hello world!

See the shared vocabulary of data types and functions shared by Mu programs running on Linux. Mu programs can transparently call low-level functions written in SubX.

Some programs to try out:

  • tile: An experimental live-updating postfix shell environment that updates as you type. Prototype. Look at this to see what is currently possible, not how I recommend building software.

    tile app
  • browse: A text-mode browser for a tiny subset of Markdown.

  • apps/ex*: small stand-alone examples that don't need any of the shared code at the top-level. They each have a simple pedagogical goal. Read these first.

  • apps/factorial*: A simple program to compute factorials in 5 versions, showing all the different syntax sugars and what they expand to.

The Mu compiler toolchain is also here in the following phases:

  • Bare SubX: hex, survey_elf, pack, dquotes, assort, tests
  • Syntax sugar for SubX: sigils, calls, braces
  • Mu->SubX compiler: mu. Compiles most statements to a single instruction of machine code.

The toolchain includes binaries in the repo. At any commit, the binary should be identical bit for bit with the result of translating the corresponding .subx file. The binary should also be natively runnable on a Linux system running on Intel x86 processors, either 32- or 64-bit. If either of these invariants is violated, it's a bug.