mirror of
https://github.com/mcanlas/6502-opcodes.git
synced 2024-12-22 09:30:45 +00:00
wrap with rts
This commit is contained in:
parent
72c3aa4292
commit
dc6d521c68
@ -14,6 +14,8 @@ trait AsmSyntax {
|
||||
|
||||
f(ctx)
|
||||
|
||||
ctx.push(RTS)
|
||||
|
||||
Subroutine(s, ctx.toFragment, ctx.getJumps)
|
||||
}
|
||||
|
||||
|
@ -67,9 +67,20 @@ class Easy6502Spec extends AnyFlatSpec with should.Matchers {
|
||||
}
|
||||
|
||||
"snake" should "compile" in {
|
||||
val initSnake =
|
||||
sub("initSnake") { implicit a =>
|
||||
registers.X.incr
|
||||
}
|
||||
|
||||
val generateApplePosition =
|
||||
sub("generateApplePosition") { implicit a =>
|
||||
registers.X.incr
|
||||
}
|
||||
|
||||
val init =
|
||||
sub("init") { implicit a =>
|
||||
registers.X.incr
|
||||
jump(initSnake)
|
||||
jump(generateApplePosition)
|
||||
}
|
||||
|
||||
val readKeys =
|
||||
|
Loading…
Reference in New Issue
Block a user