Justine Tunney
b2d4ef9960
Shave four bytes
2022-01-11 19:22:14 -08:00
Hikaru Ikuta
a6836ede0f
Update binary
2022-01-09 08:46:14 +09:00
Hikaru Ikuta
e6c6597185
Separate Read and .ifRead
2022-01-09 08:44:36 +09:00
Hikaru Ikuta
6de7911b7c
Add tests for IO
2022-01-09 08:41:42 +09:00
Hikaru Ikuta
97531f6cb7
Refine comments and .type directives
2022-01-09 08:41:35 +09:00
Hikaru Ikuta
1dbcb9c9b5
Shave three bytes (469 bytes)
2022-01-07 19:51:31 +09:00
Hikaru Ikuta
9b0b5e9f20
Shave three more bytes using overlaps
2022-01-07 19:51:31 +09:00
Hikaru Ikuta
c84eed864f
Simplify
2022-01-07 19:51:31 +09:00
Hikaru Ikuta
f14c20a5b6
Shave one byte
2022-01-07 19:51:31 +09:00
Hikaru Ikuta
8a59e66349
Shave two more bytes
2022-01-07 19:51:31 +09:00
Hikaru Ikuta
bcb1474693
Shave two bytes
2022-01-07 19:51:31 +09:00
Hikaru Ikuta
1af3db75fe
Use %bp instead of %fs for caching the user input
2022-01-07 19:51:31 +09:00
Hikaru Ikuta
cac1923ebf
Shave three more bytes by placing Read inside Apply
2022-01-07 19:51:31 +09:00
Hikaru Ikuta
9ca97d2ea7
Shave two bytes
2022-01-07 19:51:31 +09:00
Hikaru Ikuta
36678457f3
Put Print in Apply
2022-01-07 19:51:27 +09:00
Hikaru Ikuta
1ff4ea987d
Print newline capability
2022-01-07 15:26:11 +09:00
Hikaru Ikuta
72b037de93
Shave one byte
2022-01-07 15:26:11 +09:00
Hikaru Ikuta
829ed4f398
Add types for kRead and kPrint
2022-01-07 15:26:11 +09:00
Hikaru Ikuta
1136e5752e
Initialize register cache for robustness
2022-01-07 15:26:11 +09:00
Hikaru Ikuta
162969de42
Fix READ buffer bug
2022-01-07 15:26:11 +09:00
Hikaru Ikuta
46ba9fee4f
A more robust Read function
2022-01-07 15:23:53 +09:00
Hikaru Ikuta
90903662a9
Shave 2 bytes
2022-01-07 15:23:53 +09:00
Hikaru Ikuta
ef4f143680
Add READ and PRINT
2022-01-07 15:23:48 +09:00
Hikaru Ikuta
194181a709
Broader register initialization coverage ( #21 )
2022-01-03 11:13:47 -08:00
Hikaru Ikuta
32dfd00780
Fix variable referencing bug in QEMU ( #19 )
2022-01-02 18:23:25 -08:00
agreppin
39ef281e64
Merge pull request #17 from woodrush/fix-eq
...
Fix bug for `EQ` where a null string is printed
2021-12-31 00:39:22 +01:00
Hikaru Ikuta
304eaab6ad
Fix bug for EQ
2021-12-31 04:58:59 +09:00
Justine Tunney
ec8c0ce6df
Have Apply call Assoc
2021-12-12 14:49:02 -08:00
Justine Tunney
540034fd2f
Clean up code (434 bytes)
2021-12-11 15:04:22 -08:00
Justine Tunney
caa4547c8f
Inline Pairlis (436 bytes)
2021-12-09 08:52:42 -08:00
Justine Tunney
040852302c
Fix off by one w/ interning (441 bytes)
2021-12-08 10:36:53 -08:00
Justine Tunney
d5afd05ef8
Make stack change safer
...
Setting the stack to zero is hosing the image somehow in 86box.
This change appears to fix it. Would be nice to learn more.
2021-11-27 20:58:26 -08:00
Justine Tunney
920babb3e7
Outstanding overlap (now 440 bytes)
2021-11-25 08:25:38 -08:00
Peter Ferrie
a557787f5f
shave two bytes
2021-11-24 17:11:33 -08:00
Peter Ferrie
88e749ea79
move SP setting
2021-11-24 12:32:14 -08:00
Peter Ferrie
d50e78162d
replace undefined function
2021-11-24 12:24:33 -08:00
Peter Ferrie
7ae47772f6
shave one byte
2021-11-24 12:23:22 -08:00
Justine Tunney
17bd5be818
Make intern function more readable
2021-11-24 00:09:01 -08:00
Justine Tunney
7f55a4be0a
Revert "shave one byte"
...
This reverts commit 041d23e99b .
2021-11-24 00:07:22 -08:00
Peter Ferrie
041d23e99b
shave one byte
2021-11-23 20:17:18 -08:00
Peter Ferrie
7e8979fa7c
avoid use of BP across video calls
2021-11-23 19:52:54 -08:00
Peter Ferrie
0637e25bb5
Shave some bytes ( #14 ) now 443 bytes
2021-11-23 19:31:48 -08:00
Justine Tunney
bab9ebed18
Do nothing on undefined variable (now 446 bytes)
...
The only exception is NIL which has been added to the main Eval().
This change also inlines the ABC Garbage Collector for more speed.
2021-11-23 05:09:13 -08:00
Peter Ferrie
d66e5d984f
shave some bytes
...
- setting of SS is not interruptible, so no need to guard it;
- direction flag is cleared by BIOS code, even on the XT.
2021-11-22 22:04:42 -08:00
Justine Tunney
6000841378
Inline Evaluate into Eval (it looks nicer)
2021-11-22 17:52:05 -08:00
Justine Tunney
c549796f78
Make C impl match latest asm tactics
...
The C code now has garbage collection. It now uses negative memory
for storing cons cells. Function arguments have been inlined since
undefined evaluation order shouldn't matter since it is immutable.
Compiler warnings have been turned off so we can use traditional C
2021-11-22 16:43:03 -08:00
Justine Tunney
2f57156c34
Remove broken dot parsing in C code
...
Fixes #13
2021-11-21 23:25:53 -08:00
Justine Tunney
3d19d8d9f2
Shave two bytes (now 456 bytes)
2021-11-21 21:05:36 -08:00
Justine Tunney
d587ce19d1
Shave twelve bytes (now 458 bytes)
2021-11-21 20:28:45 -08:00
Justine Tunney
5a33a6b97a
Add garbage collection (now 470 bytes)
...
This GC wraps Eval() to create a copy of the result, and then
memcpy's it backwards to the position where the g_mem pointer
resided at the beginning of Eval() thereby discarding all the
cons cells that got created which weren't part of the result.
Overlap (or negative GC) isn't possible because we don't copy
cells beneath the low water mark.
As it turns out 44 bytes is all you need to implement garbage
collection when your language guarantees that data structures
can't have cycles, due to the lack of mutability.
2021-11-21 09:21:53 -08:00