0% found this document useful (0 votes)
99 views3 pages

Program-encoding-Assembly Technique

By mir wasiq

Uploaded by

jk716773
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
99 views3 pages

Program-encoding-Assembly Technique

By mir wasiq

Uploaded by

jk716773
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Computer Organization and Assembly language

Department of CS/IT HU

Program encoding

Program encoding in assembly language is the process of converting assembly language


instructions into machine code, which is made up of zeros and ones. Here are some things to
know about assembly language encoding:

• Different encoding methods

Different types of instructions have different encoding methods. For example, RR


format instructions involve two registers, while RX format instructions involve a
register and a D(X, B) address.

Op code

Each instruction has an op code that identifies it, and this is always the first byte in the encoded
instruction.
Mnemonics

Assembly language programs use mnemonics for each machine level instruction, such as ADD,
SUB, and MOV.
Assembler

An assembler program converts assembly language programs into machine code. The assembler
assigns binary values to memory locations and instruction op codes.
Assembly language is a low-level programming language that was commonly used in the early
days of computing. Today, it's more common to use small amounts of assembly language code
within larger systems that are written in higher-level languages.

Encoding Real x86 Instructions

• It is time to take a look that the actual machine instruction format of the x 86 CPU
families.
• They don't call the x86 CPU a Complex Instruction Set Computer (CISC) for nothing!
• Although more complex instruction encodings exist, no one is going to challenge that the
x86 has a complex instruction encoding:
3. X86 Instruction Format

• Another view of the x86 instruction format:


4. The x86 opcode bytes are 8-bit equivalents of iii field that we discussed in simplified
encoding.

• This provides for up to 512 different instruction classes, although the x86 does not yet
use them all.

You might also like