This commit is contained in:
Mark Canlas 2020-08-14 15:33:50 -04:00
parent 1ab7a03704
commit 174e6936cf
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,6 @@
package com.htmlism.mos6502.dsl
case class IndexedAddressCollection(baseAddress: Int) {
def apply(n: Int): GlobalAddress =
GlobalAddress(baseAddress + n)
}

View File

@ -0,0 +1,12 @@
package com.htmlism.mos6502
package object dsl {
def hex(n: Int): String =
String.format("$%02x", n)
def hex(n: ZeroAddress): String =
String.format("$%02x", n.n)
def hex(n: GlobalAddress): String =
String.format("$%04x", n.n)
}