Skip to content

Commit

Permalink
Clarification about endianness
Browse files Browse the repository at this point in the history
  • Loading branch information
Vort committed Oct 29, 2023
1 parent cb98458 commit 0a1ab1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Operation count: 1342951
6. Error value is calculated by comparing reference image data with image data generated by subleq code;
7. If error value is less than `20358302` and operation count is less than `100000000000`, "Success" message is displayed.

Header of `.slif` file is 12 bytes in size and consists of 4 parts: signature (4 bytes), image width (2 bytes), image height (2 bytes) and available memory size (4 bytes). However, for this challenge, all these values are constant, which means that `.slif` file must always start with these bytes: `53 4C 49 46 00 02 00 02 00 00 00 10`.
Header of `.slif` file is 12 bytes in size and consists of 4 parts: signature (4 bytes), image width (2 bytes), image height (2 bytes) and available memory size (4 bytes). However, for this challenge, all these values are constant, which means that `.slif` file must always start with these bytes: `53 4C 49 46 00 02 00 02 00 00 00 10`. Byte order used in this challenge is little-endian, that's why value of `0x0200` is encoded as `00 02` and `0x10000000` is encoded as `00 00 00 10`.

Size of memory block determines how many bytes are available for use by subleq program. For this challenge, this value is set to 256 MiB. It means that subleq program can read and write bytes in `0x00000000` .. `0x0FFFFFFF` address range.

Expand Down

0 comments on commit 0a1ab1a

Please sign in to comment.