Kartik Agaram
bd6f1928d7
4755 - read-byte (sometimes called getchar)
2018-11-19 23:11:00 -08:00
Kartik Agaram
a6061b9fd2
4754 - allow data segment to refer to variables
2018-11-19 21:17:48 -08:00
Kartik Agaram
e3c331d0a6
4753
2018-11-19 14:12:52 -08:00
Kartik Agaram
565156761c
4752
2018-11-18 13:52:31 -08:00
Kartik Agaram
674cf5833c
4751
2018-11-18 13:28:42 -08:00
Kartik Agaram
bfe9fa117e
4750
...
There can be situations where a run is striding through a segment. Reduce
the number of reallocations that reallocations that requires.
2018-11-18 10:13:04 -08:00
Kartik Agaram
cfaac2a8ab
4749 - speed up tests
...
When we implemented 'read' our apps went over 0x1000 bytes, so I grew the
initial segment size. But that slowed down emulation because each test
was reallocating all segments. Now we allocate small segments at the start,
and grow them gradually as needed.
2018-11-18 10:05:30 -08:00
Kartik Agaram
69c0648e84
4748
...
Fix CI.
2018-11-18 08:18:12 -08:00
Kartik Agaram
b31455f81d
4747 - subx: 'read' primitive
2018-11-18 00:17:29 -08:00
Kartik Agaram
3d9108130f
4746
2018-11-17 23:36:32 -08:00
Kartik Agaram
267fd885b2
4745
2018-11-17 20:45:22 -08:00
Kartik Agaram
95decf9f34
4744
2018-11-17 20:45:15 -08:00
Kartik Agaram
11a5fffade
4743
2018-11-12 22:00:51 -08:00
Kartik Agaram
0fe9e7b9dc
4742
2018-11-05 22:43:28 -08:00
Kartik Agaram
8b0e960dbb
4741
...
Extract a helper that we'll need for 'read'.
2018-10-30 23:10:49 -07:00
Kartik Agaram
b3d8c144a4
4740
2018-10-30 22:46:05 -07:00
Kartik Agaram
2f55dd757e
4739
2018-10-30 22:38:37 -07:00
Kartik Agaram
dd63f4dcb4
4738
2018-10-30 22:36:52 -07:00
Kartik Agaram
0e6f3d086e
4737
2018-10-30 22:32:38 -07:00
Kartik Agaram
f94442fe2d
4736
...
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.
2018-10-29 16:34:47 -07:00
Kartik Agaram
3d94e2db0e
4735
2018-10-28 23:17:56 -07:00
Kartik Agaram
4c37b3e91b
4734
2018-10-28 13:41:53 -07:00
Kartik Agaram
172e52c47b
4733
2018-10-28 13:27:53 -07:00
Kartik Agaram
bb5cc54f96
4732
2018-10-28 12:45:11 -07:00
Kartik Agaram
93be389bef
4731
2018-10-28 12:41:04 -07:00
Kartik Agaram
425cd42b13
4730
2018-10-28 12:24:02 -07:00
Kartik Agaram
eb9087635b
4729
...
Start injecting all dependencies in the Crenshaw compiler app.
In the process I realized the non-fake code path of 'stop' had a bug.
2018-10-28 00:19:46 -07:00
Kartik Agaram
5f842b0e5e
4728
...
What is this '|| exit 1' construct?! No need for it in the presence of
ERREXIT.
2018-10-28 00:02:11 -07:00
Kartik Agaram
120dbb1186
4727 - commit to better 64-bit support
...
I've started testing more regularly on 64-bit Linux, and I realize that
the binaries actually now compare identical even on 64-bit. Why did I ever
add that condition to CI? Seems to be working now on Travis. Let's start
comparing now and see if the problem happens again.
2018-10-27 23:09:36 -07:00
Kartik Agaram
5f21a5e788
4726
2018-10-27 22:46:23 -07:00
Kartik Agaram
5e5f569c17
4725 - back to porting the Crenshaw compiler
2018-10-26 10:16:02 -07:00
Kartik Agaram
1f08b541af
4724
2018-10-24 23:28:03 -07:00
Kartik Agaram
e0a0484c9f
4723
...
Fix CI.
2018-10-24 23:17:43 -07:00
Kartik Agaram
6f37250dd9
4722
2018-10-24 23:05:58 -07:00
Kartik Agaram
0939de6373
4721
2018-10-24 22:53:45 -07:00
Kartik Agaram
7df0ea4ec4
4720
...
Raise an error when we fall off the end of the code segment.
2018-10-24 22:52:48 -07:00
Kartik Agaram
261b1b8056
4719 - testable interface wrapping around exit()
2018-10-24 22:21:59 -07:00
Kartik Agaram
4524da2bb6
4718
2018-10-24 15:52:41 -07:00
Kartik Agaram
b6fdd2e4e5
4717
2018-10-24 00:01:00 -07:00
Kartik Agaram
92d8ef6c3b
4716
2018-10-23 23:32:38 -07:00
Kartik Agaram
d27812594a
4715 - support one more negation instruction
2018-10-23 23:19:55 -07:00
Kartik Agaram
bfc997cfda
4714
...
Improve error-checking for unnecessary displacement operands.
2018-10-23 23:18:31 -07:00
Kartik Agaram
f3612481b1
4713
...
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.
2018-10-21 21:17:22 -07:00
Kartik Agaram
417a05ee7d
4712
2018-10-21 20:36:43 -07:00
Kartik Agaram
b847538071
4711
...
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.
2018-10-17 22:31:39 -07:00
Kartik Agaram
4cc517e0de
4710
...
Start using write() instead of _write().. and we promptly find a typo when
dealing with real file descriptors.
2018-10-17 08:19:03 -07:00
Kartik Agaram
104e521c04
4709
2018-10-17 07:08:47 -07:00
Kartik Agaram
800320a70c
4708
2018-10-17 06:47:28 -07:00
Kartik Agaram
3d6450f216
4707 - subx: dependency-injected write() primitive
2018-10-16 23:44:31 -07:00
Kartik Agaram
df592211f6
4706
2018-10-16 23:43:32 -07:00