about summary refs log tree commit diff stats
path: root/subx/apps/hex.subx
Commit message (Collapse)AuthorAgeFilesLines
* 5090Kartik Agaram2019-04-131-36/+4
| | | | | | | Start using the new newline escape in string literals everywhere. I could use it more aggressively, but it makes tests harder to read. So only one line of text per string for now.
* 5080Kartik Agaram2019-04-111-19/+11
|
* 5074Kartik Agaram2019-04-101-2/+17
| | | | | | | | | | | | | Fail early when writing to a fake file runs out of space. Makes debugging tests easier. Reads from files, on the other hand, are only buffering to a temporary stream, so it makes sense to silently stop when they run out of space. In the process I uncovered a testing bug in pack.subx: I was missing a trailing space in the expected result, but the test still passed because the space was getting truncated. Being principled about aborting on overflow by default will help avoid such issues.
* 5059Kartik Agaram2019-04-051-8/+8
|
* 5037Kartik Agaram2019-03-291-1/+1
|
* 5009Kartik Agaram2019-03-201-3/+3
|
* 4983Kartik Agaram2019-02-221-34/+34
| | | | | | | Standardize name for 'end of file' sentinel. `eof` seems like an ordinary variable, and `EOF` looks too much like a register (particularly in code like `if (EAX == EOF)`), so we'll go with `Eof`. Consistent capitalization for globals, and constants are globals too.
* 4981 - no, go back to 3 phasesKartik Agaram2019-02-181-2/+3
| | | | | | | | | | | | | Considering how much trouble a merge phase would be (commit 4978), it seems simpler to just add the extra syntax for controlling the entry point of the generated ELF binary. But I wouldn't have noticed this if I hadn't taken the time to write out the commit messages of 4976 and 4978. Even if we happened to already have linked list primitives built, this may still be a good idea considering that I'm saving quite a lot of code in duplicated entrypoints.
* 4973Kartik Agaram2019-02-151-8/+8
| | | | | Support immediate operands in the data segment in all the ways we support them in the code segment.
* 4961Kartik Agaram2019-02-141-16/+16
|
* 4933Kartik Agaram2019-01-161-1/+1
|
* 4929Kartik Agaram2019-01-151-6/+6
| | | | Clean up primitives for converting from/to hex chars.
* 4925Kartik Agaram2019-01-141-4/+4
|
* 4920Kartik Agaram2019-01-111-175/+4
|
* 4916Kartik Agaram2019-01-101-6/+0
| | | | | In the process of building slice primitives I found an out-of-bounds access in write-byte.
* 4888Kartik Agaram2018-12-291-21/+21
| | | | We only can't use rm32=5 when mod=0. Totally fine when it's mod=1.
* 4886Kartik Agaram2018-12-281-1/+1
|
* 4879Kartik Agaram2018-12-281-12/+12
|
* 4862Kartik Agaram2018-12-091-2/+1
|
* 4861Kartik Agaram2018-12-091-42/+42
|
* 4860 - stage 1 of SubX compiler in SubX is done!Kartik Agaram2018-12-091-9/+66
| | | | | | | | | I'm imagining 3 core stages total: 1. convert text hex bytes -> binary (✓) 2. pack and reorder operands 3. compute label addresses (Not including extras like error-checking.)
* 4859Kartik Agaram2018-12-091-8/+8
|
* 4854Kartik Agaram2018-12-061-0/+184
|
* 4853Kartik Agaram2018-12-061-5/+6
|
* 4851Kartik Agaram2018-12-061-21/+187
| | | | | | | Bugfix in scenarios where scan-next-byte needs to abort. I'm starting to have trouble keeping strings, streams and buffered-files straight.
* 4850Kartik Agaram2018-12-061-1/+137
|
* 4849Kartik Agaram2018-12-061-1/+90
|
* 4848Kartik Agaram2018-12-061-7/+6
|
* 4847Kartik Agaram2018-12-061-5/+5
|
* 4846Kartik Agaram2018-12-061-66/+327
| | | | | | | | | | | | | | Clean up a few things: a) Call scan-next-byte in hex.subx with the right number of args. Turns out tests continue to work fine if they never use the other args. b) Tear down a test for 'stop' in the right order. Not important since we have no EBP to restore. But can still be misleading. c) Have 'check-ints-equal' return nothing. Handy for it to not mess up EAX. I never use the result anyway, and the name also is imperative suggesting callers won't expect a return value.
* 4845Kartik Agaram2018-12-061-3/+0
|
* 4845Kartik Agaram2018-12-061-0/+823
Making progress on hex1 (http://web.archive.org/web/20061108010907/http://www.rano.org/bcompiler.html)