From 9d78385cbabcc6fe08045cc79699e205aabb59ed Mon Sep 17 00:00:00 2001 From: Karol Stasiak Date: Sat, 3 Aug 2019 20:31:27 +0200 Subject: [PATCH] 6502: Fix byte shifting --- src/main/scala/millfork/compiler/mos/BuiltIns.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/scala/millfork/compiler/mos/BuiltIns.scala b/src/main/scala/millfork/compiler/mos/BuiltIns.scala index c613c99f..2f7569a3 100644 --- a/src/main/scala/millfork/compiler/mos/BuiltIns.scala +++ b/src/main/scala/millfork/compiler/mos/BuiltIns.scala @@ -260,6 +260,7 @@ object BuiltIns { val labelSkip = ctx.nextLabel("ss") val labelRepeat = ctx.nextLabel("sr") val loop = List( + AssemblyLine.immediate(CPX, 0), AssemblyLine.relative(BEQ, labelSkip), AssemblyLine.label(labelRepeat), AssemblyLine.implied(opcode),