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:
|
2022-11-20 06:59:32 +00:00
|
|
|
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
|
2022-11-20 06:59:32 +00:00
|
|
|
.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:
|
2022-11-20 06:59:32 +00:00
|
|
|
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(""))
|