aboutsummaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/cpu/cpu.ts5
-rw-r--r--src/cpu/instruction.ts8
2 files changed, 8 insertions, 5 deletions
diff --git a/src/cpu/cpu.ts b/src/cpu/cpu.ts
index d26ef8f..cd9e3e4 100644
--- a/src/cpu/cpu.ts
+++ b/src/cpu/cpu.ts
@@ -80,7 +80,10 @@ export class CPU {
nextInterrupt: i16 = -1;
maxInterrupt: i16 = 0;
- constructor(public progMem: Uint16Array, private sramBytes = 8192) {
+ constructor(
+ public progMem: Uint16Array,
+ private sramBytes = 8192,
+ ) {
this.reset();
}
diff --git a/src/cpu/instruction.ts b/src/cpu/instruction.ts
index e2bed5d..d29bfb8 100644
--- a/src/cpu/instruction.ts
+++ b/src/cpu/instruction.ts
@@ -393,7 +393,7 @@ export function avrInstruction(cpu: CPU) {
cpu.cycles++;
cpu.data[(opcode & 0x1f0) >> 4] = cpu.readData(
cpu.dataView.getUint16(28, true) +
- ((opcode & 7) | ((opcode & 0xc00) >> 7) | ((opcode & 0x2000) >> 8))
+ ((opcode & 7) | ((opcode & 0xc00) >> 7) | ((opcode & 0x2000) >> 8)),
);
} else if ((opcode & 0xfe0f) === 0x8000) {
/* LDZ, 1000 000d dddd 0000 */
@@ -419,7 +419,7 @@ export function avrInstruction(cpu: CPU) {
cpu.cycles++;
cpu.data[(opcode & 0x1f0) >> 4] = cpu.readData(
cpu.dataView.getUint16(30, true) +
- ((opcode & 7) | ((opcode & 0xc00) >> 7) | ((opcode & 0x2000) >> 8))
+ ((opcode & 7) | ((opcode & 0xc00) >> 7) | ((opcode & 0x2000) >> 8)),
);
} else if (opcode === 0x95c8) {
/* LPM, 1001 0101 1100 1000 */
@@ -716,7 +716,7 @@ export function avrInstruction(cpu: CPU) {
cpu.writeData(
cpu.dataView.getUint16(28, true) +
((opcode & 7) | ((opcode & 0xc00) >> 7) | ((opcode & 0x2000) >> 8)),
- cpu.data[(opcode & 0x1f0) >> 4]
+ cpu.data[(opcode & 0x1f0) >> 4],
);
cpu.cycles++;
} else if ((opcode & 0xfe0f) === 0x8200) {
@@ -744,7 +744,7 @@ export function avrInstruction(cpu: CPU) {
cpu.writeData(
cpu.dataView.getUint16(30, true) +
((opcode & 7) | ((opcode & 0xc00) >> 7) | ((opcode & 0x2000) >> 8)),
- cpu.data[(opcode & 0x1f0) >> 4]
+ cpu.data[(opcode & 0x1f0) >> 4],
);
cpu.cycles++;
} else if ((opcode & 0xfc00) === 0x1800) {