mirror of
https://github.com/irmen/prog8.git
synced 2025-01-24 21:33:45 +00:00
fix invalid repeat loop when iterations is already in register Y
This commit is contained in:
parent
4a710ecdfc
commit
aa2437cfb8
@ -882,8 +882,8 @@ $repeatLabel""")
|
||||
}
|
||||
|
||||
private fun repeatCountInY(stmt: PtRepeatLoop, endLabel: String) {
|
||||
// note: Y must just have been loaded with the (variable) number of loops to be performed!
|
||||
val repeatLabel = makeLabel("repeat")
|
||||
out(" cpy #0")
|
||||
if(isTargetCpu(CpuType.CPU65c02)) {
|
||||
val counterVar = createRepeatCounterVar(DataType.UBYTE, true, stmt)
|
||||
out(" beq $endLabel | sty $counterVar")
|
||||
|
Loading…
x
Reference in New Issue
Block a user