Slide 1

Slide 1 text

~The Assembly~ directly controlling CPU kumaGoro

Slide 2

Slide 2 text

OutLine 1. What is the Assembly Language? 2. Its features 3. The benefit using the Assembly

Slide 3

Slide 3 text

1. What is the Assembly Language?

Slide 4

Slide 4 text

In Simple Words... The most nearest language to “Machine Language” 
   ・The LG to control CPU ・Written in Bytecode(10010...)

Slide 5

Slide 5 text

2. How this language works?

Slide 6

Slide 6 text

The features 1. Control CPU by yourself 2. One Line, One Instruction 3. It differs from the type of CPUs  

Slide 7

Slide 7 text

1. Control CPU by yourself If we do “20 + 30” in Java… int result = 20 + 30; I save it in the Address No.xx in the memory. → Computers automatically choose the Address for the result.

Slide 8

Slide 8 text

How about the Assembly?

Slide 9

Slide 9 text

“Registers” & “Main Memory” A data storage outside the CPU A small storage inside the CPU ↓ ↓

Slide 10

Slide 10 text

I want to add 20 to 30... When people use the Assembly...

Slide 11

Slide 11 text

I put 20 on “eax” & 30 on “ebx”! 20 30 When people use the Assembly...

Slide 12

Slide 12 text

CPU, please do calculation! 20 30 Answer is 50!

Slide 13

Slide 13 text

I want to store the result... = 50 → Coder must control CPU by yourself! I put on the Address No.1!

Slide 14

Slide 14 text

The features 1. Control CPU by yourself 2. One Line, One Instruction 3. It differs from the type of CPUs  

Slide 15

Slide 15 text

2. One Line, One Instruction Instruction? Loading data Adding numbers Copying data

Slide 16

Slide 16 text

2. One Line, One Instruction int x = 10 + 20; Looks like 1 Instruction...

Slide 17

Slide 17 text

2. One Line, One Instruction int x = 10 + 20; ↑ putting number on the memory adding numbers ↓ Several Instructions! Initializing the variable ↓

Slide 18

Slide 18 text

How About Assembly…? mov eax , 10 ↑ Opecode (Instruction) ↑ Operand(target of Instruction) (Address,Data)

Slide 19

Slide 19 text

”0011” ⇔ ”LD” called “Mnemonic” Simply replacing! Machine Code ⇔ Assembly ex) Loading Data Instruction

Slide 20

Slide 20 text

How About Assembly…? xor eax, eax xor ebx, ebx mov eax, 20 mov ebx, 30 add eax, ebx ← Initializing register “eax” ← Copying 20 to “eax” ← Copying 30 to “ebx” ← Adding eax(20) to ebx(30) One line, One Instruction! ← Initializing register “ebx” “20 + 30”

Slide 21

Slide 21 text

The features 1. Control CPU by yourself 2. One Line, One Instruction 3. It differs from the type of CPUs  

Slide 22

Slide 22 text

3. It differs from the type of CPUs Intel AMD etc...

Slide 23

Slide 23 text

But, Why? A, Opecodes & Types of Registers differs from the type of CPUs → There are more 50 types of Assembly!

Slide 24

Slide 24 text

3. The benefit Using Assembly

Slide 25

Slide 25 text

The assembly is... ・ Coder have to think about Registers & Memory ・ In addition, they have to write instructions one by one   → Really inconvenient!    Why people use the Assembly?

Slide 26

Slide 26 text

Why people use the Assembly? A. “High Speed Processing” 

Slide 27

Slide 27 text

For What purpose is the Assembly used? ● in the past… Used for Computers(CPUs of these days were low-spec ...) ● Now... Used for IoT! (Many electrical appliances have microcomputers) → I thought the Assembly is old-fashioned,         but still necessary for innovation!

Slide 28

Slide 28 text

Thank you for listening!