mirror of
https://github.com/mcanlas/6502-opcodes.git
synced 2024-11-18 01:06:11 +00:00
simplify call
This commit is contained in:
parent
e5a2830be6
commit
628e160931
@ -222,11 +222,11 @@ object MatchOpcodes {
|
||||
val BitPattern = ThreeBits >> ThreeBits >> TwoBits
|
||||
|
||||
n match {
|
||||
case BitPattern(aaabbb, cc) =>
|
||||
case BitPattern((aaa, bbb), cc) =>
|
||||
cc match {
|
||||
case 0 => (c00 _).tupled(aaabbb).some
|
||||
case 1 => (c01 _).tupled(aaabbb).some
|
||||
case 2 => (c10 _).tupled(aaabbb).some
|
||||
case 0 => c00(aaa, bbb).some
|
||||
case 1 => c01(aaa, bbb).some
|
||||
case 2 => c10(aaa, bbb).some
|
||||
case 3 => None
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user