UNIT 5
THE MOTOROLA M68000 FAMILY
THE MOTOROLA M68000FAMILY
Contents
Introduction
The MC6800Architecture
CPU Registers
Data Formats
Instructiontypes
Addressingmodes
Memorymanagement
Instructionanddata cache
Exceptionprocessing
OBJECTIVES
In thisunitwillbelearn about:
IntroductiontoM68000microprocessor
Programmodel of the M68000microprocessor
Theregister set ofthe M68000microprocessor
Theaddressing capabilitiesanddatatypes that maybeused
Thedifferent addressing modes andinstructiontypes available
Theusefulness ofinterrupts
Memorymanagement systemandExceptionprocessing
Introductionto M68000
The68000isMotorola’sfirst16-bitmicroprocessor.Itsaddressanddataregistersareall
32bitswide,anditsALUis16bitswide.The68000requires asingle5-Vsupply.The processorcanbeoperatedfromamaximuminternalclockfrequencyof25MHz.The
68000 isavailableinseveral frequencies,including4,6,8,10,12.5,16.67, and25MHz. The68000doesnothaveon-chipclockcircuitryandtherefore,requiresanexternal crystaloscillator orclockgenerator drivercircuit.The68000hasseveraldifferent versions, which include the 68008, 68010, and 68012. The 68000 and 68010 are packaged eitherina64-pinDIP(dualin-linepackage)withallpinsassigned orina68- pinquadpackorPGA(pingridarray)withsomeunusedpins.The68000isalso packagedin68-terminalchipcarrier.The68008ispackedina 48-pindualin-line package, whereasthe68012ispackedinan84-pingridarray.The68008providesthe basic68000capabilities withinexpensive packaging.Ithasan8-bitdatabus,which facilitatestheinterfacing ofthischiptoinexpensive 8-bitperipheralchips.The68010 provideshardware-basedvirtualmemory supportandefficientloopinginstructions.Like the68000,ithasa16-bitdatabusanda24-bitaddressbus.The68012includesallthe
68010featureswitha31-bitaddressbus. The clockfrequenciesofthe68008,68010,and
68012arethesameas thoseofthe68000.Table6.1summarizesbasicdifferencesamong the68000familymembers:
Toimplementoperatingsystemsandprotectionfeatures,the68000canbeoperated
intwomodes:supervisor anduser.Thesupervisormodeisalsocalledtheoperating system mode.Inthismode,the68000canexecuteallinstructions.The68000operatesin oneof thesemodesbasedontheSbitof thestatusregister.WhentheSbitis 1,the68000 operatesinthesupervisormode;whentheSbitis0,the68000operatesintheuser mode. Tableliststhebasicdifferencesbetweenthe68000userandsupervisormodes.From
thetable,itcanbeseenthatthe68000executingaprograminthesupervisormodecan entertheuser modebymodifyingtheSbitof thestatusregisterto0viaaninstruction. InstructionssuchasMOVEtoSR,ANDItoSR,andEORItoSRcanbeusedto accomplish this.Ontheotherhand,the68000executingaprogramintheusermodecan enterthesupervisormodeonlyviarecognitionofatrap,reset,orinterrupt.Notethat uponhardwarereset,the68000operatesinthesupervisormodeandcanexecuteall instructions.An attempt to execute privileged instructions (instructionsthat can be executedonlyinthesupervisormode)intheusermodewillautomaticallygeneratean internalinterrupt(trap)bythe68000.
Thelogicallevelinthe68000functioncodepin(FC2)indicatestotheexternal deviceswhetherthe68000iscurrentlyoperatingintheuserorthesupervisormode.The
68000hasthreefunction codepins(FC2,FC1,andFCO),whichindicate totheexternal deviceswhetherthe68000 isaccessingsupervisorprogrammeddataoruserprogrammed dataorperforminganinterruptacknowledge cycle.The68000canoperateonfive differentdatatypes:bits,4-bitbinary-coded decimal(BCD)digits,bytes,16-bitwords, and32-bitlongwords.The68000instructionsetincludes56basicinstructiontypes. With14addressingmodes,56instructions,andfivedatatypes,the68000containsover
1000op-codes.Thefastestinstruction isonethatcopiesthecontentsofoneregisterinto anotherregister.Itisexecutedin500nsatan8-MHzclockrate.Theslowestinstruction isa32-bitby16-bitdivide,whichinexecuted in21.25psat8MHz.The68000hasno I/Oinstructions.Thus,theI/Oismemorymapped.Hence,MOVEinstructionsbetweena registerandamemoryaddressarealsousedasI/Oinstructions.
ADDRESSING MODES
INSTRUCTION SET
conti..
Memory management
EXCEPTIONPROCESSING
KEY TERM
A
ArchitectureofM6800
Addressing modes
C Cache E
Exception processing
F Flags I
Instruction set
M
Memorymanagement
P
Privilegedinstructions
Programming model M68000
S
Supervisor mode
KEYTERMQUIZ
1. The 68000isdesignedusing------technology
2. The clockfrequency0f M6800Ois------
3. The 68000hasa----- data busand a------addressbus
4. The Supervisor mode isalsocalledas------mode
5.Whenthe S bitis0,thenthe68000operatesin a)Supervisor mode b)User mode c)Privilegedmode
6. The datasize of 6800.68008,68010,68012are---,----,-----,-----
7. All68000instructionsoccupy ------words.
8. Howmanystagesare availableinpipeliningof68000?
9.Whatare thetypesof instructionsset?
10.Indicate whetherthe followinginstructionsarevalidornot
(a) MOVE.B D0,(A1) (b) MOVE.D0,AI
11.Mentionthe typesof addressingmodes?
12.Whatisthe meaningof Trace flag?
PARTA
1.Whatare thebasicdifferencesbetweenthe6800,68008, 68010,and680122?
2.Whatdoesa HIGHonthe68000Fc2pinindicate?
(a)Ifa68000-basedsystem operatesintheusermodeandaninterruptoccurs,what willthe 68000mode be?
3.Ifa68000-basedsystemoperatesininthesupervisormode,howcanbemode changedtouser mode?
4.Indicate whether the followinginstructionsare validor not
(a) MOVE.B D0,(A1) (b) MOVE.D0,AI
5. Howmanyaddressingmodesandinstructionsdoes68000have?
6.Whatare68000privilegedinstructions?
7.Whatismeanbymemorymanagement?
8. Define instructionanddata cache?
9.Whatare Registersavailable in68000microprocessor?
10. ExplainExceptionprocessing?
PARTB
1. Draw andExplainthe ArchitectureofMC68000microprocessor?
2. Explainthe RegistersetofMC68000microprocessor?
3. Explainthedifferenttypesof addressingmodesin68000?
4. Whatare the typesofinstructionsetandexplainwithexample?
5. Explainmemorymanagement?
6. Define instructionanddata cache andexplainindetail?
7. Describe exceptionprocessing?
8. What isthe purposeof thetrace andXflags?andhowcanyouser orreset them?
9. Write a 68000assemblyprogramtomultiplya16-bitsignednumber inthe lowwordof D0byan 8-bitsignednumber inthe highestbyte(bits31-24)of D0.
10.Write a 68000assemblyprogramtoaddthe top two16bitsof the stack.
Store the 16bitontothe stack. Assume supervisor mode.