mirror of
https://github.com/mcanlas/6502-opcodes.git
synced 2024-07-01 03:29:32 +00:00
normalize type names
This commit is contained in:
parent
c34e945fe9
commit
80bdbddc24
|
@ -1,23 +1,23 @@
|
||||||
package com.htmlism.scratchpad
|
package com.htmlism.scratchpad
|
||||||
|
|
||||||
package object syntax:
|
package object syntax:
|
||||||
implicit class WriteRegisterOps[A](reg: WriteAddress[A]):
|
implicit class WriteRegisterOps[Addr](reg: WriteAddress[Addr]):
|
||||||
def write[B: Loadable](x: B): syntax.PartiallyAppliedWrite[B, A] =
|
def write[A: Loadable](x: A): syntax.PartiallyAppliedWrite[A, Addr] =
|
||||||
new syntax.PartiallyAppliedWrite(reg, x)
|
new syntax.PartiallyAppliedWrite(reg, x)
|
||||||
|
|
||||||
class PartiallyAppliedWrite[A: Loadable, B](reg: WriteAddress[B], x: A):
|
class PartiallyAppliedWrite[Addr: Loadable, A](reg: WriteAddress[A], x: Addr):
|
||||||
def apply[C: Load: Store: Register]: String =
|
def apply[R: Load: Store: Register]: String =
|
||||||
val literal =
|
val literal =
|
||||||
summon[Loadable[A]].show(x)
|
summon[Loadable[Addr]].show(x)
|
||||||
|
|
||||||
val register =
|
val register =
|
||||||
summon[Register[C]].self
|
summon[Register[R]].self
|
||||||
|
|
||||||
val loadInstruction =
|
val loadInstruction =
|
||||||
Load[C].instruction // TODO load action needs to interact with encoder
|
Load[R].instruction // TODO load action needs to interact with encoder
|
||||||
|
|
||||||
val storeInstruction =
|
val storeInstruction =
|
||||||
Store[C].to // TODO store action needs to interact with encoder
|
Store[R].to // TODO store action needs to interact with encoder
|
||||||
|
|
||||||
val first =
|
val first =
|
||||||
s"$loadInstruction $literal"
|
s"$loadInstruction $literal"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user