0% found this document useful (0 votes)
5 views

Chapter-6 Assembly Language Programming

Chapter 6 discusses assembly language programming, focusing on machine code instructions recognized by the CPU. It explains the structure of machine code, including opcodes and operands, and highlights the differences in instruction sets across various processors. The chapter emphasizes the importance of defining specific parameters for each machine code instruction, such as bit allocation for opcodes and operands.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Chapter-6 Assembly Language Programming

Chapter 6 discusses assembly language programming, focusing on machine code instructions recognized by the CPU. It explains the structure of machine code, including opcodes and operands, and highlights the differences in instruction sets across various processors. The chapter emphasizes the importance of defining specific parameters for each machine code instruction, such as bit allocation for opcodes and operands.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

CHAPTER-6

ASSEMBLY LANGUAGE PROGRAMMING


Machine code Instructions

 The only language that the CPU recognises is machine code.


 Machine code consists of a sequence of instructions.
 An instruction contains an opcode.
 An instruction may not have an operand but up to three operands are possible.
 Different processors have different instruction sets associated with them.
 Different processors will have comparable instructions for the same operations, but the
coding of the instructions will be different.
 For a particular processor, the following must be defined for each individual machine
code instruction:
• the total number of bits or bytes for the whole instruction
• the number of bits that define the opcode
• the number of operands that are defined in the remaining bits
• whether the opcode occupies the most significant or the least significant bits.

Opcode and Operand

 Opcode defines the action associated with the instruction.


 Operand defines any data needed by the instruction.
 Machine code instruction is a binary code with a defined number of bits that comprises
an opcode and, most often, one operand.
 For example, ADD 234 is a machine code instruction, where ADD is the opcode
Past question papers with answers

You might also like