Skip to content

Commit

Permalink
Make docs more consistent (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikSchierboom authored Oct 24, 2023
1 parent 9401c9c commit 3b66e11
Show file tree
Hide file tree
Showing 15 changed files with 39 additions and 19 deletions.
6 changes: 4 additions & 2 deletions exercises/practice/acronym/.docs/instructions.append.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Instruction append

## Reserved Addresses

The buffer for the input string uses bytes 64 - 196 of linear memory.
The buffer for the input string uses bytes 64-196 of linear memory.

You may modify this buffer in place if you wish to avoid additional memory allocations
You may modify this buffer in place if you wish to avoid additional memory allocations.
2 changes: 2 additions & 0 deletions exercises/practice/all-your-base/.docs/instructions.append.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Instruction append

## Reserved Addresses

All input is provided as parameters, so no addresses in the linear memory are reserved.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Instruction append

## Reserved Addresses

No linear memory is requires for this exercise.
No linear memory is required for this exercise.
3 changes: 3 additions & 0 deletions exercises/practice/circular-buffer/.docs/hints.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Hints

Linear memory is byte-addressable, but `i32` has a width of four bytes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Instructions
# Instructions append

The `read` returns a Go-style error handling type `(i32,i32)`

Hint: Linear Memory is byte-addressable, but `i32` has a width of four bytes
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Instructions append

If `n` is not a positive integer, stop the program from being executed further and return -1 indicating an error condition.
If `n` is _not_ a positive integer, don't continue executing and return `-1` to indicate an error condition.
4 changes: 3 additions & 1 deletion exercises/practice/hamming/.docs/instructions.append.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Instruction append

## Reserved Addresses

The buffer for the first string uses bytes 1024-2047 of linear memory.
The buffer for the second string uses bytes 2048-3075 of linear memory.

You should not have to modify these buffer or allocate additional memory
You should not have to modify these buffers or allocate additional memory.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

## Reserved Memory

Bytes 64-319 of the linear memory are reserved for the input string.
The buffer for the input string uses bytes 64-319 of linear memory.

## Results

The result should be returned as a 4-way tuple (i32 i32 i32 i32)
Each number represents the count for A, C, G and T in this order.
The result should be returned as a 4-way tuple: `(i32 i32 i32 i32)`. Each number represents the count for the letters `A`, `C`, `G`and `T`, in this order.
4 changes: 3 additions & 1 deletion exercises/practice/pangram/.docs/instructions.append.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Instruction append

## Reserved Memory

Bytes 64-319 of the linear memory are reserved for the input string.
The buffer for the input string uses bytes 64-319 of linear memory.
2 changes: 2 additions & 0 deletions exercises/practice/pop-count/.docs/instructions.append.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Instruction append

## Reserved Addresses

No linear memory is required for this exercise.
10 changes: 6 additions & 4 deletions exercises/practice/resistor-color/.docs/instructions.append.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Instructions append

## Reserved Memory

Bytes 64-189 of the linear memory are reserved for the input string.
The buffer for the input string uses bytes 64-189 of linear memory.

# Instructions append
## Arrays

WebAssembly does not have the concept of arrays. For the colors test, return a comma-delimited buffer of characters in the form:
`black,brown,red,orange,yellow,green,blue,violet,grey,white`
WebAssembly does not have the concept of arrays.
For the colors test, return a comma-delimited buffer of characters in the form: `black,brown,red,orange,yellow,green,blue,violet,grey,white`

You will then have to internally build an array of structures using offsets and lengths to provide structure around this buffer.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Reserved Memory

Bytes 64-319 of the linear memory are reserved for the input string.
The buffer for the input string uses bytes 64-319 of linear memory.

The input string can be modified in place if desired.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Instruction append

## Reserved Memory

Bytes 64-189 of the linear memory are reserved for the input string.
The buffer for the input string uses bytes 64-189 of linear memory.

The input string can be modified in place if desired.
2 changes: 2 additions & 0 deletions exercises/practice/square-root/.docs/instructions.append.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Instruction append

## Reserved Addresses

No linear memory is required for this exercise.
4 changes: 3 additions & 1 deletion exercises/practice/two-fer/.docs/instructions.append.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Instruction append

## Reserved Addresses

The input buffer for the first string uses bytes 128-192 linear memory.
The buffer for the input string uses bytes 128-192 of linear memory.

0 comments on commit 3b66e11

Please sign in to comment.