From a484b0ee8a0fc65e7e596b2c42abbc30784b70df Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Sun, 23 Aug 2020 14:54:01 -0700 Subject: [PATCH] Comment --- src/main/kotlin/com/beust/chip8/Ops.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/com/beust/chip8/Ops.kt b/src/main/kotlin/com/beust/chip8/Ops.kt index 583f2f4..d0391ed 100644 --- a/src/main/kotlin/com/beust/chip8/Ops.kt +++ b/src/main/kotlin/com/beust/chip8/Ops.kt @@ -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) }