mirror of
https://github.com/ivanizag/izapple2.git
synced 2024-12-22 09:30:19 +00:00
Initial
This commit is contained in:
parent
d36c030269
commit
3c77553dcd
40
execute.go
40
execute.go
@ -0,0 +1,40 @@
|
||||
package main
|
||||
|
||||
type state struct {
|
||||
register r,
|
||||
memory m
|
||||
}
|
||||
|
||||
func step(state *S) {
|
||||
|
||||
}
|
||||
|
||||
const modeNone = -1
|
||||
const modeImmediate = 0
|
||||
const modeZeroPage = 1
|
||||
const modeAbsolute = 2
|
||||
|
||||
type opcode struct {
|
||||
name string
|
||||
code int8
|
||||
bytes int
|
||||
cycles int
|
||||
mode int
|
||||
}
|
||||
|
||||
// https://www.masswerk.at/6502/6502_instruction_set.html
|
||||
|
||||
func opA1LDA(state *, opcode) {
|
||||
value := s->memory
|
||||
s->register.setRegister(regA, value)
|
||||
|
||||
}
|
||||
|
||||
func opLDA(state *s, reg, mode, arg) {
|
||||
}
|
||||
|
||||
opcodes := []Opcode{
|
||||
0: opcode('BRK', 0x0, 1, 7, modeImmediate)
|
||||
1:
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user