DotNet6502
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Pages
M6502.InstructionDecode.InstructionBase Class Reference
Inheritance diagram for M6502.InstructionDecode.InstructionBase:
M6502.InstructionDecode.Instructions.Arithmetic.AdcInstruction M6502.InstructionDecode.Instructions.Arithmetic.AndInstruction M6502.InstructionDecode.Instructions.Arithmetic.AslInstruction M6502.InstructionDecode.Instructions.Arithmetic.BitInstruction M6502.InstructionDecode.Instructions.Arithmetic.CmpInstruction M6502.InstructionDecode.Instructions.Arithmetic.CpxInstruction M6502.InstructionDecode.Instructions.Arithmetic.CpyInstruction M6502.InstructionDecode.Instructions.Arithmetic.DecInstruction M6502.InstructionDecode.Instructions.Arithmetic.EorInstruction M6502.InstructionDecode.Instructions.Arithmetic.IncInstruction M6502.InstructionDecode.Instructions.Arithmetic.LsrInstruction M6502.InstructionDecode.Instructions.Arithmetic.OraInstruction M6502.InstructionDecode.Instructions.Arithmetic.RolInstruction M6502.InstructionDecode.Instructions.Arithmetic.RorInstruction M6502.InstructionDecode.Instructions.Arithmetic.SbcInstruction M6502.InstructionDecode.Instructions.Branch.BranchInstructionBase M6502.InstructionDecode.Instructions.Flow.BrkInstruction M6502.InstructionDecode.Instructions.Flow.JmpInstruction M6502.InstructionDecode.Instructions.Flow.JsrInstruction M6502.InstructionDecode.Instructions.Flow.NopInstruction M6502.InstructionDecode.Instructions.Flow.RtiInstruction M6502.InstructionDecode.Instructions.Flow.RtsInstruction M6502.InstructionDecode.Instructions.Registers.DexInstruction M6502.InstructionDecode.Instructions.Registers.DeyInstruction M6502.InstructionDecode.Instructions.Registers.InxInstruction M6502.InstructionDecode.Instructions.Registers.InyInstruction M6502.InstructionDecode.Instructions.Registers.LdaInstruction M6502.InstructionDecode.Instructions.Registers.LdxInstruction M6502.InstructionDecode.Instructions.Registers.LdyInstruction M6502.InstructionDecode.Instructions.Registers.StaInstruction M6502.InstructionDecode.Instructions.Registers.StxInstruction M6502.InstructionDecode.Instructions.Registers.StyInstruction M6502.InstructionDecode.Instructions.Registers.TaxInstruction M6502.InstructionDecode.Instructions.Registers.TayInstruction M6502.InstructionDecode.Instructions.Registers.TxaInstruction M6502.InstructionDecode.Instructions.Registers.TyaInstruction M6502.InstructionDecode.Instructions.Stack.PhaInstruction M6502.InstructionDecode.Instructions.Stack.PhpInstruction M6502.InstructionDecode.Instructions.Stack.PlaInstruction M6502.InstructionDecode.Instructions.Stack.PlpInstruction M6502.InstructionDecode.Instructions.Stack.TsxInstruction M6502.InstructionDecode.Instructions.Stack.TxsInstruction M6502.InstructionDecode.Instructions.Status.ClcInstruction M6502.InstructionDecode.Instructions.Status.CldInstruction M6502.InstructionDecode.Instructions.Status.CliInstruction M6502.InstructionDecode.Instructions.Status.ClvInstruction M6502.InstructionDecode.Instructions.Status.SecInstruction M6502.InstructionDecode.Instructions.Status.SedInstruction M6502.InstructionDecode.Instructions.Status.SeiInstruction

Public Member Functions

void Execute ()
 
override string ToString ()
 

Protected Member Functions

 InstructionBase (string name, byte opCode, AddressingMode addressingMode, M6502Core core)
 
virtual void ExecuteInImplicitMode ()
 Pure instruction, no arguments. More...
 
virtual void ExecuteInAccumulatorMode ()
 Argument is stored in the accumulator register. More...
 
virtual void ExecuteInImmediateMode ()
 Argument is stored as constant next to operation code. More...
 
byte ReadAddressInZeroPageMode ()
 Arguments length: 1, Cycles: 1. More...
 
virtual void ExecuteInZeroPageMode ()
 Argument is stored at the specified 8-bit address (0 page). More...
 
byte ReadAddressInZeroPageXMode ()
 Arguments length: 1, Cycles: 2. More...
 
virtual void ExecuteInZeroPageXMode ()
 Argument is stored at the specified 8-bit address (0 page) + X register. More...
 
byte ReadAddressInZeroPageYMode ()
 Arguments length: 1, Cycles: 2. More...
 
virtual void ExecuteInZeroPageYMode ()
 Argument is stored at the specified 8-bit address (0 page) + Y register. More...
 
virtual void ExecuteInRelativeMode ()
 Argument contains offset to apply. More...
 
ushort ReadAddressInAbsoluteMode ()
 Arguments length: 2, Cycles: 2. More...
 
virtual void ExecuteInAbsoluteMode ()
 Argument is stored at the specified 16-bit address. More...
 
ushort ReadAddressInAbsoluteXMode (bool forceBoundaryCheck=false)
 Arguments length: 2, Cycles: 2 + 1B. More...
 
virtual void ExecuteInAbsoluteXMode ()
 Argument is stored at the specified 16-bit address + X register. More...
 
ushort ReadAddressInAbsoluteYMode (bool forceBoundaryCheck=false)
 Arguments length: 2, Cycles: 2 + 1B. More...
 
virtual void ExecuteInAbsoluteYMode ()
 Argument is stored at the specified 16-bit address + Y register. More...
 
ushort ReadAddressInIndirectMode ()
 Arguments length: 2, Cycles: 4. More...
 
virtual void ExecuteInIndirectMode ()
 Address of the argument is stored at the specified 16-bit address. More...
 
ushort ReadAddressInIndexedIndirectMode ()
 Arguments length: 1, Cycles: 4. More...
 
virtual void ExecuteInIndexedIndirectMode ()
 Address of the argument is stored in the table (0 page) at X register index. More...
 
ushort ReadAddressInIndirectIndexedMode (bool forceBoundaryCheck=false)
 Arguments length: 1, Cycles: 3 + 1B. More...
 
virtual void ExecuteInIndirectIndexedMode ()
 Address of the argument is stored at the specified address (0 page) + Y register index. More...
 

Properties

string Name [get]
 
byte OpCode [get]
 
AddressingMode AddressingMode [get]
 
M6502Core Core [get]
 

Constructor & Destructor Documentation

M6502.InstructionDecode.InstructionBase.InstructionBase ( string  name,
byte  opCode,
AddressingMode  addressingMode,
M6502Core  core 
)
protected

Member Function Documentation

void M6502.InstructionDecode.InstructionBase.Execute ( )
virtual void M6502.InstructionDecode.InstructionBase.ExecuteInAbsoluteMode ( )
protectedvirtual

Argument is stored at the specified 16-bit address.

Reimplemented in M6502.InstructionDecode.Instructions.Arithmetic.AslInstruction, M6502.InstructionDecode.Instructions.Arithmetic.LsrInstruction, M6502.InstructionDecode.Instructions.Arithmetic.RolInstruction, M6502.InstructionDecode.Instructions.Arithmetic.RorInstruction, M6502.InstructionDecode.Instructions.Arithmetic.AdcInstruction, M6502.InstructionDecode.Instructions.Arithmetic.AndInstruction, M6502.InstructionDecode.Instructions.Arithmetic.CmpInstruction, M6502.InstructionDecode.Instructions.Arithmetic.EorInstruction, M6502.InstructionDecode.Instructions.Arithmetic.OraInstruction, M6502.InstructionDecode.Instructions.Arithmetic.SbcInstruction, M6502.InstructionDecode.Instructions.Registers.LdaInstruction, M6502.InstructionDecode.Instructions.Registers.LdxInstruction, M6502.InstructionDecode.Instructions.Registers.LdyInstruction, M6502.InstructionDecode.Instructions.Arithmetic.DecInstruction, M6502.InstructionDecode.Instructions.Arithmetic.IncInstruction, M6502.InstructionDecode.Instructions.Arithmetic.CpxInstruction, M6502.InstructionDecode.Instructions.Arithmetic.CpyInstruction, M6502.InstructionDecode.Instructions.Registers.StaInstruction, M6502.InstructionDecode.Instructions.Registers.StxInstruction, M6502.InstructionDecode.Instructions.Registers.StyInstruction, M6502.InstructionDecode.Instructions.Arithmetic.BitInstruction, M6502.InstructionDecode.Instructions.Flow.JmpInstruction, and M6502.InstructionDecode.Instructions.Flow.JsrInstruction.

virtual void M6502.InstructionDecode.InstructionBase.ExecuteInAccumulatorMode ( )
protectedvirtual
virtual void M6502.InstructionDecode.InstructionBase.ExecuteInImplicitMode ( )
protectedvirtual

Pure instruction, no arguments.

Reimplemented in M6502.InstructionDecode.Instructions.Flow.RtiInstruction, M6502.InstructionDecode.Instructions.Registers.DexInstruction, M6502.InstructionDecode.Instructions.Registers.DeyInstruction, M6502.InstructionDecode.Instructions.Registers.InxInstruction, M6502.InstructionDecode.Instructions.Registers.InyInstruction, M6502.InstructionDecode.Instructions.Registers.TaxInstruction, M6502.InstructionDecode.Instructions.Registers.TayInstruction, M6502.InstructionDecode.Instructions.Registers.TxaInstruction, M6502.InstructionDecode.Instructions.Registers.TyaInstruction, M6502.InstructionDecode.Instructions.Stack.PlaInstruction, M6502.InstructionDecode.Instructions.Stack.PlpInstruction, M6502.InstructionDecode.Instructions.Stack.TsxInstruction, M6502.InstructionDecode.Instructions.Status.ClcInstruction, M6502.InstructionDecode.Instructions.Status.CldInstruction, M6502.InstructionDecode.Instructions.Status.CliInstruction, M6502.InstructionDecode.Instructions.Status.ClvInstruction, M6502.InstructionDecode.Instructions.Status.SecInstruction, M6502.InstructionDecode.Instructions.Status.SedInstruction, M6502.InstructionDecode.Instructions.Status.SeiInstruction, M6502.InstructionDecode.Instructions.Flow.BrkInstruction, M6502.InstructionDecode.Instructions.Flow.NopInstruction, M6502.InstructionDecode.Instructions.Flow.RtsInstruction, M6502.InstructionDecode.Instructions.Stack.PhaInstruction, M6502.InstructionDecode.Instructions.Stack.PhpInstruction, and M6502.InstructionDecode.Instructions.Stack.TxsInstruction.

virtual void M6502.InstructionDecode.InstructionBase.ExecuteInIndirectMode ( )
protectedvirtual

Address of the argument is stored at the specified 16-bit address.

Reimplemented in M6502.InstructionDecode.Instructions.Flow.JmpInstruction.

virtual void M6502.InstructionDecode.InstructionBase.ExecuteInZeroPageMode ( )
protectedvirtual
virtual void M6502.InstructionDecode.InstructionBase.ExecuteInZeroPageYMode ( )
protectedvirtual

Argument is stored at the specified 8-bit address (0 page) + Y register.

Reimplemented in M6502.InstructionDecode.Instructions.Registers.LdxInstruction, and M6502.InstructionDecode.Instructions.Registers.StxInstruction.

ushort M6502.InstructionDecode.InstructionBase.ReadAddressInAbsoluteMode ( )
protected

Arguments length: 2, Cycles: 2.

ushort M6502.InstructionDecode.InstructionBase.ReadAddressInAbsoluteXMode ( bool  forceBoundaryCheck = false)
protected

Arguments length: 2, Cycles: 2 + 1B.

ushort M6502.InstructionDecode.InstructionBase.ReadAddressInAbsoluteYMode ( bool  forceBoundaryCheck = false)
protected

Arguments length: 2, Cycles: 2 + 1B.

ushort M6502.InstructionDecode.InstructionBase.ReadAddressInIndexedIndirectMode ( )
protected

Arguments length: 1, Cycles: 4.

ushort M6502.InstructionDecode.InstructionBase.ReadAddressInIndirectIndexedMode ( bool  forceBoundaryCheck = false)
protected

Arguments length: 1, Cycles: 3 + 1B.

ushort M6502.InstructionDecode.InstructionBase.ReadAddressInIndirectMode ( )
protected

Arguments length: 2, Cycles: 4.

byte M6502.InstructionDecode.InstructionBase.ReadAddressInZeroPageMode ( )
protected

Arguments length: 1, Cycles: 1.

byte M6502.InstructionDecode.InstructionBase.ReadAddressInZeroPageXMode ( )
protected

Arguments length: 1, Cycles: 2.

byte M6502.InstructionDecode.InstructionBase.ReadAddressInZeroPageYMode ( )
protected

Arguments length: 1, Cycles: 2.

override string M6502.InstructionDecode.InstructionBase.ToString ( )

Property Documentation

AddressingMode M6502.InstructionDecode.InstructionBase.AddressingMode
get
M6502Core M6502.InstructionDecode.InstructionBase.Core
getprotected
string M6502.InstructionDecode.InstructionBase.Name
get
byte M6502.InstructionDecode.InstructionBase.OpCode
get

The documentation for this class was generated from the following file: