Commit Graph

8120 Commits

Author SHA1 Message Date
Kartik Agaram e3290a6c1a support color comparison in the palette doc
It's intended to be used with a browser's inspector.
2021-05-01 09:37:14 -07:00
Kartik K. Agaram bf4c19f053 shell: squeeze menu 2021-04-30 00:00:55 -07:00
Kartik K. Agaram 3385febc11 shell: allow 'def' to overwrite 2021-04-29 23:53:28 -07:00
Kartik K. Agaram d46c4b06b2 shell: comments 2021-04-29 23:48:36 -07:00
Kartik K. Agaram 24883b04f5 . 2021-04-29 23:43:17 -07:00
Kartik K. Agaram 772b7b6585 adjust fake screen aspect ratio for verisimilitude 2021-04-29 23:38:37 -07:00
Kartik K. Agaram ca47215a6b keep the temporary progress screen off the keyboard 2021-04-29 20:38:18 -07:00
Kartik K. Agaram 24222b1735 make pixel borders of screen clear 2021-04-29 20:35:50 -07:00
Kartik K. Agaram 26eae87d3f make matching parens pop again 2021-04-29 16:47:26 -07:00
Kartik K. Agaram c811754807 render definitions in 2 columns 2021-04-29 16:43:40 -07:00
Kartik K. Agaram 6503529627 white text everywhere by default 2021-04-29 16:27:43 -07:00
Kartik K. Agaram 5124feb31e tweak colors for definitions 2021-04-29 16:14:47 -07:00
Kartik K. Agaram e13fd3e0a1 render in a narrow column 2021-04-29 16:11:23 -07:00
Kartik K. Agaram 05879d4f99 load large definitions 2021-04-29 16:10:30 -07:00
Kartik K. Agaram b860f108f7 adjust some colors and padding 2021-04-29 15:10:17 -07:00
Kartik K. Agaram 4541bfa59b extremely threadbare null-pointer protection
This protects us from reading null arrays, but not null structs.
It also doesn't protect us from writes to address 0 itself.

It is also incredibly unsafe. According to https://wiki.osdev.org/Memory_Map_(x86),
address 0 contains the real-mode IVT. Am I sure it'll never ever get used
after I switch to protected mode? I really need a page table, something
minimal to protect the first 4KB of physical memory or something.

I wonder what other languages/OSs do to protect against really large struct
definitions.
2021-04-28 22:22:55 -07:00
Kartik K. Agaram dcb6a21a91 bugfix: initialize gap buffers before using them
I keep running into one hole in Mu's memory-safety since dropping the Linux
dependency: null pointers no longer error when dereferenced. Here the problem
manifests as aliasing: lots of gap buffers share the same exact data near
address 0, because it was never initialized.
2021-04-28 22:03:58 -07:00
Kartik K. Agaram 7fa356abef fix rendering 2021-04-28 17:54:02 -07:00
Kartik K. Agaram b9c59a5f5b shell: load/store from/to disk with indent
Once I came up with the right approach, this worked on the first try once
I got the types and registers to line up!
2021-04-28 17:49:55 -07:00
Kartik K. Agaram ef8dc999ca . 2021-04-28 17:08:15 -07:00
Kartik K. Agaram d5d3e02ad4 shell: bugfix for stream literals
I was forgetting that callers sometimes reuse outputs between successive
tokens.
2021-04-28 16:34:40 -07:00
Kartik K. Agaram 9269234e46 start rendering definitions with indentation 2021-04-28 14:47:41 -07:00
Kartik K. Agaram 5b7f938733 start stashing and clearing sandbox after definitions 2021-04-28 13:55:10 -07:00
Kartik K. Agaram e73f1a3b41 . 2021-04-28 12:21:51 -07:00
Kartik K. Agaram a71ff2383a . 2021-04-28 09:45:39 -07:00
Kartik K. Agaram 55cde01edf shell: stream literals 2021-04-27 23:10:30 -07:00
Kartik K. Agaram 9e9e40c05a . 2021-04-27 23:04:20 -07:00
Kartik K. Agaram 409d26ca87 . 2021-04-27 23:03:23 -07:00
Kartik K. Agaram 6ecd9920ca shell: tokenizing stream (string) literals
We're calling them streams since they support appending.
2021-04-27 22:48:16 -07:00
Kartik K. Agaram 16f51dd76d . 2021-04-27 22:14:08 -07:00
Kartik Agaram 865f37aa9c . 2021-04-26 09:42:05 -07:00
Kartik K. Agaram 606c5681b7 bresenham circles
Known issue: circles of radius 9 crash. (Multiples of 9 overflow the trace.)
2021-04-25 22:33:26 -07:00
Kartik K. Agaram 7148f1222e bug in bresenham lines 2021-04-25 22:20:57 -07:00
Kartik K. Agaram 891083c44d shell: primitives 'and' and 'or' 2021-04-25 22:19:00 -07:00
Kartik K. Agaram bd9c1e6a79 shell: primitive 'not' 2021-04-25 22:09:51 -07:00
Kartik K. Agaram 24a6f99107 failing tests not printing since show-stack-state 2021-04-25 22:08:00 -07:00
Kartik K. Agaram 6e0f0bdf50 . 2021-04-25 22:00:00 -07:00
Kartik K. Agaram ffe36c4050 . 2021-04-25 21:45:27 -07:00
Kartik K. Agaram 1a18c9e24b . 2021-04-25 21:35:14 -07:00
Kartik K. Agaram a68ecc0184 . 2021-04-25 21:32:15 -07:00
Kartik K. Agaram 3b1f23f5d7 expand stack to 16MB
It's also no longer contiguous with code.
2021-04-25 21:29:42 -07:00
Kartik K. Agaram 6bb70a236c shell: tab inserts two spaces 2021-04-25 21:03:14 -07:00
Kartik K. Agaram cbebd548ca shell: use ctrl-m rather than tab to bounce to trace
We'll save tab for inserting graphemes.
2021-04-25 21:03:05 -07:00
Kartik K. Agaram 1323a6bb3a .
Show all builtins now that we have more space.
2021-04-25 17:57:19 -07:00
Kartik K. Agaram 8e89dd5a78 devote 2/3rds of screen to definitions 2021-04-25 17:55:17 -07:00
Kartik K. Agaram 35a6f3cc99 add some padding to the sandbox 2021-04-25 17:49:39 -07:00
Kartik K. Agaram a761d0e4ef a troubleshooting note 2021-04-25 16:02:30 -07:00
Kartik K. Agaram d56153d004 . 2021-04-25 15:58:03 -07:00
Kartik K. Agaram 22a95bd813 expand memory to 2GB
It requires more than 1GB to fill the screen with a chessboard pattern
using the definition in shell/iterative-definitions.limg.

I also speed up the chessboard program by clearing the screen up front
and then only rendering the white pixels.
2021-04-25 15:56:34 -07:00
Kartik Agaram 8185a605c6 expand heap to Qemu default 2021-04-25 08:08:47 -07:00