80 likes | 220 Views
Notes for Practical 6. Assembly Programming. Basic Arithmetic. Addition Add destination, source Subtraction Sub destination, source Multiplication Division. Addition. 10 + 6 = 16 mov ax, 10 add ax, 6 Java: ax = 10; ax = ax + 5;. Subtraction. 10 – 6 = 4 mov ax, 10 sub ax, 6
E N D
Notes for Practical 6 Assembly Programming
Basic Arithmetic Addition Add destination, source Subtraction Sub destination, source Multiplication Division
Addition 10 + 6 = 16 mov ax, 10 add ax, 6 Java: ax = 10; ax = ax + 5;
Subtraction 10 – 6 = 4 mov ax, 10 sub ax, 6 Java: ax = 10; ax = ax - 6;
Multiplication 4*5 = 20 mov ax, 4 imul 5 Java: ax = 4; ax = ax * 5;
Division 13 ÷ 5 ( = 2 remainder 3) mov ax, 13 idiv 5 ax would have the quotient value dx has the remainder value