
For example ORG 0000h tells the compiler all subsequent code starting at address 0000h.ĭB (define byte): The define byte is used to allow a string of bytes. This is used to set the register address during assembly. ORG (origin): This directive indicates the start of the program. Follow the given rules to write programming in assembly language. The assembly language is made up of elements which all are used to write the program in sequential manner.

8051 Microcontroller Programs in Assembly Language Microcontrollers contain several types of registers that can be classified according to their instructions or content that operate in them. If we want to manipulate data to a processor or controller by performing subtraction, addition, etc., we cannot do that directly in the memory, but it needs registers to process and to store the data. The 8051 assembly language programming is based on the memory registers. 8051 Microcontroller ArchitecutureĪ Register is the main part in the processors and microcontrollers which is contained in the memory that provides a faster way of collecting and storing the data. The 8051 microcontroller consists of RAM and ROM memories to store instructions.

The microcontroller requires a program to perform the operations that require a memory for saving and to read the functions. The 8051 microcontroller is the CISC based Harvard architecture, and it has peripherals like 32 I/O, timers/counters, serial communication and memories.
