1
0
mirror of https://github.com/KarolS/millfork.git synced 2024-05-31 18:41:30 +00:00

8080: Correctly compile sbytes to BC

This commit is contained in:
Karol Stasiak 2021-02-18 00:35:02 +01:00
parent 958c1c09e7
commit fb71f88343

View File

@ -1509,9 +1509,9 @@ object Z80ExpressionCompiler extends AbstractExpressionCompiler[ZLine] {
}
case ZExpressionTarget.BC =>
if (signExtend) {
List(ldAbs8(A, sourceAddr, elidability), ld8(L, A)) ++
List(ldAbs8(A, sourceAddr, elidability), ld8(C, A)) ++
signExtendHighestByte(ctx, A, signExtend) ++
List(ld8(H, A))
List(ld8(B, A))
} else {
List(ldAbs8(A, sourceAddr, elidability), ld8(C, A), ldImm8(B, 0))
}