mirror of
https://github.com/irmen/prog8.git
synced 2024-12-27 05:29:38 +00:00
implemented asm for rol array values
This commit is contained in:
parent
4274fd168e
commit
f8b0b9575d
@ -1879,6 +1879,22 @@ lsr_array_w .proc
|
|||||||
rts
|
rts
|
||||||
.pend
|
.pend
|
||||||
|
|
||||||
|
rol_array_ub .proc
|
||||||
|
; -- rol a ubyte in an array (index and array address on stack)
|
||||||
|
inx
|
||||||
|
ldy c64.ESTACK_LO,x
|
||||||
|
inx
|
||||||
|
lda c64.ESTACK_LO,x
|
||||||
|
sta c64.SCRATCH_ZPWORD1
|
||||||
|
lda c64.ESTACK_HI,x
|
||||||
|
sta c64.SCRATCH_ZPWORD1+1
|
||||||
|
lda (c64.SCRATCH_ZPWORD1),y
|
||||||
|
rol a
|
||||||
|
sta (c64.SCRATCH_ZPWORD1),y
|
||||||
|
rts
|
||||||
|
.pend
|
||||||
|
|
||||||
|
|
||||||
ror_array_ub .proc
|
ror_array_ub .proc
|
||||||
; -- ror a ubyte in an array (index and array address on stack)
|
; -- ror a ubyte in an array (index and array address on stack)
|
||||||
inx
|
inx
|
||||||
@ -1951,6 +1967,29 @@ ror_array_uw .proc
|
|||||||
rts
|
rts
|
||||||
.pend
|
.pend
|
||||||
|
|
||||||
|
rol_array_uw .proc
|
||||||
|
; -- rol a uword in an array (index and array address on stack)
|
||||||
|
php
|
||||||
|
inx
|
||||||
|
lda c64.ESTACK_LO,x
|
||||||
|
asl a
|
||||||
|
tay
|
||||||
|
inx
|
||||||
|
lda c64.ESTACK_LO,x
|
||||||
|
sta c64.SCRATCH_ZPWORD1
|
||||||
|
lda c64.ESTACK_HI,x
|
||||||
|
sta c64.SCRATCH_ZPWORD1+1
|
||||||
|
lda (c64.SCRATCH_ZPWORD1),y
|
||||||
|
plp
|
||||||
|
rol a
|
||||||
|
sta (c64.SCRATCH_ZPWORD1),y
|
||||||
|
iny
|
||||||
|
lda (c64.SCRATCH_ZPWORD1),y
|
||||||
|
rol a
|
||||||
|
sta (c64.SCRATCH_ZPWORD1),y
|
||||||
|
rts
|
||||||
|
.pend
|
||||||
|
|
||||||
rol2_array_uw .proc
|
rol2_array_uw .proc
|
||||||
; -- rol2 (16-bit rol) a uword in an array (index and array address on stack)
|
; -- rol2 (16-bit rol) a uword in an array (index and array address on stack)
|
||||||
inx
|
inx
|
||||||
@ -2011,11 +2050,3 @@ lsl_array_b .proc
|
|||||||
lsl_array_w .proc
|
lsl_array_w .proc
|
||||||
.warn "lsl_array_w" ; TODO
|
.warn "lsl_array_w" ; TODO
|
||||||
.pend
|
.pend
|
||||||
|
|
||||||
rol_array_ub .proc
|
|
||||||
.warn "rol_array_ub" ; TODO
|
|
||||||
.pend
|
|
||||||
|
|
||||||
rol_array_uw .proc
|
|
||||||
.warn "rol_array_uw" ; TODO
|
|
||||||
.pend
|
|
||||||
|
@ -66,21 +66,27 @@ main {
|
|||||||
|
|
||||||
c64scr.print_uwbin(uwarray[1] as uword, false)
|
c64scr.print_uwbin(uwarray[1] as uword, false)
|
||||||
c64.CHROUT('\n')
|
c64.CHROUT('\n')
|
||||||
|
set_carry()
|
||||||
rol(uwarray[1])
|
rol(uwarray[1])
|
||||||
c64scr.print_uwbin(uwarray[1] as uword, false)
|
c64scr.print_uwbin(uwarray[1] as uword, false)
|
||||||
c64.CHROUT('\n')
|
c64.CHROUT('\n')
|
||||||
|
set_carry()
|
||||||
rol(uwarray[1])
|
rol(uwarray[1])
|
||||||
c64scr.print_uwbin(uwarray[1] as uword, false)
|
c64scr.print_uwbin(uwarray[1] as uword, false)
|
||||||
c64.CHROUT('\n')
|
c64.CHROUT('\n')
|
||||||
|
set_carry()
|
||||||
rol(uwarray[1])
|
rol(uwarray[1])
|
||||||
c64scr.print_uwbin(uwarray[1] as uword, false)
|
c64scr.print_uwbin(uwarray[1] as uword, false)
|
||||||
c64.CHROUT('\n')
|
c64.CHROUT('\n')
|
||||||
|
set_carry()
|
||||||
rol(uwarray[1])
|
rol(uwarray[1])
|
||||||
c64scr.print_uwbin(uwarray[1] as uword, false)
|
c64scr.print_uwbin(uwarray[1] as uword, false)
|
||||||
c64.CHROUT('\n')
|
c64.CHROUT('\n')
|
||||||
|
set_carry()
|
||||||
rol(uwarray[1])
|
rol(uwarray[1])
|
||||||
c64scr.print_uwbin(uwarray[1] as uword, false)
|
c64scr.print_uwbin(uwarray[1] as uword, false)
|
||||||
c64.CHROUT('\n')
|
c64.CHROUT('\n')
|
||||||
|
set_carry()
|
||||||
rol(uwarray[1])
|
rol(uwarray[1])
|
||||||
c64scr.print_uwbin(uwarray[1] as uword, false)
|
c64scr.print_uwbin(uwarray[1] as uword, false)
|
||||||
c64.CHROUT('\n')
|
c64.CHROUT('\n')
|
||||||
@ -109,11 +115,8 @@ main {
|
|||||||
; c64.CHROUT('\n')
|
; c64.CHROUT('\n')
|
||||||
|
|
||||||
; lsl(ubarray[1])
|
; lsl(ubarray[1])
|
||||||
; rol(ubarray[1])
|
|
||||||
; lsl(bbarray[1])
|
; lsl(bbarray[1])
|
||||||
;
|
|
||||||
; lsl(uwarray[1])
|
; lsl(uwarray[1])
|
||||||
; rol(uwarray[1])
|
|
||||||
; lsl(wwarray[1])
|
; lsl(wwarray[1])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user