Commit Graph

4784 Commits

Author SHA1 Message Date
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
Kartik Agaram d1e5e391c7 4788 2018-11-27 12:06:08 -08:00
Kartik Agaram 2131b055f5 4787 2018-11-27 12:04:53 -08:00
Kartik Agaram 71d7081a7c 4786 2018-11-26 01:43:48 -08:00
Kartik Agaram 116c41add4 4785 2018-11-26 01:42:51 -08:00
Kartik Agaram 3b6fcde4f9 4784 2018-11-26 01:26:31 -08:00
Kartik Agaram 063741b4a2 4783 2018-11-26 01:22:50 -08:00
Kartik Agaram d1c9392a54 4782 2018-11-26 01:19:47 -08:00
Kartik Agaram 7e00968c99 4781 2018-11-26 00:56:43 -08:00
Kartik Agaram e5cbbea435 4780 2018-11-26 00:26:20 -08:00
Kartik Agaram c1a3d36cad 4779 2018-11-26 00:26:09 -08:00
Kartik Agaram f362a0cb09 4778 - entirely rewritten Readme 2018-11-25 23:42:20 -08:00
Kartik Agaram f15fcfe822 4777 2018-11-25 14:06:22 -08:00
Kartik Agaram 50dcc0c122 4776
Crenshaw compiler now runs natively as well.

It turns out I was misreading the Intel manual, and the jump instructions
that I thought take disp16 operands actually take disp32 operands by default
on both i686 and x86_64 processors. The disp16 versions are some holdover
from the 16-bit days.

This was the first time I've used one of these erstwhile-disp16 instructions,
but I still haven't tested most of them. We'll see if we run into future
issues.
2018-11-25 13:46:53 -08:00
Kartik Agaram 33fdc60b16 4775
Start with an exactly corresponding version to Crenshaw 2-1: single-digit
numbers. The only change: we assume the number is in hex.

The next version now supports multi-digit hex numbers.
2018-11-24 23:26:14 -08:00
Kartik Agaram 31ff94214b 4774
Simplification.
2018-11-24 23:14:21 -08:00
Kartik Agaram 732cf4e7cc 4773 - done with crenshaw chapter 2-1
In the process I had to fix a couple more bugs in support for disp16 instructions.
2018-11-24 23:06:55 -08:00
Kartik Agaram a8f47b4a64 4772 2018-11-24 22:42:02 -08:00
Kartik Agaram 3c46d5a221 4771
I stopped handling disp16 at some point, and using instructions with such
an operand messes up segment alignment when generating ELF binaries.

I don't test my ELF generation. This is a sign that maybe I should start.
2018-11-24 20:53:50 -08:00
Kartik Agaram ba196240ff 4770 2018-11-24 20:25:54 -08:00