Assembly Language

• Entering the instructions using hexadecimal is quite easier than entering the binary combinations.

– However, it still is difficult to understand what a program written in hexadecimal does.
– So, each company defines a symbolic code for the instructions.
– These codes are called “mnemonics”.
– The mnemonic for each instruction is usually a group of letters that suggest the operation performed.

• Using the same example from before,

– 00111100 translates to 3C in hexadecimal (OPCODE)
– Its mnemonic is: “INR A”.
– INR stands for “increment register” and A is short for accumulator.

• Another example is: 1000 0000,

– Which translates to 80 in hexadecimal.
– Its mnemonic is “ADD B”.
– “Add register B to the accumulator and keep the result in the accumulator”.

• It is important to remember that a machine language and its associated assembly language are completely machine dependent.

– In other words, they are not transferable from one microprocessor to a different one.

• For example, Motorolla has an 8-bit microprocessor called the 6800.

– The 8085 machine language is very different from that of the 6800. So is the assembly language.
– A program written for the 8085 cannot be executed on the 6800 and vice versa.




“Assembling” The Program:

• How does assembly language get translated into machine language?

– There are two ways:
– 1st there is “hand assembly”.

• The programmer translates each assembly language instruction into its equivalent hexadecimal code (machine language). Then the hexadecimal code is entered into memory.

– The other possibility is a program called an “assembler”, which does the translation automatically.


Share this

Related Posts

Previous
Next Post »