mirror of
https://github.com/mcanlas/6502-opcodes.git
synced 2024-12-30 14:29:48 +00:00
add print three demo
This commit is contained in:
parent
caf9517aa0
commit
f491f13215
8
data/print-three.asm
Normal file
8
data/print-three.asm
Normal file
@ -0,0 +1,8 @@
|
||||
LDA #$01
|
||||
STA $0200
|
||||
|
||||
LDA #$05
|
||||
STA $0201
|
||||
|
||||
LDA #$08
|
||||
STA $0202
|
@ -28,7 +28,8 @@ object PrintPrograms extends ZIOAppDefault:
|
||||
)
|
||||
.pipe(xxs => AsmBlock.interFlatMap(xxs)(List("", ""), identity))
|
||||
.pipe(Line.mkString),
|
||||
"annotated-snake.asm" -> AnnotatedSnake.program
|
||||
"annotated-snake.asm" -> AnnotatedSnake.program,
|
||||
"print-three.asm" -> PrintThree.program
|
||||
)
|
||||
|
||||
def run: Task[Unit] =
|
||||
|
@ -0,0 +1,41 @@
|
||||
package com.htmlism.firepower.demo
|
||||
|
||||
import scala.util.chaining._
|
||||
|
||||
import cats.syntax.all._
|
||||
|
||||
import com.htmlism.firepower.core.AsmBlock._
|
||||
import com.htmlism.firepower.core._
|
||||
|
||||
object PrintThree:
|
||||
val program: String =
|
||||
List(
|
||||
AnonymousCodeBlock(
|
||||
List(
|
||||
AsmBlock.Intent(
|
||||
None,
|
||||
List(
|
||||
AsmBlock.Intent.Instruction("LDA #$01", None),
|
||||
AsmBlock.Intent.Instruction("STA $0200", None)
|
||||
)
|
||||
),
|
||||
AsmBlock.Intent(
|
||||
None,
|
||||
List(
|
||||
AsmBlock.Intent.Instruction("LDA #$05", None),
|
||||
AsmBlock.Intent.Instruction("STA $0201", None)
|
||||
)
|
||||
),
|
||||
AsmBlock.Intent(
|
||||
None,
|
||||
List(
|
||||
AsmBlock.Intent.Instruction("LDA #$08", None),
|
||||
AsmBlock.Intent.Instruction("STA $0202", None)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
.map(AsmBlock.toLines)
|
||||
.pipe(xs => AsmBlock.interFlatMap(xs)(List("", ""), identity))
|
||||
.pipe(str.Line.mkString)
|
Loading…
Reference in New Issue
Block a user