CP0675 03-May-2012 RM02
CP0675 03-May-2012 RM02
CP0675 03-May-2012 RM02
Memory
4095
CPU
A Simple Machine
0000 0000 0000 0000 0000 0010 0000 0000 0100 0000 0000 0110 0000 0000 1000 0000 0000 1010 0000 0000 1100 0000 0000 1110 0000 0001 0000
0001 0000 0000 1100 0011 0000 0000 0000 0001 0000 0000 1110 0101 0000 0000 0000 0010 0000 0001 0000 0000 0000 0000 0000 0000 0001 0101 1110 0000 0000 0110 0000 0000 0000 0000 0000
Load the contents of location 12 in AC Move contents of AC to DR Load the contents of location 14 into AC Add DR to AC Store contents of AC in location 16 Stop Data value 350 Data value is 96 Data value is 0
16
15
AH BH CH DH SI DI
7
AL
0 BL CL DL
SP BP CS SS DS ES FS GS
IP
31
E Flags
16
15
Flags H Flags L
3.6 Summary
A machine language is a collection of the machine instructions represented in 0s and 1s. Assembly language provides easier to use symbolic representation, in which an alphanumeric equivalence to machine language is used. An assembler is a program that accepts a symbolic language program (source program) and produces its machine language equivalent (target program). Programming in assembly can result in machine code that is smaller and faster than that generated by a compiler of a high level language.
3.6 Summary
Assembly programmers have access to all the hardware features of the target machine that might not be accessible to high-level language programmers. In addition, learning assembly languages can be of great help in understanding the low level details of computer organization and architecture. In this chapter a general overview of assembly language and its programming was provided. The programmer view of the X86 Intel microprocessor family of processors was also introduced as a real world example.