snake stub

This commit is contained in:
Mark Canlas 2022-12-07 10:33:29 -05:00
parent 3aa9f058aa
commit 248cafbdae
3 changed files with 15 additions and 0 deletions

0
data/snake-easy-6502.asm Normal file
View File

View File

@ -43,6 +43,9 @@ object PrintPrograms extends ZIOAppDefault:
),
"print-three-lower.asm" -> PrintThree.assemble(
AssemblerOptions(InstructionCase.Lowercase, DefinitionsMode.UseLiterals)
),
"snake-easy-6502.asm" -> SnakeEasy6502.assemble(
AssemblerOptions(InstructionCase.Uppercase, DefinitionsMode.UseDefinitions)
)
)

View File

@ -0,0 +1,12 @@
package com.htmlism.firepower.demo
import scala.util.chaining._
import com.htmlism.firepower.core._
object SnakeEasy6502:
def assemble(opts: AssemblerOptions): String =
(Nil)
.map(AsmBlock.toLines(opts.instructionCase))
.pipe(xs => AsmBlock.interFlatMap(xs)(List("", ""), identity))
.pipe(str.Line.mkString)