mirror of
https://github.com/mcanlas/6502-opcodes.git
synced 2024-10-31 21:07:39 +00:00
120 supremacy
This commit is contained in:
parent
de26422fa5
commit
9e6ad8012e
@ -3,6 +3,8 @@ align.tokens = [
|
||||
{code = "%%", owner = "Term.ApplyInfix"}
|
||||
]
|
||||
|
||||
maxColumn = 120
|
||||
|
||||
align.openParenCallSite = false
|
||||
|
||||
align = more
|
@ -146,9 +146,7 @@ object MatchOpcodes {
|
||||
quartile(out, 3, lookup)
|
||||
}
|
||||
|
||||
def quartile(out: PrintWriter,
|
||||
n: Int,
|
||||
lookup: Map[Int, (Instruction, AddressingMode)]) = {
|
||||
def quartile(out: PrintWriter, n: Int, lookup: Map[Int, (Instruction, AddressingMode)]) = {
|
||||
out.print(s"<h2>${paddedBinary(n, 2)}</h2>")
|
||||
|
||||
out.print("<table>")
|
||||
@ -234,14 +232,7 @@ object MatchOpcodes {
|
||||
Seq(ORA, AND, EOR, ADC, STA, LDA, CMP, SBC)(aaa)
|
||||
|
||||
val addressingMode =
|
||||
Seq(IndirectX,
|
||||
ZeroPage,
|
||||
Immediate,
|
||||
Absolute,
|
||||
IndirectY,
|
||||
ZeroPageX,
|
||||
AbsoluteY,
|
||||
AbsoluteX)(bbb)
|
||||
Seq(IndirectX, ZeroPage, Immediate, Absolute, IndirectY, ZeroPageX, AbsoluteY, AbsoluteX)(bbb)
|
||||
|
||||
Some(instruction -> addressingMode)
|
||||
}
|
||||
@ -251,14 +242,7 @@ object MatchOpcodes {
|
||||
Seq(ASL, ROL, LSR, ROR, STX, LDX, DEC, INC)(aaa)
|
||||
|
||||
val addressingMode =
|
||||
Seq(Immediate,
|
||||
ZeroPage,
|
||||
Accumulator,
|
||||
Absolute,
|
||||
NoMode,
|
||||
ZeroPageX,
|
||||
NoMode,
|
||||
AbsoluteX)(bbb)
|
||||
Seq(Immediate, ZeroPage, Accumulator, Absolute, NoMode, ZeroPageX, NoMode, AbsoluteX)(bbb)
|
||||
|
||||
Some(instruction -> addressingMode)
|
||||
}
|
||||
@ -268,14 +252,7 @@ object MatchOpcodes {
|
||||
Seq(NoInstruction, BIT, JMP, JMP, STY, LDY, CPY, CPX)(aaa)
|
||||
|
||||
val addressingMode =
|
||||
Seq(Immediate,
|
||||
ZeroPage,
|
||||
NoMode,
|
||||
Absolute,
|
||||
NoMode,
|
||||
ZeroPageX,
|
||||
NoMode,
|
||||
AbsoluteX)(bbb)
|
||||
Seq(Immediate, ZeroPage, NoMode, Absolute, NoMode, ZeroPageX, NoMode, AbsoluteX)(bbb)
|
||||
|
||||
Some(instruction -> addressingMode)
|
||||
}
|
||||
|
@ -28,8 +28,7 @@ object AtomExtractor {
|
||||
pow(ex - 1, acc * 2)
|
||||
}
|
||||
|
||||
abstract class PrimitiveBitExtractor(val length: Int)
|
||||
extends BitExtractor[Int] {
|
||||
abstract class PrimitiveBitExtractor(val length: Int) extends BitExtractor[Int] {
|
||||
private lazy val mask = AtomExtractor.pow(length) - 1
|
||||
|
||||
def unapply(n: Int): Option[Int] = Some(n & mask)
|
||||
|
Loading…
Reference in New Issue
Block a user