mirror of
https://github.com/mcanlas/6502-opcodes.git
synced 2025-01-17 21:32:23 +00:00
back to ops
This commit is contained in:
parent
3cf51dd95f
commit
c34e945fe9
@ -11,9 +11,7 @@ class AbsoluteAddress(val n: Int, val alias: String) extends Address
|
|||||||
|
|
||||||
sealed trait ReadAddress[A] extends Address
|
sealed trait ReadAddress[A] extends Address
|
||||||
|
|
||||||
sealed trait WriteAddress[A] extends Address:
|
sealed trait WriteAddress[A] extends Address
|
||||||
def write[B: Loadable](x: B): syntax.PartiallyAppliedWrite[B, A] =
|
|
||||||
new syntax.PartiallyAppliedWrite(this, x)
|
|
||||||
|
|
||||||
trait Volatile[A] extends ReadAddress[A]
|
trait Volatile[A] extends ReadAddress[A]
|
||||||
|
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
package com.htmlism.scratchpad
|
package com.htmlism.scratchpad
|
||||||
|
|
||||||
package object syntax:
|
package object syntax:
|
||||||
|
implicit class WriteRegisterOps[A](reg: WriteAddress[A]):
|
||||||
|
def write[B: Loadable](x: B): syntax.PartiallyAppliedWrite[B, A] =
|
||||||
|
new syntax.PartiallyAppliedWrite(reg, x)
|
||||||
|
|
||||||
class PartiallyAppliedWrite[A: Loadable, B](reg: WriteAddress[B], x: A):
|
class PartiallyAppliedWrite[A: Loadable, B](reg: WriteAddress[B], x: A):
|
||||||
def apply[C: Load: Store: Register]: String =
|
def apply[C: Load: Store: Register]: String =
|
||||||
val literal =
|
val literal =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user