mirror of
https://github.com/mcanlas/6502-opcodes.git
synced 2024-06-16 08:29:33 +00:00
Compare commits
5 Commits
861824be39
...
860a788b87
Author | SHA1 | Date | |
---|---|---|---|
|
860a788b87 | ||
|
355668b757 | ||
|
fba3e7e44b | ||
|
ee87a131ea | ||
|
e8e7ab1413 |
|
@ -5,7 +5,8 @@ object Move:
|
|||
def constA[A, X: Encoded.Byte](x: X, dest: WriteLease.ByteAddress[A]): Asm2[Reg.A, A] =
|
||||
Load
|
||||
.constA(x)
|
||||
.widenWith[A] andThen Store.fromA(dest)
|
||||
.widenWith[A]
|
||||
.andThen(Store.fromA(dest))
|
||||
|
||||
def from[R: Register, A: ReadLease.ByteAddress, B: WriteLease.ByteAddress]: Asm3[R, A, B] =
|
||||
Asm3Instructions(List(""))
|
||||
|
|
|
@ -2,7 +2,7 @@ package com.htmlism.firepower.core
|
|||
|
||||
import weaver.*
|
||||
object ComplicatedResourceSuite extends FunSuite:
|
||||
class Player[A <: Player[_]](address: Int):
|
||||
class Player[A <: Player[?]](address: Int):
|
||||
def headAddr: Int =
|
||||
address
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ object Scala3Plugin extends AutoPlugin {
|
|||
override def trigger: PluginTrigger = AllRequirements
|
||||
|
||||
override val buildSettings: Seq[Setting[?]] = Seq(
|
||||
scalaVersion := "3.3.1"
|
||||
scalaVersion := "3.4.0-RC1"
|
||||
)
|
||||
|
||||
override val projectSettings: Seq[Setting[?]] = Seq(
|
||||
|
|
|
@ -42,7 +42,7 @@ case class Subroutine(name: String, fragment: AsmFragment, jumpRegistry: ListSet
|
|||
def toAsm: String =
|
||||
name + ":" + "\n" + fragment.toAsm
|
||||
|
||||
case class DefinitionGroup(comment: String, xs: List[Definition[_]]) extends TopLevelAsmDocumentFragment:
|
||||
case class DefinitionGroup(comment: String, xs: List[Definition[?]]) extends TopLevelAsmDocumentFragment:
|
||||
def toAsm: String =
|
||||
val groupCommentLine =
|
||||
"; " + comment
|
||||
|
@ -62,7 +62,7 @@ case class DefinitionGroup(comment: String, xs: List[Definition[_]]) extends Top
|
|||
.mkString("\n")
|
||||
|
||||
class DefinitionGroupContext:
|
||||
private val xs: ListBuffer[Definition[_]] =
|
||||
private val xs: ListBuffer[Definition[?]] =
|
||||
ListBuffer()
|
||||
|
||||
def push[A](x: A)(using ev: NamedResource[A]): Unit =
|
||||
|
@ -85,7 +85,7 @@ case class Definition[A](name: String, x: A, comment: Option[String])(using ev:
|
|||
object Definition:
|
||||
given namedResourceForDefinition[A]: NamedResource[Definition[A]] =
|
||||
new NamedResource[Definition[A]]:
|
||||
def toDefinitions(x: Definition[A]): List[Definition[_]] =
|
||||
def toDefinitions(x: Definition[A]): List[Definition[?]] =
|
||||
List(x)
|
||||
|
||||
def apply[A: DefinitionValue](name: String, x: A): Definition[A] =
|
||||
|
|
|
@ -6,4 +6,4 @@ trait NamedResource[A]:
|
|||
* A `Definable` can emit multiple definitions. Usually in the case of `word`s being split across two
|
||||
* byte-definitions
|
||||
*/
|
||||
def toDefinitions(x: A): List[Definition[_]]
|
||||
def toDefinitions(x: A): List[Definition[?]]
|
||||
|
|
|
@ -54,7 +54,7 @@ class Easy6502Spec extends AnyFlatSpec with should.Matchers:
|
|||
val doc =
|
||||
asmDoc { implicit ctx =>
|
||||
asm { implicit a =>
|
||||
registers.X.loop("incrementing", 2 upTo 5) { implicit a =>
|
||||
registers.X.loop("incrementing", 2.upTo(5)) { implicit a =>
|
||||
a.push(INY)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user