diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-06-18 07:11:36 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-06-18 07:11:36 -0700 |
commit | c22dbbea3960ffbcf983f6ac2d1b0daf9d294461 (patch) | |
tree | 16afc1ff9fdff8223bb2181d4f4344e39062d026 | |
parent | 8c47da082b63b6aa6aafd45e1f8f7edd4459e555 (diff) | |
download | mu-c22dbbea3960ffbcf983f6ac2d1b0daf9d294461.tar.gz |
make code in Readme easier to copy
Thanks Sumeet Agarwal for the suggestion.
-rw-r--r-- | README.md | 16 | ||||
-rw-r--r-- | shell/README.md | 12 |
2 files changed, 14 insertions, 14 deletions
diff --git a/README.md b/README.md index 3e53f3fe..f623ed95 100644 --- a/README.md +++ b/README.md @@ -10,10 +10,10 @@ Running the code you want to run, and nothing else. Here's the Mu computer running [Conway's Game of Life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life). ```sh -$ git clone https://github.com/akkartik/mu -$ cd mu -$ ./translate life.mu # emit a bootable code.img -$ qemu-system-i386 code.img +git clone https://github.com/akkartik/mu +cd mu +./translate life.mu # emit a bootable code.img +qemu-system-i386 code.img ``` <img alt='screenshot of Game of Life running on the Mu computer' src='html/baremetal-life.png'> @@ -94,7 +94,7 @@ Mu programs build natively either on Linux or on Windows using [WSL 2](https://d For Macs and other Unix-like systems, use the (much slower) emulator: ```sh -$ ./translate_emulated ex2.mu # ~2 mins to emit code.img +./translate_emulated ex2.mu # ~2 mins to emit code.img ``` Mu programs can be written for two very different environments: @@ -203,9 +203,9 @@ If you're still reading, here are some more things to check out: for a postfix language that I might work on again one day: ```sh - $ cd linux - $ ./translate tile/*.mu - $ ./a.elf screen + cd linux + ./translate tile/*.mu + ./a.elf screen ``` - [A summary](mu_instructions) of how the Mu compiler translates statements diff --git a/shell/README.md b/shell/README.md index 072e9d60..6bde168b 100644 --- a/shell/README.md +++ b/shell/README.md @@ -5,12 +5,12 @@ Currently runs a tiny dialect of Lisp. Steps to run it from the top-level: 1. Build it: ```sh - $ ./translate shell/*.mu # generates code.img + ./translate shell/*.mu # generates code.img ``` You can now already run it (under emulation): ```sh - $ qemu-system-i386 code.img + qemu-system-i386 code.img ``` But let's add some more 'meat' to play with. @@ -18,13 +18,13 @@ Currently runs a tiny dialect of Lisp. Steps to run it from the top-level: 2. Create a data disk with a library of functions. ```sh - $ dd if=/dev/zero of=data.img count=20160 - $ cat shell/data.limg |dd of=data.img conv=notrunc + dd if=/dev/zero of=data.img count=20160 + cat shell/data.limg |dd of=data.img conv=notrunc ``` Run with data disk (and 2GB of RAM): ```sh - $ qemu-system-i386 -m 2G -hda code.img -hdb data.img + qemu-system-i386 -m 2G -hda code.img -hdb data.img ``` <img alt='screenshot of the Mu shell' src='../html/20210615-shell.png'> @@ -59,7 +59,7 @@ Currently runs a tiny dialect of Lisp. Steps to run it from the top-level: Putting it all together, here's the command I typically use on Linux: ``` - $ qemu-system-i386 -m 2G -enable-kvm -hda code.img -hdb data.img + qemu-system-i386 -m 2G -enable-kvm -hda code.img -hdb data.img ``` *Known issues* |