about summary refs log tree commit diff stats
path: root/subx/apps/crenshaw2-1
Commit message (Collapse)AuthorAgeFilesLines
* 4913Kartik Agaram2019-01-071-0/+0
|
* 4911Kartik Agaram2019-01-061-0/+0
|
* 4908Kartik Agaram2019-01-051-0/+0
| | | | | | | | Fix CI. a) Update canonical binaries. b) Fix an out-of-bounds access in `clear-stream`. This also required supporting a new instruction in `subx run` to load an imm8 into rm8.
* 4888Kartik Agaram2018-12-291-0/+0
| | | | We only can't use rm32=5 when mod=0. Totally fine when it's mod=1.
* 4883 - rudimentary memory allocatorKartik Agaram2018-12-281-0/+0
|
* 4879Kartik Agaram2018-12-281-0/+0
|
* 4865Kartik Agaram2018-12-101-0/+0
| | | | More mnemonic register usage in write-stream.
* 4864Kartik Agaram2018-12-101-0/+0
| | | | Our first buffer overflow!
* 4846Kartik Agaram2018-12-061-0/+0
| | | | | | | | | | | | | | 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.
* 4844Kartik Agaram2018-12-061-0/+0
|
* 4841Kartik Agaram2018-12-041-0/+0
| | | | New helper: print an error message, then a numeric byte, then abort.
* 4840Kartik Agaram2018-12-041-0/+0
| | | | New helper: printing a string to a buffered file.
* 4838Kartik Agaram2018-12-041-0/+0
| | | | Better to use EDI as a mnemonic for 'destination'.
* 4837Kartik Agaram2018-12-041-0/+0
| | | | Let's standardize to use opcode 39 rather than 3b by default.
* 4834Kartik Agaram2018-12-041-0/+0
| | | | Fix CI since 4827.
* 4833Kartik Agaram2018-12-041-0/+0
|
* 4828 - writing to buffered-fileKartik Agaram2018-12-031-0/+0
| | | | | 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.
* 4827Kartik Agaram2018-12-031-0/+0
| | | | | | | | | 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.
* 4822Kartik Agaram2018-12-031-0/+0
| | | | | | | Fix CI. It's kind of a hassle (and wasteful) that I need to redefine 'main' in every single layer.
* 4821Kartik Agaram2018-12-021-0/+0
|
* 4810Kartik Agaram2018-11-301-0/+0
|
* 4775Kartik Agaram2018-11-241-0/+0
| | | | | | | 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.
* 4774Kartik Agaram2018-11-241-0/+0
| | | | Simplification.
* 4773 - done with crenshaw chapter 2-1Kartik Agaram2018-11-241-0/+0
| | | | In the process I had to fix a couple more bugs in support for disp16 instructions.
* 4768Kartik Agaram2018-11-241-0/+0
|
* 4764Kartik Agaram2018-11-231-0/+0
|
* 4763 - back to the 'trivial' crenshaw2-1 compilerKartik Agaram2018-11-231-0/+0
| | | | | This time I've ported (and test-driven) 'GetChar' and 'GetNum'. The new tests bring together our new testable interfaces for read() and exit().
* 4756Kartik Agaram2018-11-191-0/+0
| | | | | Long-standing and long-copied typo has been messing with our exit status on test failures.
* 4755 - read-byte (sometimes called getchar)Kartik Agaram2018-11-191-0/+0
|
* 4747 - subx: 'read' primitiveKartik Agaram2018-11-181-0/+0
|
* 4745Kartik Agaram2018-11-171-0/+0
|
* 4743Kartik Agaram2018-11-121-0/+0
|
* 4741Kartik Agaram2018-10-301-0/+0
| | | | Extract a helper that we'll need for 'read'.
* 4740Kartik Agaram2018-10-301-0/+0
|
* 4736Kartik Agaram2018-10-291-0/+0
| | | | | | | | | We'll use a common stream data structure for input and output streams. Having separate types makes more sense in a more high-level language, where we have type checking and where functions for handling the different types are more concise. But in machine code the sweet spot is more toward fewer types.
* 4732Kartik Agaram2018-10-281-0/+0
|
* 4729Kartik Agaram2018-10-281-0/+0
| | | | | | Start injecting all dependencies in the Crenshaw compiler app. In the process I realized the non-fake code path of 'stop' had a bug.
* 4721Kartik Agaram2018-10-241-0/+0
|
* 4713Kartik Agaram2018-10-211-0/+0
| | | | | | | | Initial sketch of a dependency-injected wrapper around the exit() syscall. I don't have the primitives yet, just a sketch of how they should work -- and a passing test for non-local jumps without support for passing the exit status to the caller.
* 4711Kartik Agaram2018-10-171-0/+0
| | | | | | | Extract a helper for appending strings to raw buffers. I'd been resisting this idea, but it actually turns out to be a pretty clean abstraction in the end.
* 4710Kartik Agaram2018-10-171-0/+0
| | | | | Start using write() instead of _write().. and we promptly find a typo when dealing with real file descriptors.
* 4707 - subx: dependency-injected write() primitiveKartik Agaram2018-10-161-0/+0
|
* 4699Kartik Agaram2018-10-141-0/+0
|
* 4697Kartik Agaram2018-10-141-0/+0
|
* 4691Kartik Agaram2018-10-131-0/+0
| | | | All tests now once again run the same natively and on VM.
* 4684Kartik Agaram2018-10-111-0/+0
| | | | | | | | | | Turns out the tests for 'trace' have been broken in native mode since the original commit (4674). Dangers of running my tests on Darwin, where I can't run them natively. The test failures didn't get flagged on CI because I'd forgotten to update the exit code of the factorial app in commit 4664. At least that's fixed in this commit.
* 4682 - subx: start testing all layers of 'library'Kartik Agaram2018-10-101-0/+0
|
* 4674Kartik Agaram2018-10-081-0/+0
| | | | subx: append to trace
* 4667Kartik Agaram2018-10-051-0/+0
| | | | | Standardize on hyphens in all names. And we'll use colons for namespacing labels in functions.
* 4664 - subx: reflect test failures in exit statusKartik Agaram2018-10-051-0/+0
|