You are on page 1of 99

Introduction to Assembly

Programming

By Aderaw S.
AAiT, Nov 2022

1
Out Line

2
Introduction

3
Advantages of Assembly
Language

4
Reasons for Using Assembly
Language

5
The Computer Organization –
INTEL PC

6
Conti….

7
8
9
10
11
Addressing Data in Memory

12
Conti…

13
Segment and Addressing

14
Conti….

15
Conti….

16
Segment Offsets

17
Conti….

18
i) Segment Register

19
Conti….

20
(ii) Pointer Registers

21
Conti….

22
Conti….

23
(iii) General Purpose Registers

24
Conti….

25
Conti….

26
Conti….

27
(iv) Index Register

28
(v) FLAG Register

29
Conti….

30
Instruction Format

31
Conti….

32
Conti….

33
Conti….

34
Conti….

35
Conti….

36
Conti….

37
Utilization of Instruction
Addresses

38
Addressing Mode

39
Conti….

40
Immediate Addressing Mode

41
Direct Addressing Mode

42
Indirect Addressing Mode

43
Register Direct Addressing Mode

44
Register Indirect Addressing Mode

45
Displacement Addressing Mode

46
Conti….

47
Displacement Addressing

48
Conti….

49
Stack Addressing Mode

50
Conti….

51
General Purpose Registers Conti…

52
53
54
Chapter One

Basics of MIPS Assembly

55
Modern Digital Computer

56
Byte =8 bits

57
Word

58
Machine Code

59
MIPS

60
In hex

61
The MIPS Processor

62
MIPS Registers

63
Modern Digital Computer

64
Byte-Addressable Memory

65
Words in Memory

66
Memory Organization

67
Endianness

68
Little endian

69
Big endian

70
The Machine

71
Let’s write a program in assembly.

72
First Reserve Room for the Message

73
Conti…

74
Conti….

75
Conti….

76
Conti….

77
Conti….

78
Assembling and Running our Program

79
Second Program

80
Where Should X,Y and SUM go?

81
Conti….

82
How do we input values to X & Y

83
First Reserve Room for Propmpt

84
Conti….

85
Reading in an Integer

86
Conti….

87
Conti….

88
Reading in X

89
Conti….

90
Conti….

91
Conti….

92
Conti….

93
Conti….

94
Conti….

95
Print the Out put

96
Conti….

97
Conti….

98
99

You might also like