[PDF] Appendix 1: 6502 Instruction Set

Appendix 1: 6502 Instruction Set BVc 233 Addressing mode Opcode n t BVc representation, the direct counterpart to the base ten decimal; and we refer



Previous PDF Next PDF





Appendix 1: 6502 Instruction Set

Appendix 1: 6502 Instruction Set BVc 233 Addressing mode Opcode n t BVc representation, the direct counterpart to the base ten decimal; and we refer



[PDF] 6502 Instructions - Apple Asimov

2-byte instruction, and none in a 1-byte Instruction APPLE ZERO-PAGE USAGE Dec: 8 1 I 3 4 5 1 I 9 11 II 11 13 14 15 Hex: III 11 II 13 14 IS SO 11 II 19 II II I II 



[PDF] Micro Logic 6502 Quick Reference Cardpdf - Apple Asimov

Stack push decrements S In pushing PC, high byte is pushed first Pre 6/76 chips have no ROR instruction



[PDF] TABLE OF CONTENTS 6502 Instruction Set Tables - 6502org

offer table of the 6502 instruction set by mnemonic and by opcode„ Since I I've found that if you refer to a subroutine by NAME instead of by number when you 



[PDF] 6502 Instant Reference Card - Atarimania

LEWIS Instruction Notes Shift Instructions Assembler Symbols Intentionally Blank MSB



[PDF] NMOS 6510 Unintended Opcodes - Esocop

Some of the 'unstable' opcodes are known to work slightly different on 6502 that do not feel confident enough, having a reference to the regular opcodes, flags



[PDF] 6502 architecture - Lecture  – January 30, 2004

As the 6502 is a byte-oriented machine, absolute addresses are two bytes in For example, the LDA 34 instruction references address 0034 (page 0, offset 34),  



[PDF] The 6502 Instruction Set

6502-Conj-de-Instrucoes doc 1 © Kevin Wilson The 6502 Instruction Set Load and Store Group LDA Load Accumulator N,Z LDX Load X Register N,Z LDY



[PDF] 6502 instructions - DigitalOcean

You will also find in Appendix A a complete assembler for the 6502, written in them in the previous volume of this series, reference C202 (Program ming the 



[PDF] 6502 Dead Cycles1 Opcode/Addressing Mode PBA - WordPresscom

2 Cycle numbers are with reference to Fetch_Opcode as cycle 1 3 "*" denotes the cycle is added on a page crossing 4 BAL and BAH refer to "Base Address Low" 

[PDF] 6502 opcodes c64

[PDF] 6502 opcodes cycles

[PDF] 6502 opcodes illegal

[PDF] 6502 opcodes list

[PDF] 6502 opcodes pdf

[PDF] 6502 opcodes tutorial

[PDF] 6502 pin diagram

[PDF] 6502 pla

[PDF] 6502 processor datasheet

[PDF] 6502 processor kit

[PDF] 6502 programming manual

[PDF] 6502 programming pdf

[PDF] 6502 rdy signal

[PDF] 6502 reference card

[PDF] 6502 reference guide

Appendix1:6502InstructionSet

It isconvenientto divide up the 56instructionsinto fourgroups,depending uponhow many of the bits intheirop codes are fixed.

Group1: Five Bits Fixed

Instructionsin thisgrouphave fixed (f) andvariable(v) bits as follows fffvvvff

Thereare twosubgroupstoconsider.

GrouplA:8AddressingModes

Thesemodesare

vvvA10de

000Indexedindirect(seeappendix3)

001

Zeropage

010Immediate(notSTA)

011Absolute

100Indirectindexed

101

Zeropage,indexedX

110Absolute,indexedY

111Absolute,indexedX

Theinstructionsin thisgroupare

ADC,AND,CMP,EaR,LDA,ORA,SBC,STA

225

226AssemblyLanguageProgrammingfortheBBeMicrocomputer

GroupIB: 5AddressingModes

The modes are

vvvMode

000Immediate(not ASL, LSR,ROL,ROR)

001Zeropage

010Accumulator(not LDX, LDY)

011Absolute

101Zeropage, indexed X (indexed Y in LDX)

111Absolute,indexed X (indexed Y in LDX)

Theinstructionsin this group are

ASL,LDX,LDY, LSR,ROL,

ROR

Group2: Six Bits Fixed

Thereare two subgroups.

Group2A

These have fixed (f) and variable (v) bits as follows fffvvfff

The addressing modes are

vvvMode

00Zeropage

01Absolute

10Zeropage, indexed X (indexed Y in STX)

11Absolute,indexed X (not STX, STY)

Theinstructionsin this group are

DEC,INC, STX, STY

Appendix1:6502InstructionSet

Group2B

Thesehave fixed (f) andvariable(v) bits as follows ffffvvff

Theaddressingmodesare

vvA10de

00Immediate

01

Zeropage

11 l\bsolute

Theinstructionsin thisgroupare

CPX,Cpy

Group3: Seven Bits Fixed

Thereare twosubgroups.

Group3A

This has a fixed (f) andvariable(v) bitpatternof

ffffvfff

Themodesare

vA10de oZeropage 1 l\bsolute

The onlyinstructionin thisgroupis BIT.227

228AssemblyLanguageProgrammingfortheBBeMicrocomputer

Group3B

This has a fixed (f) andvariable(v) bitpatternof

ffvfffff

Themodesare

vMode ol\bsolute

1Indirect

Theonlyinstructionin thisgroupisJMP.

Group4: All Bits Fixed

Theseare theimpliedandrelativeaddressingmodeinstructions

BCC,BCS,BEO,BMI,BNE,BPL,BRK,BVC,BVS,CLC,CLD,CLI,

CLV,DEX, DEY,INX,INY,NOP,PHl\,PHP,PLA,PLP,RTI,RTS, SEC,SED,SEI,TAX,TAY,TSX,TXA,TXS,TYA.Alsotheabsolute modeforJSR.

As anexampleof this,consider

LDA.This is ingrouplA,andthefixed

bits are 101vvv01.Takingeachset ofvaluesfor vvv inturnwearriveat the opcodesAI,A5, A9,AD,B1, B5, B9 andBD. In thedetailedsummarythatfollows, the fixed bytes will be given for eachmnemonic,andtheneachaddressingmodewill haveattachedits own variablebits. Thisinformationis useful if onewishes toconstructan assemblerordisassembler,forexample.

Appendix1:6502InstructionSet

Abbreviationsin TableAI.I

229
t n t v M (M) M 6 M r LOOP N Z C V I D B A X,Y P S PC i t V V

Plus 1 cycle ifpageboundarycrossed

Plus 1 cycle if

branchoccurs;plus 2 cycles ifbranchcrosses into anotherpage

Numberofbytescomprisingtheopcodeandoperand

Numberofmachinecyclesneededtocompleteinstruction

Avariablebit in

theopcode

Anarbitrarymemorylocation(thatis, anaddress)

ThecontentsofM

Thecontentsof bit6ofM

Theone'scomplementof(M)

Asignedbyte(thatis, &00 to &7F is+0to + 127; &80 to &FFis-128to-1)

Anarbitrarylabel(thatis, anaddress)

Thenegativeflag

Thezeroflag

Thecarryflag

Theoverflowflag

Theinterruptdisableflag

Thedecimalmodeflag

Thebreakflag

Theaccumulator

Theindexregisters

Theprocessorstatusregister

Thestackpointer

Programcounter(containingtheaddressofthefirstbyteof theinstruction)

Copytomemorylocationorregister

Copytostack(thatis,push)

Transferfromstack(thatis,pull)

OR AND

Exclusive-OR

Signedaddition

(thatis,secondbyteistreatedas asigned byte)

Flagisaffectedbyinstruction

Flagis

notaffectedbyinstruction

230AssemblyLanguageProgrammingfor theBBeMicrocomputer

Table

A.l.lAlphabeticalsummaryofinstructionset

Descriptionof"'Dc.M SymbolicoperationofAoctv{

Addn:,e.,Content.!.ofMAeM)+C _A.

ro\-\,e.

C::CLt't-_,,\eo.....-.C.

H'le..In

o.ncl l"

Flag'affected

5:liIiliJ

DIE]

Fixed bitpattern

OIIV\lVOI

DescriptionofANDM

l-h..\ANO

Op&t-at-ionb,,"en

H,e.c_..b\t"soj

(M)Clnd.. h\t,.I"'"'

OC:C.U!9\U\a

SymbolicoperationofMFlag'affected

5:liIiliJ

Fixedbitpattern

001vvVot

ofMLN\SymbolicoperationofAS.LN\Flags affec.tedFixedbitpattern oooVVV'O

Appendix1:6502 Instruction Set

Bc.e 231

Des'riptionof

eac.c.Loop

IfC-0)bt-o",c.'""0

M,e.i".n.uc.iionlob..lIe.d

LooP

Des'riptionof

&c.$LooP

IfCo:I,b"ot\c.hto

\n..h·uc.no"\o'=»e.lled LooP

Symbolic operation of

&c.c:.t

IfC=C>:

Pc.."Z.....Pc.

IIcI: ho

Symbolic operation of

I-

IfC:.I:

PC. ...'24iDt..t=>c.

Ifc:o nono",

Addressing mode

Addressing modeOpcede

Opcode

Bo ntFlagsaffected tm zc V 22
(ltFlagsaffected zztm

Des,riptionof

BEG»

l.ooP

IfZ.cIIbc-onc.n\"t)

H,..\obc\led

LooP

Symbolic operation of

&E.ca.r

Ifz..i .

..Pc 'Jz.·o no

BE:.ca

Addressing mode

Opcode

FO (ltFlagsaffected 2z t m

SymbolicoperationofBlT""FlagsFixed bit path!m

3=1AND.

it.pe.r.-...u\"" • •tbIif '"Zero.Z.i,Ua.f"O.

F.na.\\,jbi"-C.and-,oSMore. Copie.cl

t.Vot'\ClN."'is.

A."(M)"Z

MGt ....V

M7-.N [ili]ili]

EEl±]

OOIOVIOO

OP cool

232AssemblyLanguageProgrammingfortheBBCMicrocomputer

BMI

Addressing modeof

&M1.LooP

If!'J-',br-o\"'\c..h

toot\,e.lobe.l\ed loop &NE.LooP

I}7.=cs .b.-a\"'\c:.h

H,e.\abe.\\ed

Loop

15N-O,br-o\"'\c:.n

Hw\ab4L\\td

Loop

Symbolicof

1!>N'\'tr

IftJ:.I :

Pc.EDI"...'Pc

Ifi'Jc0:

no

Symbolicof

B"-JE.t"

If1.:0:

'2.e.....Pc. rfz.::,: no

Symbolicof

BPL...

'ft-j-o: 'Z.81"...Pc.

Ift.J:.I:

he l2.elah\Je.

Addressing mode

Addressing mode

Opcode

30

Opcode

00

Opcode

10 ntFlags affected fltFlags affected fltFlags affected B2K

Duc.r-.ptionofSymbolicofAddressing modeOpcodefl

B2.K, A +Pc. ...'2. 5

I""p'ied00I

tp :)-(-.5. .iF'F"F'E.)'"Pc

Flags affected

m &to'

Pi1!tpus.hed

on\-oI'-\w..

I,.1-0 ,

Pi..pu..he,d

Ol'\bSin-ea.

Appendix1:6502InstructionSet

BVc.. 233

Addressing mode Opcodent

BVc..Loa?

IfV·0,b..-anc.htoo

\n'!!thvc..t.onlabe.ne.d LooP

Duc"lption_of__

L.ooP l.f V :. I,bronCo'"too the.,,,,,,truc.nan'abe.lled LooP 1i\e. to'Z.e.ro(c.lee:a..e.cl)

5ymbolicoperationof

ISvrc»:

Pc+'Z.$'"--Pc.

'IV=I: noope.H:l

5ymbolicoperationof

IfV&0:

noOpe....

5ymbolicoperationof

CLC.

Addressing mode

Addressing mode

CL.C- rMf>'ie.d CL.D

Opcode

Opccde

'0 ntFlagsaffected 2z t m n.tFlagsaffected 22
t m

Flagsaffected

g z c v IZ - - 0 -

Desc"lptionof5ymbolicoperationof

c..LO

The.0--0

0 o.."",ill be.

Addressing mode Opcoden.tFlagsaffected

r",pie.cl0112m

234AssemblyLanguageProgrammingfor theBBeMicrocomputer

CL\

Duc;riptionofSymbolicoperationof

C.LI l'he.t"'\cIsablt0I is.t-o50

Addressingmode

CLV n.tFlagsaffected 2m

Ii"tb0

lh..ove.rj\o"",", i6to'Z.e.t-o

DuuiptionofSymbolicoperationof

CoL\!

Addressingmode Opceden.tFlags,)ffected

I"'plle.d@,1!>2m

ofCMPMSymbolicoperationofCoN'l1>MFlagsaffectedFixed (M)Sro", '""'..t'd,ul\-it..not"

Q"'clA..i.Z.it.I

onCi','SCM) e.%.c.e.e.clA...)f'J ,""I bi\-7i""'..1.

Itovvvol

Der.criptionofCoPXIV\

(M)is.-r""x, ba\-"'-(, ol"\d)("tis 'Oftci ,'J(N\) doe:.not-vu:,..e.d.)( •N is..'i}b",\-7oJh\e.. "I.

Symbolicoperationofc.pxFIagsaffectedFixed

l\\OV"VOO ZeroPtgeAbsoIut!WopageXAbsoMtXAbsoluaY(Indirld)YAc.tUlftuCliol(IndirectX) optl/\. Eol ZE42. 1 1I COOl tIvv 21

00or41u

II I

Appendix1: 6502 Instruction Set

c.P'Y 235

DescriptionofC P"(' "'"

quotesdbs_dbs12.pdfusesText_18