Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
68Activity
0 of .
Results for:
No results containing your search query
P. 1
8086 Programming

8086 Programming

Ratings: (0)|Views: 3,765 |Likes:
Published by HariPriyan
This is an introduction to 8086 programming
This is an introduction to 8086 programming

More info:

Published by: HariPriyan on Oct 14, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

05/21/2013

pdf

text

original

 
 
 Introduction to 8086 Assembly Language Programming, Joe Carthy, UCD
1
Introduction to 8086 Programming
(The 8086 microprocessor is one of the family of 8086,80286,80386,80486,Pentium,PentiumI,II,III …. alsoreferred to as the X86 family.)Learning any imperative programming language involvesmastering a number of common concepts:
Variables
: declaration/definition
Assignment
: assigning values to variables
Input/Output:
Displaying messagesDisplaying variable values
Control flow:
if-thenLoops
Subprograms:
Definition and UsageProgramming in assembly language involves mastering thesame concepts and a few other issues.
Variables
For the moment we will skip details of variable declaration andsimply use the 8086 registers as the variables in our programs.Registers have predefined names and do not need to bedeclared.
 
 
 Introduction to 8086 Assembly Language Programming, Joe Carthy, UCD
2
The 8086 has 14 registers. Each of these is a 16-bit register.Initially, we will use four of them – the so called the generalpurpose registers:
ax, bx, cx, dx
These four 16-bit registers can also be treated as eight 8-bitregisters:
ah, al, bh, bl, ch, cl, dh, dl
Assignment
In Java, assignment takes the form:x = 42 ;y = 24;z = x + y;In assembly language we carry out the same operation but weuse an instruction to denote the assignment operator (“=” inJava). The above assignments would be carried out in 8086assembly langauge as followsmov x, 42mov y, 24add z, xadd z, yThe
mov
instruction carries out assignment.
 
 
 Introduction to 8086 Assembly Language Programming, Joe Carthy, UCD
3
It which allows us place a number in a register or in a memorylocation (a variable) i.e. it assigns a value to a register or variable.
Example
:
Store the ASCII code for the letter A in register bx.mov bx, ‘A’
 The
mov
instruction also allows you to copy the contents of one register into another register.
Example
:
mov bx, 2mov cx, bx
The first instruction loads the value 2 into bx where it is storedas a binary number. [a number such as 2 is called an
integer 
 constant]The Mov instruction takes two
operands,
representing
 
the
destination
where data is to be placed and the
source
of thatdata.
General Form of Mov Instructionmov
destination
,
source
 

Activity (68)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
abhi231594 liked this
abhi231594 liked this
sontakkeswapneel liked this
abhi231594 liked this
Ofentse Jabari added this note
This is pretty gud......thanx
Anshul Kirti liked this
Anshul Kirti liked this
Dan liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->