mirror of
https://github.com/irmen/prog8.git
synced 2024-11-26 11:49:22 +00:00
implemented asm for ror array values
This commit is contained in:
parent
f01173d8db
commit
f2e5d987a9
@ -1887,6 +1887,45 @@ lsr_array_w .proc
|
||||
rts
|
||||
.pend
|
||||
|
||||
ror_array_ub .proc
|
||||
; -- 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
|
||||
ror a
|
||||
sta (c64.SCRATCH_ZPWORD1),y
|
||||
rts
|
||||
.pend
|
||||
|
||||
ror_array_uw .proc
|
||||
; -- ror 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
|
||||
iny
|
||||
lda (c64.SCRATCH_ZPWORD1),y
|
||||
plp
|
||||
ror a
|
||||
sta (c64.SCRATCH_ZPWORD1),y
|
||||
dey
|
||||
lda (c64.SCRATCH_ZPWORD1),y
|
||||
ror a
|
||||
sta (c64.SCRATCH_ZPWORD1),y
|
||||
rts
|
||||
.pend
|
||||
|
||||
rol_array_ub .proc
|
||||
.warn "rol_array_ub" ; TODO
|
||||
.pend
|
||||
@ -1903,14 +1942,6 @@ rol2_array_uw .proc
|
||||
.warn "rol2_array_uw" ; TODO
|
||||
.pend
|
||||
|
||||
ror_array_ub .proc
|
||||
.warn "ror_array_ub" ; TODO
|
||||
.pend
|
||||
|
||||
ror_array_uw .proc
|
||||
.warn "ror_array_uw" ; TODO
|
||||
.pend
|
||||
|
||||
ror2_array_ub .proc
|
||||
.warn "ror2_array_ub" ; TODO
|
||||
.pend
|
||||
|
@ -15,107 +15,167 @@ main {
|
||||
word[] wwarray = [8200, -%0101110011110001, 8200]
|
||||
|
||||
sub unimplemented() {
|
||||
ubyte xx
|
||||
uword xxx
|
||||
ror(xx)
|
||||
ror(xxx)
|
||||
|
||||
clear_carry()
|
||||
c64scr.print_ubbin(ubarray[1], false)
|
||||
c64.CHROUT('\n')
|
||||
lsr(ubarray[1])
|
||||
ror(ubarray[1])
|
||||
c64scr.print_ubbin(ubarray[1], false)
|
||||
c64.CHROUT('\n')
|
||||
lsr(ubarray[1])
|
||||
ror(ubarray[1])
|
||||
c64scr.print_ubbin(ubarray[1], false)
|
||||
c64.CHROUT('\n')
|
||||
lsr(ubarray[1])
|
||||
ror(ubarray[1])
|
||||
c64scr.print_ubbin(ubarray[1], false)
|
||||
c64.CHROUT('\n')
|
||||
lsr(ubarray[1])
|
||||
ror(ubarray[1])
|
||||
c64scr.print_ubbin(ubarray[1], false)
|
||||
c64.CHROUT('\n')
|
||||
lsr(ubarray[1])
|
||||
ror(ubarray[1])
|
||||
c64scr.print_ubbin(ubarray[1], false)
|
||||
c64.CHROUT('\n')
|
||||
lsr(ubarray[1])
|
||||
ror(ubarray[1])
|
||||
c64scr.print_ubbin(ubarray[1], false)
|
||||
c64.CHROUT('\n')
|
||||
c64.CHROUT('\n')
|
||||
|
||||
c64scr.print_ubbin(bbarray[1] as ubyte, false)
|
||||
c64scr.print_ubbin(ubarray[1], false)
|
||||
c64.CHROUT('\n')
|
||||
lsr(bbarray[1])
|
||||
c64scr.print_ubbin(bbarray[1] as ubyte, false)
|
||||
set_carry()
|
||||
ror(ubarray[1])
|
||||
c64scr.print_ubbin(ubarray[1], false)
|
||||
c64.CHROUT('\n')
|
||||
lsr(bbarray[1])
|
||||
c64scr.print_ubbin(bbarray[1] as ubyte, false)
|
||||
set_carry()
|
||||
ror(ubarray[1])
|
||||
c64scr.print_ubbin(ubarray[1], false)
|
||||
c64.CHROUT('\n')
|
||||
lsr(bbarray[1])
|
||||
c64scr.print_ubbin(bbarray[1] as ubyte, false)
|
||||
set_carry()
|
||||
ror(ubarray[1])
|
||||
c64scr.print_ubbin(ubarray[1], false)
|
||||
c64.CHROUT('\n')
|
||||
lsr(bbarray[1])
|
||||
c64scr.print_ubbin(bbarray[1] as ubyte, false)
|
||||
set_carry()
|
||||
ror(ubarray[1])
|
||||
c64scr.print_ubbin(ubarray[1], false)
|
||||
c64.CHROUT('\n')
|
||||
lsr(bbarray[1])
|
||||
c64scr.print_ubbin(bbarray[1] as ubyte, false)
|
||||
set_carry()
|
||||
ror(ubarray[1])
|
||||
c64scr.print_ubbin(ubarray[1], false)
|
||||
c64.CHROUT('\n')
|
||||
lsr(bbarray[1])
|
||||
c64scr.print_ubbin(bbarray[1] as ubyte, false)
|
||||
set_carry()
|
||||
ror(ubarray[1])
|
||||
c64scr.print_ubbin(ubarray[1], false)
|
||||
c64.CHROUT('\n')
|
||||
c64.CHROUT('\n')
|
||||
|
||||
; c64scr.print_ubbin(bbarray[1] as ubyte, false)
|
||||
; c64.CHROUT('\n')
|
||||
; ror(bbarray[1])
|
||||
; c64scr.print_ubbin(bbarray[1] as ubyte, false)
|
||||
; c64.CHROUT('\n')
|
||||
; ror(bbarray[1])
|
||||
; c64scr.print_ubbin(bbarray[1] as ubyte, false)
|
||||
; c64.CHROUT('\n')
|
||||
; ror(bbarray[1])
|
||||
; c64scr.print_ubbin(bbarray[1] as ubyte, false)
|
||||
; c64.CHROUT('\n')
|
||||
; ror(bbarray[1])
|
||||
; c64scr.print_ubbin(bbarray[1] as ubyte, false)
|
||||
; c64.CHROUT('\n')
|
||||
; ror(bbarray[1])
|
||||
; c64scr.print_ubbin(bbarray[1] as ubyte, false)
|
||||
; c64.CHROUT('\n')
|
||||
; ror(bbarray[1])
|
||||
; c64scr.print_ubbin(bbarray[1] as ubyte, false)
|
||||
; c64.CHROUT('\n')
|
||||
; c64.CHROUT('\n')
|
||||
|
||||
clear_carry()
|
||||
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')
|
||||
ror(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')
|
||||
ror(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')
|
||||
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')
|
||||
lsr(uwarray[1])
|
||||
set_carry()
|
||||
ror(uwarray[1])
|
||||
c64scr.print_uwbin(uwarray[1] as uword, false)
|
||||
c64.CHROUT('\n')
|
||||
lsr(uwarray[1])
|
||||
set_carry()
|
||||
ror(uwarray[1])
|
||||
c64scr.print_uwbin(uwarray[1] as uword, false)
|
||||
c64.CHROUT('\n')
|
||||
lsr(uwarray[1])
|
||||
set_carry()
|
||||
ror(uwarray[1])
|
||||
c64scr.print_uwbin(uwarray[1] as uword, false)
|
||||
c64.CHROUT('\n')
|
||||
lsr(uwarray[1])
|
||||
set_carry()
|
||||
ror(uwarray[1])
|
||||
c64scr.print_uwbin(uwarray[1] as uword, false)
|
||||
c64.CHROUT('\n')
|
||||
lsr(uwarray[1])
|
||||
set_carry()
|
||||
ror(uwarray[1])
|
||||
c64scr.print_uwbin(uwarray[1] as uword, false)
|
||||
c64.CHROUT('\n')
|
||||
lsr(uwarray[1])
|
||||
set_carry()
|
||||
ror(uwarray[1])
|
||||
c64scr.print_uwbin(uwarray[1] as uword, false)
|
||||
c64.CHROUT('\n')
|
||||
c64.CHROUT('\n')
|
||||
|
||||
c64scr.print_uwbin(wwarray[1] as uword, false)
|
||||
c64.CHROUT('\n')
|
||||
lsr(wwarray[1])
|
||||
c64scr.print_uwbin(wwarray[1] as uword, false)
|
||||
c64.CHROUT('\n')
|
||||
lsr(wwarray[1])
|
||||
c64scr.print_uwbin(wwarray[1] as uword, false)
|
||||
c64.CHROUT('\n')
|
||||
lsr(wwarray[1])
|
||||
c64scr.print_uwbin(wwarray[1] as uword, false)
|
||||
c64.CHROUT('\n')
|
||||
lsr(wwarray[1])
|
||||
c64scr.print_uwbin(wwarray[1] as uword, false)
|
||||
c64.CHROUT('\n')
|
||||
lsr(wwarray[1])
|
||||
c64scr.print_uwbin(wwarray[1] as uword, false)
|
||||
c64.CHROUT('\n')
|
||||
lsr(wwarray[1])
|
||||
c64scr.print_uwbin(wwarray[1] as uword, false)
|
||||
c64.CHROUT('\n')
|
||||
c64.CHROUT('\n')
|
||||
; c64scr.print_uwbin(wwarray[1] as uword, false)
|
||||
; c64.CHROUT('\n')
|
||||
; ror(wwarray[1])
|
||||
; c64scr.print_uwbin(wwarray[1] as uword, false)
|
||||
; c64.CHROUT('\n')
|
||||
; ror(wwarray[1])
|
||||
; c64scr.print_uwbin(wwarray[1] as uword, false)
|
||||
; c64.CHROUT('\n')
|
||||
; ror(wwarray[1])
|
||||
; c64scr.print_uwbin(wwarray[1] as uword, false)
|
||||
; c64.CHROUT('\n')
|
||||
; ror(wwarray[1])
|
||||
; c64scr.print_uwbin(wwarray[1] as uword, false)
|
||||
; c64.CHROUT('\n')
|
||||
; ror(wwarray[1])
|
||||
; c64scr.print_uwbin(wwarray[1] as uword, false)
|
||||
; c64.CHROUT('\n')
|
||||
; ror(wwarray[1])
|
||||
; c64scr.print_uwbin(wwarray[1] as uword, false)
|
||||
; c64.CHROUT('\n')
|
||||
; c64.CHROUT('\n')
|
||||
|
||||
; lsl(ubarray[1])
|
||||
; ror(ubarray[1])
|
||||
; rol(ubarray[1])
|
||||
; ror2(ubarray[1])
|
||||
; rol2(ubarray[1])
|
||||
; lsl(bbarray[1])
|
||||
;
|
||||
; lsl(uwarray[1])
|
||||
; ror(uwarray[1])
|
||||
; rol(uwarray[1])
|
||||
; ror2(uwarray[1])
|
||||
; rol2(uwarray[1])
|
||||
; lsr(wwarray[1])
|
||||
; lsl(wwarray[1])
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user