6502-opcodes/firepower-core/src/main/scala/com/htmlism/firepower/core/Move.scala

17 lines
540 B
Scala
Raw Normal View History

2022-12-04 23:36:11 +00:00
package com.htmlism.firepower.core
2022-11-20 03:29:10 +00:00
// https://mads.atari8.info/mads_eng.html#_mv
object Move:
def constA[A, X: Encoded.Byte](x: X, dest: WriteLease.ByteAddress[A]): Asm2[Reg.A, A] =
2022-11-20 04:04:27 +00:00
Load
.constA(x)
2024-01-01 00:02:40 +00:00
.widenWith[A]
.andThen(Store.fromA(dest))
2022-11-20 03:29:10 +00:00
2022-11-20 06:17:07 +00:00
def from[R: Register, A: ReadLease.ByteAddress, B: WriteLease.ByteAddress]: Asm3[R, A, B] =
2022-11-20 03:29:10 +00:00
Asm3Instructions(List(""))
object Word:
def const[R: Register, A, X: Encoded.Word](x: X, dest: WriteLease.ByteAddress[A]): Asm2[R, A] =
2022-11-20 03:29:10 +00:00
Asm2Instructions(List(""))