

















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


















































Computer Science 217: Introduction to Programming Systems
C Language
Assembly Language
Machine Language
Application Program
Operating System
Hardware
language levels tour
service levels tour
ands wzr, w0, # beq else
b endif else:
endif:
asr w0, w0, 1
add w2, w0, w add w0, w0, w add w0, w0, 1
add w0, w0, #
loop: cmp w0, 1 ble endloop
b loop endloop:
mov w1, 0
Control Unit
Registers
ALU
Conceptually: large array of bytes (gigabytes+ in modern machines)
Instructions are fetched from RAM
Control Unit
Registers
ALU
Small amount of storage on the CPU (tens of words in modern machines)
ALU (arithmetic+logic unit) instructions operate on registers
x0 (^) w
63 31 0
x1 (^) w
x29 (FP) (^) w x30 (LR) (^) w
xzr (all zeros) (^) wzr sp (stack pointer)
pc (program counter)
n z c v pstate
n z c v pstate