iniitial POKE command implementation

This commit is contained in:
FeralChild64 committed 2020-12-03 17:51:18 +01:00
1 parent fb70e4d7f9
commit 33e1e1ba4b
2 files changed
+38 -2

No files matched your search

@@ -31,8 +31,6 @@ cmd_wait:
+nop
cmd_def:
+nop
cmd_poke:
+nop
cmd_printhash:
+nop
cmd_cont:
+38
View File
@@ -0,0 +1,38 @@
;; #LAYOUT# STD * #TAKE
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
cmd_poke:
; Fetch address, store it on the stack
jsr fetch_uint16
+bcs do_SYNTAX_error
lda LINNUM+0
pha
lda LINNUM+1
pha
; Fetch value
jsr fetch_coma_uint8
+bcs do_SYNTAX_error
; Retrieve address
tay
pla
sta LINNUM+1
pla
sta LINNUM+0
; Write to memory
tya
ldy #$00
sta (LINNUM), y
rts