mirror of
https://github.com/mcanlas/6502-opcodes.git
synced 2025-01-17 21:32:23 +00:00
load int maybe?
This commit is contained in:
parent
e7432eb5aa
commit
4acceeb146
@ -1,8 +1,9 @@
|
||||
package com.htmlism.scratchpad
|
||||
|
||||
trait Load[A]:
|
||||
// TODO genericize to take in encoder
|
||||
// from constant
|
||||
def init: String
|
||||
def loadInt: String
|
||||
|
||||
// from register
|
||||
def from: String
|
||||
|
@ -15,7 +15,7 @@ object Register:
|
||||
|
||||
object A:
|
||||
given loadA: Load[A] with
|
||||
def init: String =
|
||||
def loadInt: String =
|
||||
"LDA"
|
||||
|
||||
def from: String =
|
||||
@ -29,7 +29,7 @@ object Register:
|
||||
|
||||
object X:
|
||||
given loadX: Load[X] with
|
||||
def init: String =
|
||||
def loadInt: String =
|
||||
"LDX"
|
||||
|
||||
def from: String =
|
||||
@ -43,7 +43,7 @@ object Register:
|
||||
|
||||
object Y:
|
||||
given loadY: Load[Y] with
|
||||
def init: String =
|
||||
def loadInt: String =
|
||||
"LDY"
|
||||
|
||||
def from: String =
|
||||
|
@ -14,7 +14,7 @@ package object syntax:
|
||||
summon[Register[C]].self
|
||||
|
||||
val loadInstruction =
|
||||
Load[C].init // TODO load action needs to interact with encoder
|
||||
Load[C].loadInt // TODO load action needs to interact with encoder
|
||||
|
||||
val storeInstruction =
|
||||
Store[C].to // TODO store action needs to interact with encoder
|
||||
|
Loading…
x
Reference in New Issue
Block a user