assembly

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/34

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

35 Terms

1
New cards

2 parts of a CPU

datapath + control unit

2
New cards

2 parts of a datapath

ALU + registers

3
New cards

purpose of control unit

  • sends signals to CPU components

  • determined based off PC and status register values

4
New cards

what is a word

addressable cell of fixed size

5
New cards

how is RAM measured

length x width

  • length is number of words

  • width is how many bits in a word

6
New cards

2 methods of connecting I/O to CPU

  1. memory mapped: devices act like memory from CPU POV with its own address in memory

  2. instruction mapped: CPU has specific instructions for the device

7
New cards

what is a bus

array of wires simultaneously converting 1 bit along 1 line

8
New cards

2 types of buses

  1. point to point: connect 2 components

  2. multipoint: connect many components (data bus)

9
New cards

functions of data, control and address lines

data line: convey bits from one component to another

control line: choose direction of data flow + when devices can access the bus

address line: choose data source + destination location

  • one way

10
New cards

equation for cpu time to run a program

T = seconds/program = instructions/program x avg cycles/instruction x seconds/cycle

11
New cards

MARIE specs (6)

  • twos complement binary

  • von neumann (fixed word length data + instructions)

  • 16 bit word size, 16 bit instructions (4 opcode, 12 address)

  • 16 bit ALU

  • 7 registers

12
New cards

ACC

holds data to be processed

  • 16 bit

13
New cards

MBR

holds data just read from memory/to be written to memory next

  • 16 bit

14
New cards

IR

holds instruction just before execution

  • 16 bit

15
New cards

MAR

holds memory address of data being referenced

  • 12 bit

16
New cards

PC

holds address of next instruction to be executed

  • 12 bit

17
New cards

IN

holds data read from input device

  • 8 bit

18
New cards

OUT

holds data to be written to output device

  • 8 bits

19
New cards

which registers are the 2 special bus connection in between in MARIE

  • AC + MBR

  • ALU + AC + MBR

20
New cards

load X

loads contents of address X into AC

  • MAR ← X

  • MBR ← M[MAR]

  • AC ← MBR

21
New cards

store X

stores contents of AC at address X

  • MAR ← X + MBR ← AC

  • AC ← MBR

22
New cards

add x

adds contents of address X to AC

  • MAR ← X

  • MBR ← M[MAR]

  • AC ← AC + MBR

23
New cards

subt X

subtracts contents of address X from AC

  • MAR ← X

  • MBR ← M[MAR]

  • AC ← AC - MBR

24
New cards

input

inputs into AC

  • AC ← InREG

25
New cards

output

outputs value in AC

  • AC ← OutREG

26
New cards

skipcond

skips next instruction

  • if IR[11 - 10] = 00 and AC < 0 then

    • PC ← PC + 1

  • else if IR[11 - 10] = 01 and AC = 0 then

    • PC ← PC + 1

  • else if IR[11 - 10] = 10 and AC > 0 then

    • PC ← PC + 1

27
New cards

jump X

load X into PC

  • PC ← X

28
New cards

FDE cycle

  1. fetch from memory

  • address from PC —> IR

  • instruction from MAR —> IR

  • increment PC

  1. decode

  • address put into MAR

  • if operand uninvolved put in MBR

  • else data in MAR —> MBR

  1. exectute

29
New cards

6 step interrupt processing

  1. store register data in memory

  2. look up ISR address in interrupt table

  3. place ISR address in PC

  4. execute ISR instructions

  5. restore registers data

  6. resume FDE

30
New cards

maskable/non-maskable interrupt

maskable: interrupts ignored while another interrupt is running

non-maskable: must be processed to keep system stable ssmblera

31
New cards

assembler process

  • create object program file from source code

  1. assembler assembles as much as possible while building symbol table with memory references for symbols

  2. instructions completed using symbol table

32
New cards

AddI

MAR ← X

MBR ← M[MAR]

MAR ← MBR

MBR ← M[MAR]

AC ← AC + MBR

33
New cards

JnS

MBR ← PC

MAR ← X

M[MAR] ← MBR

MBR ← X

AC ← 1

AC ← AC + MBR

PC ← AC

34
New cards

JumpI

MAR ← X

MBR ← M[MAR]

PC ← MBR

35
New cards

clear

AC ← 0