Commit Graph

16 Commits

Author SHA1 Message Date
Kartik Agaram 2eb174d697 4908
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.
2019-01-05 01:07:37 -08:00
Kartik Agaram dd9ba09a7c 4888
We only can't use rm32=5 when mod=0. Totally fine when it's mod=1.
2018-12-29 13:36:06 -08:00
Kartik Agaram 6a7eaa81ee 4883 - rudimentary memory allocator 2018-12-28 11:14:29 -08:00
Kartik Agaram 044b413021 4879 2018-12-28 02:07:11 -08:00
Kartik Agaram 3d4fba4d12 4865
More mnemonic register usage in write-stream.
2018-12-10 09:55:46 -08:00
Kartik Agaram 3a4d870730 4864
Our first buffer overflow!
2018-12-10 00:17:47 -08:00
Kartik Agaram 5262ed0de3 4861 2018-12-09 22:46:39 -08:00
Kartik Agaram 42a933078c 4860 - stage 1 of SubX compiler in SubX is done!
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.)
2018-12-09 21:18:05 -08:00
Kartik Agaram 780d868502 4856
Fix CI.
2018-12-06 12:55:22 -08:00
Kartik Agaram 09944ba6a8 4854 2018-12-06 12:52:38 -08:00
Kartik Agaram 48140fcd3f 4851
Bugfix in scenarios where scan-next-byte needs to abort.

I'm starting to have trouble keeping strings, streams and buffered-files
straight.
2018-12-06 12:07:48 -08:00
Kartik Agaram 272408b06b 4850 2018-12-06 11:11:43 -08:00
Kartik Agaram e9909be374 4849 2018-12-06 11:01:23 -08:00
Kartik Agaram a966881b6e 4848 2018-12-06 10:50:26 -08:00
Kartik Agaram 33e7c3a751 4846
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.
2018-12-06 09:34:55 -08:00
Kartik Agaram 257ca35ab4 4845
Making progress on hex1 (http://web.archive.org/web/20061108010907/http://www.rano.org/bcompiler.html)
2018-12-06 00:16:01 -08:00