From 8d65694bcccd9ec07b926dcc5c6df114c7444234 Mon Sep 17 00:00:00 2001 From: jan Date: Fri, 13 Dec 2024 13:49:22 +0100 Subject: [PATCH] Added hexyl output to the README --- README.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 18ea001..5cd82f0 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,7 @@ There is no distinction between memory that contains instructions and memory tha The initial state is loaded from a binary file that is read as containing the (le) u16 values in order. The maximum size is $2*2^{16}=$ bytes ($\approx$ 131.1kB). It can be shorter, in which case the end is padded with zeroes. The computer will begin by executing the instruction at index 0. -### Example +## Example A simple example would be to print all $2^{16}$ possible colors to the screen. We make our lives easier, by mapping each index of the screen-buffer to the color which is encoded with the index. @@ -158,6 +158,21 @@ with open("all_colors.svc16", "wb") as f: ``` +Inspecting the file, we should see: +```ansi +➜ hexyl examples/all_colors.svc16 -pv --panels 1 + + 00 00 f5 01 01 00 00 00 + 00 00 f6 01 ff ff 00 00 + 0b 00 f4 01 f4 01 00 00 + 03 00 f4 01 f5 01 f4 01 + 07 00 f4 01 f6 01 f7 01 + 0e 00 f7 01 f5 01 f7 01 + 02 00 00 00 04 00 f7 01 + 0f 00 00 00 00 00 00 00 + 01 00 00 00 00 00 00 00 +``` + When we run this, we get the following output: ![All colors](colors_scaled.png)