mirror of
https://github.com/bradford-hamilton/apple-1.git
synced 2024-10-31 22:05:59 +00:00
docs: add/update some godoc comments
This commit is contained in:
parent
3ff2e7f9ab
commit
17df9a44f0
@ -1,5 +1,7 @@
|
||||
package cpu
|
||||
|
||||
// op represents an operation. It includes the name of the op, it's 8 bit hexidecimal
|
||||
// opcode, how many bytes it occupies (it's size), as well as it's addressing mode.
|
||||
type op struct {
|
||||
name string
|
||||
opcode uint8
|
||||
@ -16,6 +18,8 @@ func newOp(name string, opcode, size uint8, addressingMode addressingMode) op {
|
||||
}
|
||||
}
|
||||
|
||||
// opcodes represent all of the Apple 1 opcodes available. Each 8 bit opcode is mapped to a corresponding
|
||||
// "op" which is just a struct holding metadata about the operation.
|
||||
var opcodes = map[uint8]op{
|
||||
// BRK Force Break
|
||||
// addressing assembler opc bytes cyles
|
||||
|
@ -2,12 +2,12 @@ package appleone
|
||||
|
||||
import "github.com/bradford-hamilton/apple-1/internal/cpu"
|
||||
|
||||
// Appleone TODO docs
|
||||
// Appleone represents our virtual Apple 1 computer
|
||||
type Appleone struct {
|
||||
cpu *cpu.Mos6502
|
||||
}
|
||||
|
||||
// New TODO: docs
|
||||
// New returns a pointer to an initialized Appleone with a brand spankin new CPU
|
||||
func New() *Appleone {
|
||||
return &Appleone{cpu: cpu.New()}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user