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 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 fffvvvffThereare twosubgroupstoconsider.
GrouplA:8AddressingModes
Thesemodesare
vvvA10de000Indexedindirect(seeappendix3)
001Zeropage
010Immediate(notSTA)
011Absolute
100Indirectindexed
101Zeropage,indexedX
110Absolute,indexedY
111Absolute,indexedX
Theinstructionsin thisgroupare
ADC,AND,CMP,EaR,LDA,ORA,SBC,STA
225226AssemblyLanguageProgrammingfortheBBeMicrocomputer
GroupIB: 5AddressingModes
The modes are
vvvMode000Immediate(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,
RORGroup2: Six Bits Fixed
Thereare two subgroups.
Group2A
These have fixed (f) and variable (v) bits as follows fffvvfffThe addressing modes are
vvvMode00Zeropage
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 ffffvvffTheaddressingmodesare
vvA10de00Immediate
01Zeropage
11 l\bsoluteTheinstructionsin thisgroupare
CPX,Cpy
Group3: Seven Bits Fixed
Thereare twosubgroups.
Group3A
This has a fixed (f) andvariable(v) bitpatternof
ffffvfffThemodesare
vA10de oZeropage 1 l\bsoluteThe onlyinstructionin thisgroupis BIT.227
228AssemblyLanguageProgrammingfortheBBeMicrocomputer
Group3B
This has a fixed (f) andvariable(v) bitpatternof
ffvfffffThemodesare
vMode ol\bsolute1Indirect
Theonlyinstructionin thisgroupisJMP.
Group4: All Bits Fixed
Theseare theimpliedandrelativeaddressingmodeinstructionsBCC,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
229t 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 anotherpageNumberofbytescomprisingtheopcodeandoperand
Numberofmachinecyclesneededtocompleteinstruction
Avariablebit in
theopcodeAnarbitrarymemorylocation(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 ANDExclusive-OR
Signedaddition
(thatis,secondbyteistreatedas asigned byte)Flagisaffectedbyinstruction
Flagis
notaffectedbyinstruction230AssemblyLanguageProgrammingfor theBBeMicrocomputer
TableA.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..\ANOOp&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'OAppendix1:6502 Instruction Set
Bc.e 231Des'riptionof
eac.c.LoopIfC-0)bt-o",c.'""0
M,e.i".n.uc.iionlob..lIe.d
LooPDes'riptionof
&c.$LooPIfCo:I,b"ot\c.hto
\n..h·uc.no"\o'=»e.lled LooPSymbolic operation of
&c.c:.tIfC=C>:
Pc.."Z.....Pc.
IIcI: hoSymbolic 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.ooPIfZ.cIIbc-onc.n\"t)
H,..\obc\led
LooPSymbolic operation of
&E.ca.rIfz..i .
..Pc 'Jz.·o noBE:.ca
Addressing mode
Opcode
FO (ltFlagsaffected 2z t mSymbolicoperationofBlT""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 cool232AssemblyLanguageProgrammingfortheBBCMicrocomputer
BMIAddressing modeof
&M1.LooPIf!'J-',br-o\"'\c..h
toot\,e.lobe.l\ed loop &NE.LooPI}7.=cs .b.-a\"'\c:.h
H,e.\abe.\\ed
Loop15N-O,br-o\"'\c:.n
Hw\ab4L\\td
LoopSymbolicof
1!>N'\'tr
IftJ:.I :
Pc.EDI"...'Pc
Ifi'Jc0:
noSymbolicof
B"-JE.t"
If1.:0:
'2.e.....Pc. rfz.::,: noSymbolicof
BPL...
'ft-j-o: 'Z.81"...Pc.Ift.J:.I:
he l2.elah\Je.Addressing mode
Addressing mode
Opcode
30Opcode
00Opcode
10 ntFlags affected fltFlags affected fltFlags affected B2KDuc.r-.ptionofSymbolicofAddressing modeOpcodefl
B2.K, A +Pc. ...'2. 5I""p'ied00I
tp :)-(-.5. .iF'F"F'E.)'"PcFlags affected
m &to'Pi1!tpus.hed
on\-oI'-\w..I,.1-0 ,
Pi..pu..he,d
Ol'\bSin-ea.
Appendix1:6502InstructionSet
BVc.. 233Addressing mode Opcodent
BVc..Loa?
IfV·0,b..-anc.htoo
\n'!!thvc..t.onlabe.ne.d LooPDuc"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:l5ymbolicoperationof
IfV&0:
noOpe....5ymbolicoperationof
CLC.Addressing mode
Addressing mode
CL.C- rMf>'ie.d CL.DOpcode
Opccde
'0 ntFlagsaffected 2z t m n.tFlagsaffected 22t m