Featured Post

80186 Microprocessors: Introduction and Architecture

Hello friends, today we are going to discuss the 80186 microprocessor with integrated peripherals. The Intel 80186 is an improved version of the 8086 microprocessor. 80186 is a 16-bit microprocessor with a 16-bit data bus and a 20-bit address bus. It has a programmable peripheral device integrated into the same package. The instruction set of the 80186 is a superset of the instruction set of the 8086. The term super-set means that all of the 8086 instructions will execute properly on an 80186, but the 80186 has a few additional instructions. The following figure shows the block diagram and pin diagram of 80186. The CPU is divided into seven independent functional parts. 80186 internal block diagram  80186 68-pins pin diagram  Functional parts of 80186 Microprocessor The Bus Interface Unit (BIU) Execution Unit (EU) Clock Generator Programmable interrupt controller Programmable Chip Select Unit (CSU) Programmable DMA Unit Programmable counter/timers The Bus Interface Unit

Assembly Language Programming

Hello friends, today we are going to see the structure of assembly language programming. An assembly language often abbreviated asm is a low level programming language in which very strong cooperation between the instruction and the machine. It depends on the machine code instructions, and every assembler, the translator has its own symbolic machine code. It has six fields to write program: Memory Address, Machine Code, Opcode, Operands, and Comments. These are as follows. 

Memory Address: These are 16-bit addresses of the user memory in the system, where the machine code of the program is stored. The beginning address shown as in the format “XX00”; the symbol XX represents the page number and 00 represents the line number.


Machine Code: Also called as instruction code. These are the hexadecimal numbers represents instructions that are stored in the respective memory addresses.

Label: A label is a symbol or group of symbols used to represent an address of specific statement. Labels are usually followed by a colon. Labels are not required in a statement; they are just inserted where they are needed.

Opcode (Operation Code): An instruction is divided into two parts: Opcode and Operand.  Opcode are the abbreviated symbols to indicate the type of operation or function that will perform by the machine code.

Operand: The operand field of the statement contains the 8-bit or 16-bit data, the memory address, the port address, or the name of the registers on which the instruction is to be performed.
An instruction, called a mnemonic or mnemonic instruction is formed by combining Opcode and Operand.  A mnemonic is just the letters which are usually initials or a shortened form of the English words for the operation performed by the instruction. For example, the mnemonic for subtract is SUB, the mnemonic for exclusive or is XOR, and the mnemonic for the instruction to copy data from one location to another is MOV.

Comments: This field is not become a part of the program, it simply a part of the proper documentation of a program to explain or remind of the function that this instruction or group of instructions performs in the program. These are separated by a semicolon (;) from the instruction on the same line.
The statement format and example are as follows.

Memory Address (Hex)
Machine Code (Hex)
Label
Opcode
Operand
Comments
2000
06
START:
MVI
B, 37H
; Load register B with data 37H
2001
37




2002
78

MOV
A, B
; Copy data from register B in to A
2003
D3

OUT
PORT 1
; Display accumulator (A) contents
2004
PORT 1



; (37H) at port1
2005
C3

JMP
START
; go back to the beginning and read the data 37 H again
2006
00




2007
20





For further information please see Microprocessors related topics:

Comments