mirror of
https://github.com/KarolS/millfork.git
synced 2025-01-26 20:33:02 +00:00
8080: support raw bytes in assembly statements
This commit is contained in:
parent
0f52efbe20
commit
b4a6c261de
@ -169,6 +169,15 @@ object Z80StatementCompiler extends AbstractStatementCompiler[ZLine] {
|
||||
}
|
||||
case ExpressionStatement(e) =>
|
||||
Z80ExpressionCompiler.compile(ctx, e, ZExpressionTarget.NOTHING) -> Nil
|
||||
case RawBytesStatement(contents) =>
|
||||
env.extractArrayContents(contents).map { expr =>
|
||||
env.eval(expr) match {
|
||||
case Some(c) => ZLine(BYTE, NoRegisters, c, elidability = Elidability.Fixed)
|
||||
case None =>
|
||||
ctx.log.error("Non-constant raw byte", position = statement.position)
|
||||
ZLine(BYTE, NoRegisters, Constant.Zero, elidability = Elidability.Fixed)
|
||||
}
|
||||
} -> Nil
|
||||
case Z80AssemblyStatement(op, reg, offset, expression, elidability) =>
|
||||
val param: Constant = expression match {
|
||||
// TODO: hmmm
|
||||
|
Loading…
x
Reference in New Issue
Block a user