mirror of
https://github.com/ethauvin/chip-8.git
synced 2025-04-25 08:47:12 -07:00
Comment
This commit is contained in:
parent
f9a3c4a89a
commit
a484b0ee8a
1 changed files with 4 additions and 2 deletions
|
@ -3,8 +3,10 @@ package com.beust.chip8
|
|||
import kotlin.random.Random
|
||||
|
||||
/**
|
||||
* An Op is made of two bytes which is sliced into four nibbles. These nibbles are then used
|
||||
* to determine the op and its data.
|
||||
* An Op is made of two bytes which are sliced into four nibbles. These nibbles are then used
|
||||
* to determine the op and its data. Bytes get sliced differently depending on the opcode. The base
|
||||
* class offers some convenience functions to access these nibbles but makes them lazy since ops
|
||||
* will need different ones and we don't want to do unnecessary work.
|
||||
*/
|
||||
sealed class Op(val computer: Computer, val nib: Nibbles) {
|
||||
protected val nnn by lazy { nib.val3(nib.b1, nib.b2, nib.b3) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue