parameter

package
v0.0.0-...-bc4fb65 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2025 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Overview

Package parameter provides helpers to output instruction parameters as string compatible with specific assemblers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func String

func String(converter Converter, addressing m6502.AddressingMode, param any) (string, error)

String returns the parameters as a string that is compatible to the assembler presented by the converter. nolint:cyclop

Types

type Config

type Config struct {
	ZeroPagePrefix string
	AbsolutePrefix string
	IndirectPrefix string
	IndirectSuffix string
}

Config contains the configuration for the parameter converter.

type Converter

type Converter struct {
	// contains filtered or unexported fields
}

Converter converts the opcode parameters to specific assembler compatible output.

func New

func New(cfg Config) Converter

New returns a new parameter converter.

func (Converter) Absolute

func (c Converter) Absolute(param any) (string, error)

Absolute converts the parameters to the assembler implementation compatible string.

func (Converter) AbsoluteX

func (c Converter) AbsoluteX(param any) (string, error)

AbsoluteX converts the parameters to the assembler implementation compatible string.

func (Converter) AbsoluteY

func (c Converter) AbsoluteY(param any) (string, error)

AbsoluteY converts the parameters to the assembler implementation compatible string.

func (Converter) Accumulator

func (c Converter) Accumulator() string

Accumulator converts the parameters to the assembler implementation compatible string.

func (Converter) Immediate

func (c Converter) Immediate(param any) string

Immediate converts the parameters to the assembler implementation compatible string.

func (Converter) Indirect

func (c Converter) Indirect(param any) (string, error)

Indirect converts the parameters to the assembler implementation compatible string.

func (Converter) IndirectX

func (c Converter) IndirectX(param any) (string, error)

IndirectX converts the parameters to the assembler implementation compatible string.

func (Converter) IndirectY

func (c Converter) IndirectY(param any) (string, error)

IndirectY converts the parameters to the assembler implementation compatible string.

func (Converter) Relative

func (c Converter) Relative(param any) string

Relative converts the parameters to the assembler implementation compatible string.

func (Converter) ZeroPage

func (c Converter) ZeroPage(param any) (string, error)

ZeroPage converts the parameters to the assembler implementation compatible string.

func (Converter) ZeroPageX

func (c Converter) ZeroPageX(param any) (string, error)

ZeroPageX converts the parameters to the assembler implementation compatible string.

func (Converter) ZeroPageY

func (c Converter) ZeroPageY(param any) (string, error)

ZeroPageY converts the parameters to the assembler implementation compatible string.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL