Initial commit for basics need a refresher.
This commit is contained in:
7
cmd/asm/main.go
Normal file
7
cmd/asm/main.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
fmt.Println("hi compiler")
|
||||
}
|
||||
26
cmd/sim/main.go
Normal file
26
cmd/sim/main.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"jh/gomos/internal/bus"
|
||||
"jh/gomos/internal/cpu"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Println("--- 6502 Simulator Starting ---")
|
||||
|
||||
// Initialize the Bus
|
||||
b := bus.New()
|
||||
|
||||
// Initialize CPU and "plug in" the Bus
|
||||
c := &cpu.CPU{Bus: b}
|
||||
c.Reset()
|
||||
|
||||
// Run for 10 cycles to verify the "Fetch" works
|
||||
for range 10 {
|
||||
c.Step()
|
||||
}
|
||||
|
||||
fmt.Println("--- Simulation Complete ---")
|
||||
}
|
||||
Reference in New Issue
Block a user