blob: 99e407244c3f4a29257ab0e1e9bda621ffccf623 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
import type The65c02 from "../65c02.ts";
export default function (this: The65c02, mode: string) {
switch (mode) {
case 'implied':
this.io.interruptRequest.HI()
//TODO: push shit onto stack
this.io.data.set(this.programCounter.num() & 0x00FF)
this.io.address.set(0xFFFF)
this.write()
this.io.data.set(this.programCounter.num() & 0xFF00)
this.io.address.set(0xFFFE)
this.write()
this.BRK = true
this.programCounter.increment();
this.programCounter.increment();
break;
default:
throw 'wha';
}
}
|