Updated poke and peek command info

This commit is contained in:
Mattias Hansson 2025-12-07 08:47:09 +01:00
parent 22e6759409
commit b382732e1c

View file

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