mirror of
https://github.com/irmen/prog8.git
synced 2025-02-19 11:31:07 +00:00
remove superfluous value eval
This commit is contained in:
parent
ec665e0cc1
commit
4dee8b6048
@ -1244,23 +1244,19 @@ internal class AugmentableAssignmentAsmGen(private val program: Program,
|
|||||||
remainderWord()
|
remainderWord()
|
||||||
}
|
}
|
||||||
"<<" -> {
|
"<<" -> {
|
||||||
asmgen.translateExpression(value) // TODO huh is this okay? wasn't this done above already? ****************************************
|
|
||||||
asmgen.out("""
|
asmgen.out("""
|
||||||
inx
|
ldy P8ESTACK_LO+1,x
|
||||||
ldy P8ESTACK_LO,x
|
beq +
|
||||||
beq +
|
- asl $name
|
||||||
- asl $name
|
rol $name+1
|
||||||
rol $name+1
|
dey
|
||||||
dey
|
bne -
|
||||||
bne -
|
|
||||||
+""")
|
+""")
|
||||||
}
|
}
|
||||||
">>" -> {
|
">>" -> {
|
||||||
asmgen.translateExpression(value) // TODO huh is this okay? wasn't this done above already? *******************************************
|
|
||||||
if(dt==DataType.UWORD) {
|
if(dt==DataType.UWORD) {
|
||||||
asmgen.out("""
|
asmgen.out("""
|
||||||
inx
|
ldy P8ESTACK_LO+1,x
|
||||||
ldy P8ESTACK_LO,x
|
|
||||||
beq +
|
beq +
|
||||||
- lsr $name+1
|
- lsr $name+1
|
||||||
ror $name
|
ror $name
|
||||||
@ -1269,8 +1265,7 @@ internal class AugmentableAssignmentAsmGen(private val program: Program,
|
|||||||
+""") }
|
+""") }
|
||||||
else {
|
else {
|
||||||
asmgen.out("""
|
asmgen.out("""
|
||||||
inx
|
ldy P8ESTACK_LO+1,x
|
||||||
ldy P8ESTACK_LO,x
|
|
||||||
beq +
|
beq +
|
||||||
- lda $name+1
|
- lda $name+1
|
||||||
asl a
|
asl a
|
||||||
|
@ -11,66 +11,56 @@ main {
|
|||||||
uword uw
|
uword uw
|
||||||
ubyte ub
|
ubyte ub
|
||||||
byte bb
|
byte bb
|
||||||
|
ub = 5
|
||||||
|
|
||||||
uw = 21111
|
uw = 21111
|
||||||
uw >>= 6
|
uw <<= ub+1
|
||||||
txt.print_uwbin(uw as uword, true)
|
txt.print_uwbin(uw as uword, true)
|
||||||
txt.chrout('\n')
|
txt.chrout('\n')
|
||||||
uw = 21111
|
uw = 21111
|
||||||
uw >>= 7
|
uw <<= ub+2
|
||||||
txt.print_uwbin(uw as uword, true)
|
txt.print_uwbin(uw as uword, true)
|
||||||
txt.chrout('\n')
|
txt.chrout('\n')
|
||||||
uw = 21111
|
uw = 21111
|
||||||
uw >>= 8 ; TODO fix this shift!
|
uw <<= ub+3
|
||||||
txt.print_uwbin(uw as uword, true)
|
txt.print_uwbin(uw as uword, true)
|
||||||
txt.chrout('\n')
|
txt.chrout('\n')
|
||||||
uw = 21111
|
uw = 21111
|
||||||
uw >>= 9 ; TODO fix this shift!
|
uw <<= ub+4
|
||||||
txt.print_uwbin(uw as uword, true)
|
txt.print_uwbin(uw as uword, true)
|
||||||
txt.chrout('\n')
|
txt.chrout('\n')
|
||||||
uw = 21111
|
uw = 21111
|
||||||
uw >>= 10 ; TODO fix this shift!
|
uw <<= ub+5
|
||||||
txt.print_uwbin(uw as uword, true)
|
txt.print_uwbin(uw as uword, true)
|
||||||
txt.chrout('\n')
|
txt.chrout('\n')
|
||||||
uw = 21111
|
uw = 21111
|
||||||
uw >>= 11 ; TODO fix this shift!
|
uw <<= ub+6
|
||||||
txt.print_uwbin(uw as uword, true)
|
txt.print_uwbin(uw as uword, true)
|
||||||
txt.chrout('\n')
|
txt.chrout('\n')
|
||||||
uw = 21111
|
uw = 21111
|
||||||
uw >>= 12 ; TODO fix this shift!
|
uw <<= ub+7
|
||||||
txt.print_uwbin(uw as uword, true)
|
txt.print_uwbin(uw as uword, true)
|
||||||
txt.chrout('\n')
|
txt.chrout('\n')
|
||||||
uw = 21111
|
uw = 21111
|
||||||
uw >>= 13 ; TODO fix this shift!
|
uw <<= ub+8
|
||||||
txt.print_uwbin(uw as uword, true)
|
txt.print_uwbin(uw as uword, true)
|
||||||
txt.chrout('\n')
|
txt.chrout('\n')
|
||||||
uw = 21111
|
uw = 21111
|
||||||
uw >>= 14 ; TODO fix this shift!
|
uw <<= ub+9
|
||||||
txt.print_uwbin(uw as uword, true)
|
txt.print_uwbin(uw as uword, true)
|
||||||
txt.chrout('\n')
|
txt.chrout('\n')
|
||||||
uw = 21111
|
uw = 21111
|
||||||
uw >>= 15 ; TODO fix this shift!
|
uw <<= ub+10
|
||||||
txt.print_uwbin(uw as uword, true)
|
txt.print_uwbin(uw as uword, true)
|
||||||
txt.chrout('\n')
|
txt.chrout('\n')
|
||||||
uw = 21111
|
uw = 21111
|
||||||
uw >>= 16 ; TODO fix this shift!
|
uw <<= ub+11
|
||||||
txt.print_uwbin(uw as uword, true)
|
txt.print_uwbin(uw as uword, true)
|
||||||
txt.chrout('\n')
|
txt.chrout('\n')
|
||||||
uw = 21111
|
uw = 21111
|
||||||
uw >>= 17 ; TODO fix this shift!
|
uw <<= ub+12
|
||||||
txt.print_uwbin(uw as uword, true)
|
txt.print_uwbin(uw as uword, true)
|
||||||
txt.chrout('\n')
|
txt.chrout('\n')
|
||||||
; ub >>= 7
|
|
||||||
; ub <<= 7
|
|
||||||
;
|
|
||||||
; uu >>=7
|
|
||||||
; uu <<= 7
|
|
||||||
;
|
|
||||||
; zz >>=7
|
|
||||||
; zz <<=7
|
|
||||||
;
|
|
||||||
; bb >>=7
|
|
||||||
; bb <<=7
|
|
||||||
|
|
||||||
testX()
|
testX()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user