1/50
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
what does the CPU do?
controls and performs instructions
what is a microprocessor?
a silicon chip that modern CPUs are commonly housed on
what are the three key components of the CPU?
ALU, CU, registers
how does the fetch-execute cycle work generally?
computational instructions are retrieved from memory, decoded into recognisable operations, and executed to affect the CPU’s current state
what occurs during the fetch cycle?
the PC holds the address of the next instruction
this address is sent through the address bus to memory
CU issues a Read signal
memory places the instruction on the data bus
IR stores this fetched instruction for decoding
what occurs during the decode cycle?
after fetched, CPU begins to decode instruction
CU analyses the binary instruction to understand what action the CPU needs to perform
identifies which parts of the CPU will be involved
CU sends the necessary control signals to prepare the system for execution
how is the instruction interpreted during the decode cycle?
CPU examines the fetched binary instruction
the first few bits of the instruction form opcode, tells the CPU what operation to perform
remaining bits of the instruction are operands, identify where to get the data
what is opcode?
operation code, tells the CPU what operation to perform
what occurs during the execution cycle?
once instruction is decoded, CPU carries out the required operation
CU activates the necessary circuits, or triggers data movement between memory and CPU
ALU performs computation for arithmetic or logic instructions
for data transfer instructions, data is moved to or from memory between internal parts of the CPU
what does the ALU do?
receives control signals from the CU during execution phase, takes all inputs from data lines or registers, performs the operation, and sends the result back for storage or further use
what do registers do?
provide fast, temporary storage, during computation
what does the CU do?
directs the CPU to execute a sequence of instructions in order
fetches, decodes, and executes each instruction, ensuring the ALU and registers work together
decodes program instructions and handles logistics for the execution of decoded instructions
what does the IR do?
contains most recent instruction to be fetched
what does the PC do?
tracks the memory address of the next instruction to be executed
what does the MAR do?
contains address of the region of memory to be read or written
what does the MDR do?
contains data fetched from memory or data ready to be written to memory
what is the main difference between the 68008 and 68000 models?
68008 processor has smaller external buses
has an 8-bit external data bus (16-bit on 68000)
has a 20-bit external address bus (24-bit for 68000)
describe the internal architecture of 68000 CPU.
internal registers are 32 bits wide
internal data buses are 16-bits wide
8-bit external data bus
20-bit external data bus
what are the D0-D7 registers?
32-bit data registers that store frequently used values / intermediate results
what are the A0-A6 registers?
address registers used as pointer registers in the calculation of operand addresses
what are A7 registers?
address registers used by the processor as a system stack pointer to hold subroutine return addresses etc.
what is CCR?
condition code register, register that contains flags indicating the status of the processor after arithmetic and logical operations
what is a status register?
16 bits (consists of two 8-bit registers),
what is the stack pointer used for?
as a pointer into the system stack
what is the system stack?
a LIFO structure that provides temporary storage of essential processor state
what is the PC?
program counter, keeps track of the address at which the next instruction will be found, incremented to point to the next instruction when the current instruction has been read
what is RTL?
register transfer language, used to describe the operations of a microprocessor as it is executing instructions
how is instruction fetching written in RTL?
[MAR] ← [PC]
[PC] ← [PC] + 1
[MBR] ← [MS([MAR])]
[IR] ← [MBR]
CU ← [IR(opcode)]
what is an advantage of using C?
you can work at the hardware-software interface and is compiled to assembler (the low level instruction set of the microprocessor)
how does assembly work?
uses easily remembered mnemonics for each instruction, allows memory locations and constants to be given symbolic names
what are advantages of assembly language?
allows memory locations and constants to be given symbolic names, a point in a program can be referred to by its name rather than a numeric address
what are the two aspects to the 68008 instruction set?
instructions, addressing modes
what are instructions in an instruction set?
the commands that tell the processor what operations to perform
what are addressing modes in an instruction set?
the ways in which the processor can access data or memory locations
what are the five categories of instructions in the 68008 instruction set?
data movement
arithmetic
logical
branch
system control
what form are 68008 assembler instructions written?
operation.datatype source, destination
where the operation can be
.b (byte)
.w (word - 2 bytes)
.l (long word - 4 bytes)
why do arithmetic instructions only operate on integers in the 68008 model?
it does not have hardware floating point support
what are logical instructions?
instructions that perform bit-wise operations on data and include AND, OR, NOT
what are branch instructions used for?
causes the processor to branch (jump/GOTO) the labelled address, can test the state of the CCR bits and branch if a certain condition is met
what are subroutines useful for?
frequently used sections of a program, reduces program size, improves readability, reduces repeated debugging
what happens during JSR (subroutine call)?
saves (pushes) the contents of the PC on the stack, puts start address of subroutine in PC
what happens during RTS (return from subroutine)?
restores (pops) the return address from the stack and puts it in PC, so the stack stores where to return from a subroutine
how does the stack allow for subroutines to call another subroutine?
has multiple return addresses on the stack in this case
what are addressing modes?
how we tell the computer where to find data it needs
where can systems data be located in the 68008 model?
in a data register, within the instruction itself, or in external memory
what does it mean for addressing modes to have expressive power?
they can provide data exactly, specify where data is, or specify how to go about finding data
what are the 5 types of addressing modes in 68008?
data or address register direct
immediate addressing
absolute addressing
address register indirect (5 variations)
relative addressing
how does data or address register direct work in 68008?
the address of an operand is specified by either a data register or an address register
how does immediate addressing work in 68008?
the operand forms part of the instruction and remains constant throughout the execution of a program
how does absolute addressing work in 68008?
the operand specifies the location in memory explicitly, meaning that no further processing required. does not use a # symbol
why does absolute addressing not allow position independent code?
a program will consistently use the same memory address