Assembly Language Programming – 16 bit processing

[8086] In the code examples so far, we have separated out the coded instructions from the data. Modern processors like the 8088 have separate registers which deal with each section of a program.


	CS and IP = instructions
	DS, BX, SI= data 
	ES, BX, DI= extra data 
	SS, SP, BP= stack

In writing programs for modern processors like the 8088, the program is structured with a minimum of three sections, called SEGMENTS. The three segments represent the CODE, DATA and STACK areas of the program. Information within each segment is accessed differently depending upon the segment type. To access data in the stack segment requires the use of the SS, SP and or BP registers. The following diagrams illustrates how information in the stack and data segments are accessed.

 

Special assembler directives are used to specify the different segments

Continue reading “Assembly Language Programming – 16 bit processing”

Advertisements