mirror of
https://github.com/irmen/prog8.git
synced 2025-01-13 10:29:52 +00:00
implemented asm for ror2 array values
This commit is contained in:
parent
f2e5d987a9
commit
be7f5957f3
@ -1902,6 +1902,23 @@ ror_array_ub .proc
|
||||
rts
|
||||
.pend
|
||||
|
||||
ror2_array_ub .proc
|
||||
; -- ror2 (8-bit ror) 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
|
||||
lsr a
|
||||
bcc +
|
||||
ora #$80
|
||||
+ sta (c64.SCRATCH_ZPWORD1),y
|
||||
rts
|
||||
.pend
|
||||
|
||||
ror_array_uw .proc
|
||||
; -- ror a uword in an array (index and array address on stack)
|
||||
php
|
||||
@ -1926,6 +1943,33 @@ ror_array_uw .proc
|
||||
rts
|
||||
.pend
|
||||
|
||||
ror2_array_uw .proc
|
||||
; -- ror2 (16-bit ror) a uword in an array (index and array address on stack)
|
||||
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
|
||||
iny
|
||||
lda (c64.SCRATCH_ZPWORD1),y
|
||||
lsr a
|
||||
sta (c64.SCRATCH_ZPWORD1),y
|
||||
dey
|
||||
lda (c64.SCRATCH_ZPWORD1),y
|
||||
ror a
|
||||
sta (c64.SCRATCH_ZPWORD1),y
|
||||
bcc +
|
||||
iny
|
||||
lda (c64.SCRATCH_ZPWORD1),y
|
||||
ora #$80
|
||||
sta (c64.SCRATCH_ZPWORD1),y
|
||||
+ rts
|
||||
.pend
|
||||
|
||||
rol_array_ub .proc
|
||||
.warn "rol_array_ub" ; TODO
|
||||
.pend
|
||||
@ -1942,10 +1986,3 @@ rol2_array_uw .proc
|
||||
.warn "rol2_array_uw" ; TODO
|
||||
.pend
|
||||
|
||||
ror2_array_ub .proc
|
||||
.warn "ror2_array_ub" ; TODO
|
||||
.pend
|
||||
|
||||
ror2_array_uw .proc
|
||||
.warn "ror2_array_uw" ; TODO
|
||||
.pend
|
||||
|
@ -17,56 +17,27 @@ main {
|
||||
sub unimplemented() {
|
||||
ubyte xx
|
||||
uword xxx
|
||||
ror(xx)
|
||||
ror(xxx)
|
||||
|
||||
clear_carry()
|
||||
c64scr.print_ubbin(ubarray[1], false)
|
||||
c64.CHROUT('\n')
|
||||
ror(ubarray[1])
|
||||
c64scr.print_ubbin(ubarray[1], false)
|
||||
c64.CHROUT('\n')
|
||||
ror(ubarray[1])
|
||||
c64scr.print_ubbin(ubarray[1], false)
|
||||
c64.CHROUT('\n')
|
||||
ror(ubarray[1])
|
||||
c64scr.print_ubbin(ubarray[1], false)
|
||||
c64.CHROUT('\n')
|
||||
ror(ubarray[1])
|
||||
c64scr.print_ubbin(ubarray[1], false)
|
||||
c64.CHROUT('\n')
|
||||
ror(ubarray[1])
|
||||
c64scr.print_ubbin(ubarray[1], false)
|
||||
c64.CHROUT('\n')
|
||||
ror(ubarray[1])
|
||||
c64scr.print_ubbin(ubarray[1], false)
|
||||
c64.CHROUT('\n')
|
||||
c64.CHROUT('\n')
|
||||
ror2(xx)
|
||||
ror2(xxx)
|
||||
|
||||
c64scr.print_ubbin(ubarray[1], false)
|
||||
c64.CHROUT('\n')
|
||||
set_carry()
|
||||
ror(ubarray[1])
|
||||
ror2(ubarray[1])
|
||||
c64scr.print_ubbin(ubarray[1], false)
|
||||
c64.CHROUT('\n')
|
||||
set_carry()
|
||||
ror(ubarray[1])
|
||||
ror2(ubarray[1])
|
||||
c64scr.print_ubbin(ubarray[1], false)
|
||||
c64.CHROUT('\n')
|
||||
set_carry()
|
||||
ror(ubarray[1])
|
||||
ror2(ubarray[1])
|
||||
c64scr.print_ubbin(ubarray[1], false)
|
||||
c64.CHROUT('\n')
|
||||
set_carry()
|
||||
ror(ubarray[1])
|
||||
ror2(ubarray[1])
|
||||
c64scr.print_ubbin(ubarray[1], false)
|
||||
c64.CHROUT('\n')
|
||||
set_carry()
|
||||
ror(ubarray[1])
|
||||
ror2(ubarray[1])
|
||||
c64scr.print_ubbin(ubarray[1], false)
|
||||
c64.CHROUT('\n')
|
||||
set_carry()
|
||||
ror(ubarray[1])
|
||||
ror2(ubarray[1])
|
||||
c64scr.print_ubbin(ubarray[1], false)
|
||||
c64.CHROUT('\n')
|
||||
c64.CHROUT('\n')
|
||||
@ -93,53 +64,24 @@ main {
|
||||
; c64.CHROUT('\n')
|
||||
; c64.CHROUT('\n')
|
||||
|
||||
clear_carry()
|
||||
c64scr.print_uwbin(uwarray[1] as uword, false)
|
||||
c64.CHROUT('\n')
|
||||
ror(uwarray[1])
|
||||
ror2(uwarray[1])
|
||||
c64scr.print_uwbin(uwarray[1] as uword, false)
|
||||
c64.CHROUT('\n')
|
||||
ror(uwarray[1])
|
||||
ror2(uwarray[1])
|
||||
c64scr.print_uwbin(uwarray[1] as uword, false)
|
||||
c64.CHROUT('\n')
|
||||
ror(uwarray[1])
|
||||
ror2(uwarray[1])
|
||||
c64scr.print_uwbin(uwarray[1] as uword, false)
|
||||
c64.CHROUT('\n')
|
||||
ror(uwarray[1])
|
||||
ror2(uwarray[1])
|
||||
c64scr.print_uwbin(uwarray[1] as uword, false)
|
||||
c64.CHROUT('\n')
|
||||
ror(uwarray[1])
|
||||
ror2(uwarray[1])
|
||||
c64scr.print_uwbin(uwarray[1] as uword, false)
|
||||
c64.CHROUT('\n')
|
||||
ror(uwarray[1])
|
||||
c64scr.print_uwbin(uwarray[1] as uword, false)
|
||||
c64.CHROUT('\n')
|
||||
c64.CHROUT('\n')
|
||||
|
||||
c64scr.print_uwbin(uwarray[1] as uword, false)
|
||||
c64.CHROUT('\n')
|
||||
set_carry()
|
||||
ror(uwarray[1])
|
||||
c64scr.print_uwbin(uwarray[1] as uword, false)
|
||||
c64.CHROUT('\n')
|
||||
set_carry()
|
||||
ror(uwarray[1])
|
||||
c64scr.print_uwbin(uwarray[1] as uword, false)
|
||||
c64.CHROUT('\n')
|
||||
set_carry()
|
||||
ror(uwarray[1])
|
||||
c64scr.print_uwbin(uwarray[1] as uword, false)
|
||||
c64.CHROUT('\n')
|
||||
set_carry()
|
||||
ror(uwarray[1])
|
||||
c64scr.print_uwbin(uwarray[1] as uword, false)
|
||||
c64.CHROUT('\n')
|
||||
set_carry()
|
||||
ror(uwarray[1])
|
||||
c64scr.print_uwbin(uwarray[1] as uword, false)
|
||||
c64.CHROUT('\n')
|
||||
set_carry()
|
||||
ror(uwarray[1])
|
||||
ror2(uwarray[1])
|
||||
c64scr.print_uwbin(uwarray[1] as uword, false)
|
||||
c64.CHROUT('\n')
|
||||
c64.CHROUT('\n')
|
||||
@ -168,13 +110,11 @@ main {
|
||||
|
||||
; lsl(ubarray[1])
|
||||
; rol(ubarray[1])
|
||||
; ror2(ubarray[1])
|
||||
; rol2(ubarray[1])
|
||||
; lsl(bbarray[1])
|
||||
;
|
||||
; lsl(uwarray[1])
|
||||
; rol(uwarray[1])
|
||||
; ror2(uwarray[1])
|
||||
; rol2(uwarray[1])
|
||||
; lsl(wwarray[1])
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user