mirror of
https://github.com/mgcaret/of816.git
synced 2025-04-09 20:40:49 +00:00
Neon816: VDC access words
This commit is contained in:
parent
bdcbfb2766
commit
343dd83cdd
@ -91,7 +91,7 @@ SPI2ctrl3 = $10001F ; init = $05
|
||||
; VDC
|
||||
; *****************
|
||||
|
||||
VDCio = $100120 ; read: 1 byte, write: 1 or 2 bytes
|
||||
VDCbase = $100120 ; base address, there are $20 registers
|
||||
|
||||
; *****************
|
||||
; FDC
|
||||
|
@ -209,6 +209,54 @@ dword I2C2_FETCH,"I2C2@+"
|
||||
.a16
|
||||
eword
|
||||
|
||||
dword VDC_C_STORE,"VDCC!"
|
||||
jsr _popay ; pop offset
|
||||
phy ; save low word
|
||||
jsr _popay ; pop value to write
|
||||
pla ; get offset back
|
||||
phx ; save SP
|
||||
tax ; offset to x reg
|
||||
sep #SHORT_A ; whew! that was fun!
|
||||
.a8
|
||||
tya ; value to A
|
||||
sta f:VDCbase,x
|
||||
rep #SHORT_A
|
||||
.a16
|
||||
plx ; restore SP
|
||||
NEXT
|
||||
eword
|
||||
|
||||
dword VDC_C_FETCH,"VDCC@"
|
||||
jsr _popay ; pop offet
|
||||
phx ; save SP
|
||||
tya
|
||||
tax
|
||||
sep #SHORT_A ; whew! that was fun!
|
||||
.a8
|
||||
lda f:VDCbase,x
|
||||
rep #SHORT_A
|
||||
.a16
|
||||
plx ; restore SP
|
||||
and #$00FF
|
||||
tay
|
||||
lda #$0000
|
||||
PUSHNEXT
|
||||
eword
|
||||
|
||||
dword VDC_STORE,"VDC!"
|
||||
jsr _popay ; again! again! again!
|
||||
phy
|
||||
jsr _popay
|
||||
pla
|
||||
phx
|
||||
tax
|
||||
tya
|
||||
sta f:VDCbase,x
|
||||
rep #SHORT_A
|
||||
.a16
|
||||
plx ; restore SP
|
||||
NEXT
|
||||
eword
|
||||
|
||||
dend
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user