diff --git a/commands.md b/commands.md index 9d61c26..247c0b8 100644 --- a/commands.md +++ b/commands.md @@ -614,15 +614,15 @@ For operating with offsets the address parameter must be an absolute WORD variab **Syntax:** ``` -POKE
[] WITH +POKE
[], ``` **Examples:** ``` -POKE $D020 WITH 0 -POKE screenPtr[index] WITH char -POKE buffer[5] WITH data -POKE pointer WITH value +POKE $D020, 0 +POKE screenPtr[index], char +POKE buffer[5], data +POKE pointer, value ``` --- @@ -636,14 +636,14 @@ For operating with offsets the address parameter must be an absolute WORD variab **Syntax:** ``` -POKEW
[] WITH +POKEW
[], ``` **Examples:** ``` -POKEW $0314 WITH handler -POKEW dataPtr[0] WITH value -POKEW buffer[10] WITH address +POKEW $0314, handler +POKEW dataPtr[0], value +POKEW buffer[10], address ``` --- diff --git a/language.md b/language.md index 7792dff..38a697b 100644 --- a/language.md +++ b/language.md @@ -370,9 +370,9 @@ value = PEEK buffer[10] // Read buffer+10 Write a byte to memory: ```c65 -POKE $D020 WITH 0 // Write to absolute address -POKE screenPtr[index] WITH char // Write with offset -POKE pointer WITH value // Write to pointer +POKE $D020, 0 // Write to absolute address +POKE screenPtr[index], char // Write with offset +POKE pointer, value // Write to pointer ``` ### PEEKW - Reading 16-bit Words @@ -392,8 +392,8 @@ value = PEEKW buffer[10] // Read word at buffer+10 Write a 16-bit value to memory: ```c65 -POKEW $0314 WITH irqHandler // Set IRQ vector -POKEW dataPtr[0] WITH address // Write word with offset +POKEW $0314, irqHandler // Set IRQ vector +POKEW dataPtr[0], address // Write word with offset ``` ### POINTER - Setting Pointers @@ -830,7 +830,7 @@ FEND FUNC updateScreen BYTE color color = frameCount & $0F - POKE screenPtr[0] WITH color + POKE screenPtr[0], color frameCount++ FEND @@ -857,7 +857,7 @@ FUNC clearScreen WORD remaining = 1000 WHILE remaining > 0 - POKE screenPtr[0] WITH 32 // Space character + POKE screenPtr[0], 32 // Space character screenPtr++ remaining-- WEND @@ -935,7 +935,7 @@ FUNC installIRQ ENDASM oldIRQ = PEEKW IRQ_VECTOR - POKEW IRQ_VECTOR WITH myIRQ + POKEW IRQ_VECTOR, myIRQ ASM cli // Enable interrupts @@ -1024,7 +1024,7 @@ ENDIF ```c65 // Bad -POKE $D020 WITH 5 +POKE $D020, 5 // Good BYTE CONST COLOR_GREEN = 5 @@ -1131,9 +1131,9 @@ FEND // Memory value = PEEK $D020 -POKE $D020 WITH 5 +POKE $D020, 5 address = PEEKW $FFFC -POKEW $0314 WITH handler +POKEW $0314, handler // Operators + - * / // Arithmetic diff --git a/syntax.md b/syntax.md index 9e13bd2..fbf1744 100644 --- a/syntax.md +++ b/syntax.md @@ -682,7 +682,7 @@ INC $D000+20 ``` FOR i = 0 TO MAX_VALUE-1 IF x > THRESHOLD+10 -POKE $D020+offset WITH value +POKE $D020+offset, value result = PEEK $0400+index ```