Skip to content

Commit

Permalink
adapt to latest retrogolib
Browse files Browse the repository at this point in the history
  • Loading branch information
cornelk committed Dec 10, 2024
1 parent 554a150 commit 1cbe14e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
3 changes: 1 addition & 2 deletions arch/arch.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package arch

import (
"github.com/retroenv/retrogolib/arch/cpu/m6502"
"github.com/retroenv/retrogolib/cpu"
)

// Architecture contains architecture specific information.
Expand All @@ -15,7 +14,7 @@ type Architecture struct {
BranchingInstructions map[string]struct{}

// Instructions maps instruction names to CPU instruction information.
Instructions map[string]*cpu.Instruction
Instructions map[string]*m6502.Instruction
}

// NewNES returns a new NES architecture instance.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module github.com/retroenv/retroasm

go 1.22

require github.com/retroenv/retrogolib v0.0.0-20241111003331-fc91264b5684
require github.com/retroenv/retrogolib v0.0.0-20241210061230-05a2624c119e
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github.com/retroenv/retrogolib v0.0.0-20241111003331-fc91264b5684 h1:4dQQv1dgk2t1pGFpcczmKRsHuAvMxZN/fUPMwESwmjg=
github.com/retroenv/retrogolib v0.0.0-20241111003331-fc91264b5684/go.mod h1:8pe9mEjbKL9Z5L4FFzYGSk1Ovhrq1LR6ucwRFj5CIXs=
github.com/retroenv/retrogolib v0.0.0-20241210061230-05a2624c119e h1:r0SpvqFR5duslFMiJXG6qHoUntFaK1NioJnsHP40NDY=
github.com/retroenv/retrogolib v0.0.0-20241210061230-05a2624c119e/go.mod h1:8pe9mEjbKL9Z5L4FFzYGSk1Ovhrq1LR6ucwRFj5CIXs=
4 changes: 2 additions & 2 deletions parser/addressing.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/retroenv/retroasm/lexer/token"
. "github.com/retroenv/retrogolib/addressing"
"github.com/retroenv/retrogolib/cpu"
"github.com/retroenv/retrogolib/arch/cpu/m6502"
)

type addressingSize int
Expand All @@ -18,7 +18,7 @@ const (

// parseAddressSize returns the addressing mode used for an instruction based on the following
// tokens.
func (p *Parser) parseAddressSize(ins *cpu.Instruction) (addressingSize, error) {
func (p *Parser) parseAddressSize(ins *m6502.Instruction) (addressingSize, error) {
tok := p.NextToken(0)
if tok.Type != token.Identifier && tok.Type != token.EOL {
return addressingDefault, nil
Expand Down
6 changes: 3 additions & 3 deletions parser/instruction.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ import (
"github.com/retroenv/retroasm/parser/ast"
"github.com/retroenv/retroasm/parser/directives"
. "github.com/retroenv/retrogolib/addressing"
"github.com/retroenv/retrogolib/cpu"
"github.com/retroenv/retrogolib/arch/cpu/m6502"
)

type instruction struct {
instruction *cpu.Instruction
instruction *m6502.Instruction
addressingSize addressingSize
modifiers []ast.Modifier
arg1 token.Token
arg2 token.Token
}

func (p *Parser) parseInstruction(instructionDetails *cpu.Instruction) (ast.Node, error) {
func (p *Parser) parseInstruction(instructionDetails *m6502.Instruction) (ast.Node, error) {
p.readPosition++

var err error
Expand Down

0 comments on commit 1cbe14e

Please sign in to comment.