diff --git a/commands.md b/commands.md index 502e00f..9f67968 100644 --- a/commands.md +++ b/commands.md @@ -279,7 +279,7 @@ Operators: `=` `==` `<>` `!=` `>` `<` `>=` `<=` **Examples:** ``` -IF count = 10 +IF count == 10 result = 1 ENDIF @@ -289,10 +289,6 @@ ELSE skip(value) ENDIF -IF status & $80 - errorFlag = 1 -ENDIF - IF x < 100 x++ ELSE @@ -414,6 +410,9 @@ ORIGIN startAddress Reads byte from memory location. +For operating with offsets the address parameter must be an absolute WORD variable in the zero page. + + **Syntax:** ``` = PEEK
[] @@ -431,7 +430,10 @@ byte = PEEK pointer ## PEEKW -Reads word (16-bit) from memory location. +Reads word (16-bit) from memory location at address. + +For operating with offsets the address parameter must be an absolute WORD variable in the zero page. + **Syntax:** ``` @@ -440,10 +442,13 @@ Reads word (16-bit) from memory location. **Examples:** ``` -addr = PEEKW $FFFE -value = PEEKW dataPtr[0] -word = PEEKW buffer[10] -address = PEEKW pointer +reset_addr = PEEKW $FFFE + +WORD buffer @ $fd +offset_val = PEEKW buff_ptr[10] + +WORD pointer +val = PEEKW pointer ``` --- @@ -460,7 +465,7 @@ POINTER TO **Examples:** ``` POINTER screenPtr TO $0400 -POINTER dataPtr TO buffer +POINTER buff_ptr TO buffer // buffer might be a label to some data POINTER funcPtr TO myFunction ``` @@ -470,6 +475,9 @@ POINTER funcPtr TO myFunction Writes byte to memory location. +For operating with offsets the address parameter must be an absolute WORD variable in the zero page. + + **Syntax:** ``` POKE
[] WITH @@ -489,6 +497,9 @@ POKE pointer WITH value Writes word (16-bit) to memory location. +For operating with offsets the address parameter must be an absolute WORD variable in the zero page. + + **Syntax:** ``` POKEW
[] WITH