diff options
| author | Uri Shaked | 2025-02-11 10:31:57 +0200 |
|---|---|---|
| committer | Uri Shaked | 2025-02-11 10:31:57 +0200 |
| commit | 9ce22e49cf1110d0a8c1943877dc32e6568354cc (patch) | |
| tree | 6ad61569ee9a311b5ca8f330948b2136b2c04ed5 /src/cpu | |
| parent | chore: replace ts-node with tsx (diff) | |
| download | avr8js-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.ts | 5 | ||||
| -rw-r--r-- | src/cpu/instruction.ts | 8 |
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) { |
