aboutsummaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
authorUri Shaked2025-02-11 10:31:57 +0200
committerUri Shaked2025-02-11 10:31:57 +0200
commit9ce22e49cf1110d0a8c1943877dc32e6568354cc (patch)
tree6ad61569ee9a311b5ca8f330948b2136b2c04ed5 /src/cpu
parentchore: replace ts-node with tsx (diff)
downloadavr8js-9ce22e49cf1110d0a8c1943877dc32e6568354cc.tar.gz
avr8js-9ce22e49cf1110d0a8c1943877dc32e6568354cc.tar.bz2
avr8js-9ce22e49cf1110d0a8c1943877dc32e6568354cc.zip
chore(deps): upgrade prettier
reformat all code with the new prettier version
Diffstat (limited to 'src/cpu')
-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) {
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.