Basic Assembly Instructions

Learning Computer Architecture · 3:41

Listen on 93

Lyrics

[Verse 1]
When data needs to travel from memory to register space
MOV instruction copies, puts values in their place
From source to destination, it's the fundamental flow
MOV EAX from memory, watch the registers grow

[Chorus]
MOV to move and copy data
ADD to sum and calculate
SUB to find the difference
CMP to compare and validate
These four commands are building blocks
Assembly's foundation rocks
MOV ADD SUB and CMP
Core instructions you need to see

[Verse 2]
ADD takes two operands and puts the sum inside
First plus second operand, no need to divide
Register plus immediate or memory location
Addition is the heartbeat of computation

[Chorus]
MOV to move and copy data
ADD to sum and calculate
SUB to find the difference
CMP to compare and validate
These four commands are building blocks
Assembly's foundation rocks
MOV ADD SUB and CMP
Core instructions you need to see

[Verse 3]
SUB subtracts the second from the first operand
Minuend minus subtrahend, now you understand
Flags get set when overflow or zero is the case
Status register tells you what happened in this space

[Bridge]
CMP compares without changing operands at all
Sets the flags to tell you if numbers rise or fall
Zero flag for equal, carry flag for less than
Sign flag shows negatives in your program's plan

[Chorus]
MOV to move and copy data
ADD to sum and calculate
SUB to find the difference
CMP to compare and validate
These four commands are building blocks
Assembly's foundation rocks
MOV ADD SUB and CMP
Core instructions you need to see

[Outro]
Master these four operations first
They're the foundation, quench your thirst
Every complex program starts this way
MOV ADD SUB CMP every day

← Registers and Memory Addressing | Control Flow and Branching →