Updated poke and peek command info
This commit is contained in:
parent
22e6759409
commit
b382732e1c
1 changed files with 22 additions and 11 deletions
33
commands.md
33
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:**
|
||||
```
|
||||
<dest> = PEEK <address>[<offset>]
|
||||
|
|
@ -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 <ptrvar> TO <target>
|
|||
**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 <address>[<offset>] WITH <value>
|
||||
|
|
@ -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 <address>[<offset>] WITH <value>
|
||||
|
|
|
|||
Loading…
Reference in a new issue