summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2022-03-05 01:55:10 +0100
committerThomas Voss <mail@thomasvoss.com> 2022-03-05 01:55:10 +0100
commit8360d6eb0049ed785d4c7c1d8e03842bc93744cf (patch)
tree26a62c243647da500c87dc49b4a63813859d749e
parente4797b5ad75128bd7a7b0ca97daed3d8e79cd054 (diff)
Fix some comments
-rw-r--r--smallbrain.s8
1 files changed, 4 insertions, 4 deletions
diff --git a/smallbrain.s b/smallbrain.s
index 208c4cc..b293978 100644
--- a/smallbrain.s
+++ b/smallbrain.s
@@ -170,8 +170,8 @@ read_file_eof:
# ==================
# Description:
# Compile the program into a bytecode which is an optimized version of the raw program. Each
-# opcode is a "struct" where the higher 8 bytes are an opcode and the lower 8 are an option
-# but of data.
+# opcode is a "struct" where the higher 8 bytes are an opcode and the lower 8 are data for
+# the instruction.
# ==================
compile:
movq (program), %r15 # Store the address of the program pointer into %r15
@@ -425,13 +425,13 @@ execute_left:
jmp execute_out
execute_loop_start:
- # If the current memory cell is 0 move to the next '['
+ # If the current memory cell is 0 move to the next ']'
cmpb $0, (%r14)
cmovzq 8(%r15), %r15
jmp execute_out
execute_loop_end:
- # If the current memory cell is not 0 move to the next ']'
+ # If the current memory cell is not 0 move to the last '['
cmpb $0, (%r14)
cmovnzq 8(%r15), %r15
jmp execute_out