2020-08-28 06:50:34 +00:00
|
|
|
package com.htmlism.nescant
|
|
|
|
|
|
|
|
/**
|
2021-09-06 08:16:08 +00:00
|
|
|
* @param name
|
|
|
|
* A name for this location, used to alias its address
|
2020-08-28 06:50:34 +00:00
|
|
|
*
|
2021-09-06 08:16:08 +00:00
|
|
|
* @tparam A
|
|
|
|
* The input type of the write and the output type of the read
|
2020-08-28 06:50:34 +00:00
|
|
|
*/
|
|
|
|
case class ReadWriteLocation[A](name: String, address: ZeroPageAddress)
|
|
|
|
|
2022-02-14 23:11:45 +00:00
|
|
|
object ReadWriteLocation:
|
2023-06-19 09:33:38 +00:00
|
|
|
given sourceForReadWriteLocation[A]: ByteSource[ReadWriteLocation[A]] =
|
2020-08-28 16:31:13 +00:00
|
|
|
new ByteSource[ReadWriteLocation[A]] {}
|
2020-08-28 06:50:34 +00:00
|
|
|
|
2023-06-19 09:33:38 +00:00
|
|
|
given sinkForReadWriteLocation[A]: ByteSink[ReadWriteLocation[A]] =
|
2020-08-28 16:31:13 +00:00
|
|
|
new ByteSink[ReadWriteLocation[A]] {}
|
2020-08-28 06:50:34 +00:00
|
|
|
|
2023-06-19 09:33:38 +00:00
|
|
|
given operandForReadWriteLocation[A]: Operand[ReadWriteLocation[A]] =
|
2022-09-07 15:21:22 +00:00
|
|
|
new Operand[ReadWriteLocation[A]]:
|
2020-08-28 06:50:34 +00:00
|
|
|
def encode(x: ReadWriteLocation[A]): String = ""
|