Commit Graph

4853 Commits

Author SHA1 Message Date
Kartik Agaram af5797eeff 4838
Better to use EDI as a mnemonic for 'destination'.
2018-12-04 10:40:01 -08:00
Kartik Agaram 9e03e2bd37 4837
Let's standardize to use opcode 39 rather than 3b by default.
2018-12-04 10:19:18 -08:00
Kartik Agaram ca0a598c87 4836 2018-12-04 09:59:42 -08:00
Kartik Agaram 768093cd94 4835 2018-12-04 09:57:40 -08:00
Kartik Agaram 381d80f8a4 4834
Fix CI since 4827.
2018-12-04 09:56:23 -08:00
Kartik Agaram a9cce7121a 4833 2018-12-04 00:30:00 -08:00
Kartik Agaram cf02c20bb0 4832
Let's start adding ':end' labels in all functions, just because it helps
us visualize where function calls end in traces, thanks to the '--map'
commandline argument.
2018-12-04 00:29:06 -08:00
Kartik Agaram 7cb326df5b 4831 2018-12-04 00:17:40 -08:00
Kartik Agaram 5f3b3e7aea 4830
New helper: printing a byte in textual (hex) form.

This required adding instructions for bitwise shift operations.
2018-12-03 23:26:56 -08:00
Kartik Agaram ee73f5eb31 4829
Showing the error bit pattern explicitly makes it more clear that it's
not possible to generate as a non-error value.
2018-12-03 17:32:42 -08:00
Kartik Agaram 83822d6324 4828 - writing to buffered-file
This is likely a sub-optimal interface, but I'm trying not to agonize.
The whole point of Mu is to permit radical changes at any point in time.
2018-12-03 17:08:53 -08:00
Kartik Agaram 5e27c7f13e 4827
I was 'returning' a phantom value from 'write' when the underlying '_write'
returns nothing.

In general, returning counts of bytes written is not so useful for error
checking when my primitives abstract away from that. We'll come back to
error signalling later.
2018-12-03 16:44:16 -08:00
Kartik Agaram 5082923e81 4826 2018-12-03 16:34:16 -08:00
Kartik Agaram 97e7c68b3a 4825 2018-12-03 12:14:56 -08:00
Kartik Agaram 91dab3e1a4 4824 2018-12-03 12:03:23 -08:00
Kartik Agaram 26efb5f5c2 4823 2018-12-03 11:42:04 -08:00
Kartik Agaram 1eb9cc5679 4822
Fix CI.

It's kind of a hassle (and wasteful) that I need to redefine 'main' in
every single layer.
2018-12-03 11:41:33 -08:00
Kartik Agaram 0eb0f69616 4821 2018-12-02 22:41:28 -08:00
Kartik Agaram ef31035a9f 4820 2018-12-02 20:39:21 -08:00
Kartik Agaram 0043952064 4819 2018-12-02 16:58:30 -08:00
Kartik Agaram c98d4b1c6a 4818 2018-12-02 14:41:21 -08:00
Kartik Agaram f75f333f52 4817 2018-12-02 13:12:23 -08:00
Kartik Agaram 39d718afcf 4816 2018-12-02 13:09:23 -08:00
Kartik Agaram f44c595267 4815 2018-12-02 11:08:30 -08:00
Kartik Agaram e4ac3c9e6e 4814 2018-12-01 14:13:33 -08:00
Kartik Agaram 54e5128a14 4813 2018-12-01 12:44:10 -08:00
Kartik Agaram c7d45d918b 4812 2018-11-30 22:57:52 -08:00
Kartik Agaram c6f522007d 4811 2018-11-30 20:01:41 -08:00
Kartik Agaram 87c606ee06 4810 2018-11-30 16:56:35 -08:00
Kartik Agaram 14a380525e 4809 - subx: html with 5 colors for comments 2018-11-30 16:54:01 -08:00
Kartik Agaram 9d27e966b5 4808 - clean up comments in all subx files 2018-11-30 16:45:15 -08:00
Kartik Agaram 4cb6970d9d 4807
Stop highlighting capitalized words in metadata as global variables.
2018-11-30 16:40:35 -08:00
Kartik Agaram 14da19a272 4806
Drop a wildcard in my edit shortcuts that's getting confused between apps/crenshaw2-1.subx
and apps/crenshaw2-1b.subx. We're pretty much always using the full filename
(excluding .subx extension) anyway.
2018-11-30 16:39:27 -08:00
Kartik Agaram 8bf0c436ec 4805
More tweaking of colors, as far as possible in 256-color terminal mode
that's almost entirely just for me, and beyond that in the generated html
that more people may look at. In the former I have to work with a limited
palette, while I'd like the latter to be more accessible for others.

Evolution of colors:
  === 1
    .subxH1Comment { color: #00ffff; }
    .subxH2Comment { color: #00afff; }
    .subxComment { color: #00afff; }
    .subxS1Comment { color: #0080ff; }
    .subxS2Comment { color: #0040ff; }

  === 2
    sed -i 's/^\.subxH1Comment.*/.subxH1Comment { color:#00ffff; }/' $1.html
    sed -i 's/^\.subxH2Comment.*/.subxH2Comment { color:#00bbff; }/' $1.html
    sed -i 's/^\.subxComment.*/.subxComment { color:#00bbff; }/' $1.html
    sed -i 's/^\.subxS1Comment.*/.subxS1Comment { color:#0098ff; }/' $1.html
    sed -i 's/^\.subxS2Comment.*/.subxS2Comment { color:#0070ff; }/' $1.html  # slightly too dark

  === 3: http://www.perbang.dk/rgbgradient from start to end
    sed -i 's/^\.subxH1Comment.*/.subxH1Comment { color:#00ffff; }/' $1.html
    sed -i 's/^\.subxH2Comment.*/.subxH2Comment { color:#00ddff; }/' $1.html
    sed -i 's/^\.subxComment.*/.subxComment { color:#00bbff; }/' $1.html
    sed -i 's/^\.subxS1Comment.*/.subxS1Comment { color:#0099ff; }/' $1.html
    sed -i 's/^\.subxS2Comment.*/.subxS2Comment { color:#0078ff; }/' $1.html

  === 4: drop down to 4 colors
    sed -i 's/^\.subxH1Comment.*/.subxH1Comment { color:#00ffff; }/' $1.html
    sed -i 's/^\.subxComment.*/.subxComment { color:#00d2ff; }/' $1.html
    sed -i 's/^\.subxS1Comment.*/.subxS1Comment { color:#00a4ff; }/' $1.html
    sed -i 's/^\.subxS2Comment.*/.subxS2Comment { color:#0078ff; }/' $1.html

  === 4: make final one just a little too dark
    sed -i 's/^\.subxH1Comment.*/.subxH1Comment { color:#00ffff; }/' $1.html
    sed -i 's/^\.subxComment.*/.subxComment { color:#00cfff; }/' $1.html
    sed -i 's/^\.subxS1Comment.*/.subxS1Comment { color:#009fff; }/' $1.html
    sed -i 's/^\.subxS2Comment.*/.subxS2Comment { color:#0070ff; }/' $1.html  # slightly too dark

  === 5: make darkest shade a little less blue, just at the edge of too dark
    sed -i 's/^\.subxH1Comment.*/.subxH1Comment { color:#00ffff; }/' $1.html
    sed -i 's/^\.subxComment.*/.subxComment { color:#16ccff; }/' $1.html
    sed -i 's/^\.subxS1Comment.*/.subxS1Comment { color:#2d99ff; }/' $1.html
    sed -i 's/^\.subxS2Comment.*/.subxS2Comment { color:#4466ff; }/' $1.html  # slightly too dark

  === 6: HSV gradient between the same endpoints
    sed -i 's/^\.subxH1Comment.*/.subxH1Comment { color:#00ffff; }/' $1.html
    sed -i 's/^\.subxComment.*/.subxComment { color:#16bfff; }/' $1.html
    sed -i 's/^\.subxS1Comment.*/.subxS1Comment { color:#2d8cff; }/' $1.html
    sed -i 's/^\.subxS2Comment.*/.subxS2Comment { color:#4466ff; }/' $1.html  # slightly too dark
2018-11-30 14:20:37 -08:00
Kartik Agaram 2564eb6f55 4804 2018-11-30 14:19:59 -08:00
Kartik Agaram f52bc40d6f 4803 2018-11-30 11:23:08 -08:00
Kartik Agaram ee9a9237d6 4802
Some automated commenting cleanup. Still needs more careful manual scanning.

  sed -i 's/^#   1-3/# . 1-3/' *.subx */*.subx
  sed -i 's/^#   op/# . op/' *.subx */*.subx
  sed -i 's/# vim/# . . vim/' *.subx */*.subx
  sed -i 's/^    # push args/    # . . push args/' *.subx */*.subx
  sed -i 's/^    # discard args/    # . . discard args/' *.subx */*.subx
  sed -i 's/^    # call/    # . . call/' *.subx */*.subx
  sed -i 's/^    # prolog/    # . prolog/' *.subx */*.subx
  sed -i 's/^    # epilog/    # . epilog/' *.subx */*.subx
  sed -i 's/^    # save registers/    # . save registers/' *.subx */*.subx
  sed -i 's/^    # restore registers/    # . restore registers/' *.subx */*.subx
  sed -i 's/  operand  /  register /' *.subx */*.subx
2018-11-30 11:13:36 -08:00
Kartik Agaram 6030d7e2e5 4801
Reindent all SubX code to make some room for the new comment style.
2018-11-30 10:54:42 -08:00
Kartik Agaram e9661581f0 4800 2018-11-30 10:37:14 -08:00
Kartik Agaram 2b7ba2a56a 4799 2018-11-30 10:35:03 -08:00
Kartik Agaram dc70e29c20 4798
Another attempt at picking colors for the 5 different levels of comments.
2018-11-30 10:33:34 -08:00
Kartik Agaram a20b51bdb7 4797 2018-11-30 09:45:07 -08:00
Kartik Agaram c56d803cd8 4796 2018-11-30 09:43:49 -08:00
Kartik Agaram f989d6ccf9 4795 2018-11-28 15:49:43 -08:00
Kartik Agaram 72281427ca 4794 2018-11-28 14:36:07 -08:00
Kartik Agaram 4650c8188f 4793
Experimenting with putting code examples higher up in the Readme. Thanks
Pelle Hjek for the feedback: http://arclanguage.org/item?id=20875.
2018-11-28 14:16:27 -08:00
Kartik Agaram d6535f3382 4792
Thanks Pelle Hjek for the feedback: http://arclanguage.org/item?id=20870
2018-11-28 11:18:50 -08:00
Kartik Agaram 695d49c05d 4791 2018-11-27 21:22:36 -08:00
Kartik Agaram f3e55e7e25 4790 2018-11-27 14:24:55 -08:00
Kartik Agaram f1aed94cc8 4789 2018-11-27 13:31:48 -08:00