0% found this document useful (0 votes)
12 views25 pages

Adobe Scan Manual

The document outlines the practical aspects of microprocessor programming, focusing on assembly language tools and debugging techniques. It includes instructions for using various registers, memory locations, and assembly commands, along with a list of resources and precautions for students. Additionally, it provides a framework for assessment based on performance indicators related to the creation and debugging of assembly language programs.

Uploaded by

Om Mundlik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views25 pages

Adobe Scan Manual

The document outlines the practical aspects of microprocessor programming, focusing on assembly language tools and debugging techniques. It includes instructions for using various registers, memory locations, and assembly commands, along with a list of resources and precautions for students. Additionally, it provides a framework for assessment based on performance indicators related to the creation and debugging of assembly language programs.

Uploaded by

Om Mundlik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

Maharashtra XIII XII Microprocessor

(22415)
Observeand 2)
DebugTD
or .XNJAdauis....J..
Observations
.(G.G.B..RSm.
1) (Additional)
Resources
used h. g. Type f. C.
State Instruction
register Segment
Register Purpose
General Observe Observethe press
Finally, to the Once
CS:0004
CS:0005 CS:0001
CS:0002
CS:0003 Address
CS:0000
Pointer
Stack Base Register
Pointer Index
Board
registers Types createcommand
Table Enterfilename.obj tlinkor the
of write and type
filename assembly
Technical
2: write contents Key
the debug prompt
Contents to .exe
Education contents the debug language
BAD20 BBS48 IP CS SS ES SP BP DI SI DXOOO0
CX BXAX contents
filename.exe
of and
DSSD Table registers, ile.
Contents of Registers your
of
tlink press
memory 2 1: of program
memory
locationin 489 program filename Enter
8 Contents
Register memory or
AD td
location D filename.exe Key is
Auxiliary
Carry
Flag step oncreated,
of
using location to
Direction
Flag Flag Overflow
Interrupt Flag Registers by command create
CS:000D
CS:000C CS:000A
CS:000B Address
CS:0008
CS:0009 in Parity
Flag Flag Flag
Sign Zero Carry
Flag
Code debugger step. then
Segment
using
Code used on
filename.obj
Register
Flag the prompt typc
Segment and
TD command tasm
status
Buoq or and
Contents Debug filename.asm
file
DF IF AF PF OF SF ZF CF of press
flags. prompt
debugger Enter
and on
Key
9
Microprocessor (22415)

CS:0006 CS:000E
CS:0007 CS:000F

3) Observe and write the contcnts of nncmory location in Data Segmcnt


TD or Debug using dcbu
Table 3: Contentsof memory location in DataSegment
Address Contents Address
DS:0000
Contents
DS:0008
DS:0001 DS:0009
DS:0002 DS:000A
DS:0003 DS:000B
DS:0004 DS:000C
DS:0005 DS:000D
DS:0006
DS:000E
DS:0007 DS:000F

XIV Practical related Questions


Note: Below given are few sample questions for
more such questions to ensurethe reference. Teachers must des
achievement of identified Co.
1. Write the assembly language
tools used in your lab in Table 4.
Table 4: Tools Used
Sr. No. Tools Used
Name of Tool Version
Editor
2 Assembler
3 Linker TÔSm
4
Debugger
2. List the files
extensions that are created by the Assembler used.

u..aSEnblet.usad..ae.
.:.GBE...
3. List the files
extensions that are crçated by the Linker used.

.ka..e...SsS..hot.ar.e.
Sinatd.a..L.àas..Se..cA.
Maharashtra State Board of Technical Education
Microprocessor (22415)

Syntax & Operation:


2. ADD <DEST>,<SRC>
Destination - destination t sourcc
3. ADC<DEST>,<SRC>
Destination destination + source + CF
SUB/SBB destination, source
The SUB instruction is used to subtract the data in source from thedata in destination
and the stores result in destination. The SBB instruction is used to subtract the source
operand and the barrow [CF, which may reflect from the result of the previous
operations, from the destination operand, and the result, is stored in destinaion
Operand. Source must be a register or memorv location or immediate data and the
destination must be a register or a memory location. The destination operands should
not be an immediate data and the source and destination both should not be memory
operands.
Flag affected: OF, CF, PF, AF, SF, and ZF.
Syntax & Operation:
1. SUB <DEST>,<SRC>
Destination - destination - source
2. SBB <DEST>,<SRC
Destination - destination - source -CF

VII Work Situation:


a. Facuty willdemonstrate the use of assembly language programming tools to write
and execute the program.
b. Faculty must form a group of two students.
programming tools to write and
C. Students group will use the assembly language
execute the programs.

IX Resources required (Additional)

Sr. Instrument Quantity Remarks


Specification
No. /Object/Software
Hp LAPfoP
2. spCafcotign s Procesor
3. Windows Windows )
4. eenSoftorel emuo86
5

X Precautions to be followed
1. Handle computer system and peripherals with care.
2. Shut down PC properly

XI Procedure
a. Write algorithm and draw flowchart for given program (Use blank space provided
or attach more pages if needed)
b. Double clik on DOSBOX TASM 1.4 icon.
C. Type edit filename.asm on DOS prompt and press Enter Key

Maharashtra State Board of Technical Education 13


Maharashtra

XI
State 2) XII
debugger
Observe
Board IP CS SS ES DS T Observations: 1)
(AdditioFal)
Resourcesused h. g. f. e. d.
ofTechnical
TDand
or
SP BP DI SI DX CX

HLP.Laptne.BX
.).
1:Contents
. pOCESSaDI.
AX execution
Tableprogram.
of
Observe

and
Observe pressFinally,createtoTypc the Once Type
Enter
type
the filename
comitl1nkmand the the
Debug write assemblprogram
y
Education OoDO After
Registers
rite flename.objprompt
contents Keydebug
the to
after the debug ee and
contents o|0 of
filename.
of language
and
the Registers contents file. or save
O71) rg1sters, your tlink press
execution exe on
of Before of program or program
filename Enter disk.
memnory after
Register nemorydfileame
of the Key is
step creattoed,
on
program. Addition using location
location Auxiliary
CarryFlag hycommand
Direction
Flag Flag OverflowFlag
Interrupt Parity
Flag step ee crcate then
FlagCarry
SiFlgang Zero Flag debugger used on
in Register
Flag Two
of
and
filename.obj
the prompt type
Code command Tasm
16-bit TD status
or
and
press/ilenaw.
Segment tile
DF IF AF PF OF SF ZF CF numbers Debug of
flags. prompt
after Lnter aSIn
14 using and
Key on
the
Code )SubtractioA
data DUtpt-
NU)
Code )ditior
"dota
Sub
ad,blmov mov
uoa endends az,
addoa
adnum dsa mov aa,mov resuA
edata resu
dsdot
a,OumI mov movaz aa,
moY
RESULTNUM2
lt
db
db d
of of
w two
? ?
two OODO_ b 24oh

iG-bt

g-bitt
Dumbers
numberS

i
output ecode
"mdelSnal
OSubtactuon
endeods. ab
result, moN SuOa dat
nestdw
MoVaa
@dato
ds,movae

RESULT

dwdw PESULT
NUT2

Sob of

2
s-bit

oumbers
(Date

Maharashtra
...ca.. .aLa..
...r.AOd.A...aNA... IV
AN..a.K..data. jcropr0CCSSOr
(22415)
..adaa..
Dd....Qd.M.2.
...N..N.cS.aa.
d.Atia..st.to..k..umaers. Program 3)
State ..Qu).J..d.a...Ao.
AA...ad.aUM.
..DAAQ..s....aa.a.
..eS.t.a... Observe
debugger Table
Board DS:0007 DS:0005
DS:0006 DS:0004 DS:0002
DS:0003 DS:0000
DS:0001 Address CS:0007
CS:0006 CS:0003
CS:0005
CS:0004 CS:0002
CS:0001
CS:0000
Address
Code Table 2:
of TD and Contents
Technical with 3: or
write
Contents Debug
comments of
Education Contents the memory
Contents

of contents
memory
location
of
location memory in
CS:000C
CS:000D
CS:000E
CS:000F CS:000A
CS:000B CS:0009AddressCode
CS:0008
DS:000FDS:000D
DS:000E DS:000CDS:000A
DS:000B DS:0008
DS:0009 Address
in location Segment
Data

Segment
in
Contents
Data
Contents

Segment

uslng

15
Maharashtra
XVI XV Microprocessor
(22415)
...Ct.e.
..c..Et..NS.
.dinetiwe.. Write 3.
StACtco.h...d.saAa...a..
ot.tl.isesNe. Practical 2. 1. (Note:Results Qutt...
State

Board
.belad..R..asha..p.agI.sa...
additia..acdd.aabz.Jadd.a.A.ad..
Write Writemorefor
Note:
addition
subtraction.and

of
directives
assembler the the suchBelowrelated
Write
(Output Ends.
command
Technical and command
questionsgiven BEANLI...aNh.
an..NM...0.N.
.NLMR......e.t.
Output of
subtraction. Questions
the
Education line are
line tofew Program)
ofprogram
ensure
used ..sua.ad.s.a.... ..QE..ae..pA.aN..
used
used
sample
in to
generate tothe
the assigned
create
achievement
questions
program.
.exe assembly by
for teacher)
file of
of reference.
identified
language
assembly

programTeachers
CO.
language
for must
progra addition desipr
16
Maharashtra Exercise
XVII.
Microprocessor
(22415)
.....NA.del...aCOa...
.COd.e.
..ad.t.an..o..tua..32.b.ac..
..cdata. A.:.SaCt..a£........ .......

d,..a.3ASSAASh.. .QAM.be.ns. .S.Sta.tus....ot.laS...


.aa..atc. 2. 1.Faculty
Note:
must
..ESul.t.dd....
.a..CssA....
c,...A.MRCREEN.h..
State Write codeWritc
(Use
Board MØVAL,99
ADDAL, 01 blank
an the
of ALP
Technical contentspace
t..a.Status. for
providedensure
DE.Q. addition of
Education
AL
that
......... (Spacefor register for
of
two answers every
32 and group
answers) bit
status or
numbers. attach of
students
of
flags more
afterpages use
different
execution if
needed)
input
of
following value.

17
Microprocessor (22415) Microprocessor (22415)

MAM.dda.aa.
.A.cak.ard.pt..oUM. XVIII. References / Suggestions for further Reading
MON..O.z.ad.pt...n.Q.. https://www.elprocus.com/8086-assembly-language-programs-explanation/
2. http://mysc.altervista.org/beginners-guide-8086/
3. https:llwww.tutorialspoint.com/assembly_programming
add.a.aaz.
.mON.AOA..t..nGS.A.s. Assessment Scheme
.ma.caAmlO.pt.DAM.... XIX.

MAN.hx.aRK..p..NNNa.k.a. Performance Indicators Weightage


Process related (35 Marks) 70%
.saa..caS. 2.
Use editor to create assembly language program file
Use assembler and linker to create .exe file
10%
20%
3. Use debugger in single step mode to locate/trace the 40%
erTOrs and correcting the errors
Product related (15 MarkS) 30%
...NCA..
...daw.Q..NA.lard.pt.eSUt4.. 4. Practical related questions 10%
5 Completion and submission of practical in time 10%
6 Expected Output/Observation 10%
ends.. Total (50 Marks) 100%

List of student Team Members


1.

.NN.TA......SS.8.h.. 3

NL.MA...n DELb... 4

BESULI.3569....

Marks Obtained Dated signature of


Teacher
Process Product Total
Related(35)| Related(15) (50)
2
33

} Maharashtra State Board of Technical Education 19


Maharashtra State Board of Technical Education
Microprocessor (22415)

Flag affected by an instruction: OF, CF and PE, AF, SE, ZF are undefined.
Operation
(a) If source is byte then AX - AL x unsigncd 8 bit sourcc.
(b) If source is word then DX: AX 4- AX x unsigncd 16 bit source.
Examples
MUL DL Multiply AL by DL, result in AX.
MUL BX Multiply AX by BX,result in DX:AX.
IMUL source
IMUL instruction is used to multiply a signed byte/word from source with a signed
byte/word in the AL/AX register. Thc source must be a register or a memory location.
When abytc is multiplicd with the byte in AL, then the result is stored in AX because
the result of multiplication is maximum 16 bits. When a word is multiplicd with the
word in AX, then the MSB result is stored in DX and LSB in AX register because the
result of multiplication is maximum 32-bits. If the magnitude of the product does not
requires all the bits of the destination, the unused bits are filled with the copy of the
sign bit.
Flag affected by instruction: OF, CF and PF,AF, SF, ZF are undefined.
Operation
(a) If source is byte then AX - AL X
signed &bit source.
(b) Ifsource is word then DX: AXAX x signed 16 bit source.
Examples
IMUL DL Multiply AL by DL, result in AX.
IMUL BX Multiply AX by BX, result in DX: AX.
Example of multiplication of signed byte with signed word
MOV BX, multiplier Load signed word multiplier in BX.
MOV AL, multiplicand Load signed byte multiplicand in AL.
CBW Convert Byte to Word i.e. extends sign of AL into AH.
IMUL BX Word multiplies, result in DX: AX.

VIII Work Situation:


a. Faculty willdemonstrate the use of assembly language programming tools to write
and execute the program.
b. Faculty must form a group of two students.
C. Students group will use the assembly language programming tools to write and
execute the programs.

IX Resources required (Additional)

Sr. Instrument Specification Quantity Remarks


No. /Object/Software
CoCnpUter
1. HPLaptop
2. SpeafottonliS, leGB
3. WidowG
4. Soware enu K0Z6
5.

Maharashtra State Board of Technical Education 21


X
Maharashtra
Observations
XIII
XII
XI
Microproces(s2or415)
execution
program.of
Observe (Additional)
Resourcesused h. g. f. e. d. C. b.Procedure
a. PrShuteHandlcaut2.ei1.ons
State

Board
IP CS SS ES DS SF BP DI

MN..AP.ia.dosa.
S DX CX BXAX
KRaRa.
. . .6iS.G. B.r.ABLESa.
G.a. and
Finally, toType the Once Type TypeDoublprovie ded Write
Observe press
Enter
type
createcommand the the edit
tlink clikalgorior
thm
down
computPCer to
Technical
of
write filename.exe assemblprogram
the y sm atontach
contents Key filename.promptfilename.aDOSBOX
be
Registers
After
the debugfilename.etoxe properly fol owed
Education debug obj language
and more and system
contents of file. orand save on pages draw
o700O700
Table registers, your and
tlink press DOS TASM
on
Before
1:
Contents Register
of
program filename Enter
or
program disk. fl1.o4 w-chart
prompt needed)
if peripherals
memory td icon.
Key is
filename.step exe creattoed,
on and for with
Flag Auxi
Direction lCariaFlryrayg
Flag OverflowFlag
Interrupt of using location press
Parity
Flag FlagCarry
SiFlgang Zero Flag Registers by command create given care
Register
Flag debugger step. then Enter
on
used flename.obj
the prompt type
Key
program
and tasm
statuscommand
TD
or and bl(Uasenk
press filename.
DF IF OF
AFPF SF ZF CF file
Debug of
flags. prompt
after
Enter asm
and Key on spac
th >mode)
SOal)
Utputti
NuI "Code )
data " Mu
enderes-
msda
reslswas mov mor mulbx dsax
ba,Uma moyres-msw
movaz
mo daa res-
dwlsw
2 tiplicotion
res-lw
res-mSw
O00O h SUM 2

dw
of
20h goh e
l6-bitunsigned

Date| Puge No

oumbers
MicroprOces(2s2415)or

output:
omuiplicotio
"model
datasmalnumbers
}
Code "

endends MOV b,DuM


MONimul bx
res-
res-lsw duw 2 Dum /Progromcode
res-lewNume h res-MSwd
OEEOO res-lSW,dZ mov MOVae
ds,amov
Dumdw-goh
msw dw
OFF70 h Qdata dw +20
2 of
h
tuo
Sigoed
Maharashtra -XVI XV
XIV
1. Practical Results ..Aad.e.aAA..
..S.gaEd..QumbRrS.. Program MicroprOLl
.yeis........aOL...ORIAka.
.QJtpt..of.a.caaoJe.sa
..

signed more Q.agsAl.cadc.oa...Mu.tipl.iatia.a..n.s-brt


........ .

..R.A....
State
numbers.
Board
Write Below
Note:
.nAN.aaOdta.
.MOX...GlsM..
..AaN...SJlt.a.
..maN.kad.,.s.l.
..MAN..a.d..
the such related
(Output
ends
.hs..data.
end ..ZSA..d....
Gad.c.....
..DAGa..dk..9.. DS:0007
DS:0006
DS:0005 DS:0003
DS:0004 DS:0002
DS:0001
.9U.M2m...RA..
maN.saaA.. Code DS:0000
Address
Table
of
Technical names
questions
given
Questions NUM.......h. of with
2:
of are program) comments Contents
Education
result to
ensure few
registers sample (Note: of
Contents memory
the
achievement
questions Write
of location
multiplication an
for ....
program
Output of
ofidentified in
reference. DS:000D
DS:000E
DS:000F DS:000C DS:000A
DS:000B DS:0009
DS:0008
Address
Data

of Segment
8/16-bitsTeachers
C0.
assigned
teacher)by
unsigned must Contents

design
23
and
Maharashtra
..E.=l .R....E.=9. Mivrprocessor
(22415)
.sCanteat..c..A..Sg.ise.c...S..
J..A£ke.aata..o.th..cad...tts...
.tEaW.. .EbtaKeS..t.GM8dSs..a.bDd.Otth..aCted.Ua.hl.SeiabeS.
.pCtsQ..daiBA.G.CAMkeS.
ao.Satisst.rskShXQie.H.abB..uea.tGX.iAtA..CX.BA.S.DBsIK S.
State AEaA.Q....SE:. 3. 2. Exercise
(Use
1. 8bit

GUia.g.MBea..aad.
State State Write

alenEHat blank Whixch


Board 16-bit
Technical
of Ax..EEEEh.,
.
the the
difference flag
the
content space instruction
multiplication.
affected provide
Education between by MOVAL, MOV1BL, -1of
IMUL BL you
AXfor
IMUL registeranswers have
answers)
(Spacefor MUL uscd
instruction.
and
after or to
IMUL. attached
execution extend
the
more
of sign
following pages of
if 8-bit
code.needed) negative
number
for

Maharashtra
..Ongt.ag.ayt..Ard.a.mt.ara.
..3...Jae..0.Q..Ml.tipl.)..i.nstcom.
.oge.ag..aiyteard..grcl.
..hass...sagaed..datcA.i.
.hand.).es...Anan.e.hta.
MicrOproCCSSOT
(241)

State
Board . Iac..ON..LatEn..Qt.ltaply....
of
Technical

Education

.....
.....
....

25
shtra IX

State 5 4
3. 2. No.(Additional)
Resources
required
Sr.
Board Software 1. C. b. initialize
programs.
execute
the Faculty MMieropIvCessor
(22+1}
Students block word If
vindsuws
spciACation1s,I6 RomGB
/Object/Software SZRYte
Instrument ttionestination
her the
of execute d urective.
Technical ty
uation: them using counter and number
group must wil Jers mory such
with destination
memory
string
Education form the
demonstrate For and Two in of Memory
Location
as
wilprogram. 0. arrays
example,
another
pointer
simple CX DS:0004H
bytes DS:0003H
DS:0002H
DS:0001H
DS:0000H Memory
use group a instruction
pointers.block, BlockDS:0004H
Source DS:0003H
DS:0002H
DS:0001H
DS:0000H
Loptop
JHP register.
emugo8c Specification the of the must for MOV or Source
Block
aray
5 words Locatio n
assembly two use dup SOurce be i.e. Thehence Then
students. of mustinstruction.
(0)declared in |AAH 23H 62H 7BH 56H Data Transfer
AftBloeckr
assembly MOVSMOVSBMOVSW and block use two block AAH 23H 62H 7BH 56H Data | Transfer
Before
Block
language statements be SI
empty.
destination
in can memory
and is
For
Quantity language the beDI 5, DS:0008H
DS:0009H DS:0007H006HLocation|
MemoryData
DS:0DS:0005H DestinatibloonckDS:0009H Memory
programming allocates To
MOVSBMOVSWarray
declare blocks
transferpointers
registers
then DS:0008H
DS:0DS:007H00061H Destinatioblnock
DS:000SH
initialize Location
programming where
five
empty from are
respectively
are or required this AAH 23H 62H 7BH 56H
tools memory in
source 55H C9H F7H 49H 1511 |
Remarks array, DS:SI
one without Data
as
to tools instruction,
array to as byt
to e
write location we and using
to containg
can
sourcepoint
destination counter
ES:
and write strinp source
Maharashtra and use DIthe and
XIII
XII
XI
State
DS:0004
DS:0003
DS:0002
DS:0001
DS:0000 2) Observations
Board
Address DS:0004
DS:0003 .Miadani..
DS:0002 ...eA.BaS.(Additional)
..H0.aptap....a.p.ESA
DS:0001
DS:0000
Address
Resources
used h.
Finally, g. f. e. d. C. b.Procedure
Table 1) a. Precautions
2. 1.
Memory
Source
Block Memory
Source
Block Observe press to
Type the Once Typc TypeDouble Write
Table or Shut
of createcommand Handlc
Technical 2: Enter attach
1: tlink the thc edit algorithm down
Observe the debug type
filename assembly clik
Observe program more computer
contents Keyfilename.obj filename.asm on to
Education prompt PC bc
23H 62H 18H S6HContents and
62HSSHContents
B debug
to
.exe
DOSBOX pages
and properlyfollowed
and filename.exe language and system
memory location
memory of
write registers, file. and save ifdraw
write your or needed)
on
tlink press onDOSTASMflowchart and
the program program
location the disk. periphcral
contents memory filenameEnter
or prompt 1.4
contents td
filename.exe Key is icon. for
Destination
Memory
Block after DS:0009
DS:0008
DS:0007
DS:0006 Destination
DS:0005Memory
Block
transfer
before step created,
DS:0009
DS:0008
DS:0007
DS:0006
DS:0005
Address
Address
location on and given with
of
of by command to press
Source
transfer Source step. create program. care.
then
used on
filename.obj Enter
and and the prompt type
and Key (Use
destination command tasm
ABH F7H destin status
Contents Contents
lsH and blank
23H62H filename.
file
ation of press space
flags. prompt
block block Enter asm provided
and on
29 Key
Maharashtra
XVII
XVI
2. 1.Exercise
XV XIV
State
.cat.D.t... (Use 2. Mieroprocessor
(22415)
Board
.nON.kh.aayte.pta.si....
..cM....eg5.e.s.A.sec...A.S.
.NAN.chay.p.b.. destination
Write Write
blank State 1.
WritemoreQuestions
Practical
related teacher)Results
Program
.iS.bela.tata.D.Agaç.. .cad.
Note:
ofTechnical

Education
perform
perform .Ihe..altatat.ae..ooth.cads.
ma.ast.pta..si.J.ch..
an an (Any
ALP ALP space
provided
to to

(Spacefor block block for


answers)
answers
One)
the
name

register

which
of
instructions
of
data.
the suchBelow
blockquestonsgiven

are
you tofew
ensure
(0utput

Program)
of
Code

comments
with

have sample (Note:


transfertransfer is
or used used the
of
attach
in as
achievement
questons Write
to
overlappingreverse a
initialize an
more counter.
for Output
order.pages of
reference.
memory
identified of
block.
needed)
if program
pointerTeachers
CO.
assigned
for
source must by
desip, *****,.
and
outputi
"COde Oblock
jOstructoos
dBloCk soal!
model "
SBLOck S6
b bock Start:
data
dbS6h,nBb,62
b23hOAÐh sblock
dblock

endi traOsfer
endsab4chback
JozcLooCmp ptrsiJch
mo dec cl moVbyte
mov
S6 dasblack
moy lea lea
movClsdsamoy
OdateMoyax db
d
b chbyte
h S Ish,
TBh byte dota
d
,62h,23 block 49hOFb,
ptrls Using
ptr[baJ

h Dale PageNo.
OAh OCg string
hSSh
outpt "code "data tansfer
DBLOCk
SBLOCk
eod
dec ca
adLsiJ
Lodi]al
Joop)
didblock
mav
movMoVCaS
lea
sblock
lea s lnstuctioos
uSingSrin
model
dbleck
SGh18b62h ma
sblock db
Oblockdata

49h,oFhSh, S6h
0cgh,Ssh
db
)sb,

49b,oFb.
ithout
23h.0
Oc3b,S Date Tage
No.

oSAha.Q.a.O.2..
aAa.a.... -.Ottp.st..
. . ****
...Q.3.h...Qa.. .Cad.e. .dsata.
..sa..a..
...eads.
. . ..end.
. ..Q.Z..aga.im..
..AN..ah.ch.
. . ...n.oN..a...
. ...sdec...ss...
...Ad..a...Q.SLAH.
..aga..C......NA.c.s.,..a.
..add.d..iAQoA..
...LdeN.aa....aA..
. M O . . . ...sdQ.sdb....csp...
.AAL...c..a..ofs..sh.n
ma.diJaad. .S.bI..
..nAaN.aa.daa.
.e...SAa...)..
....A.D..«.a....a..aS.J.8.J..Q)H

..M........
Maharashtra

XIX
State
4 3 2 1 XVIII
List 2. 1
Board
Related(35)|
Related(15)Process Output/Observation
Expected 6
5Completion
of
4 3 2 AssessmentReferences
Scheme 3.
ofTechnical student
coM/ ht p a s
ssembl
:/ www.
yt
_pr
utoo
rigr
als
apmmi
oi
:/nmt.nysc.g
Practical errors alUsteerviUsse ta.Usoe rg/beginners-guihtdpe-8086/

htps:/w w.elprocus.com8086-as embly-language-programs-explanation/


33
assembler
debugger
and editor /
Education
Obtained
Marks Team
Product
related
correcting Process
to
Suggestions
Product Members Marks)
Total(50
and Performance
Indicators
in andcreate
submission
questionsrelated single related
linker
assembly for
the
step further
46 (50) Total (15errors to (35
of mode create
language
Marks)
practical Marks) Reading
to.exe
signature
Datedof in locate/trace program
file
Teacher
time
file
the
Weightage
100% 10% 10% 10% 30% 40% 20% 10% 70%

EOdS code dato


eod
Dext
loepdecSi
LnC d
alL] addSy
0p modesmal
bd,movnexti
LdiJal
S)_tfsettSrc-arr
movdoffeetd moNdstarr CoUrotdw
mov moN dst--arr

Cxcouot

PeguNo.
ViCroprocessor (22413)

Resources used (Additional)


|HP.Lcaptaa..iS.OGESSO.
NNidc.J.

of Page No
XIII Observations:
Observe and wTite the contents of Register using debugger TD or Debug after the made SerieS oE BCD
(Date

Duobers
1)
exccution of program.
Table 1: Contents of Registers
.data
Registers Flag Register a-ooboo
After Before Su). db
AX Carry Flag CF
BX Zero Flag ZF
CX Sign Flag SF Code
DX Overflow Flag OF MoN
StCSO71 Parity Flag PF at Odota
Auxiliary Carry Flag AF
BPSS o7lo Interrupt Flag IF
SP GP Direction Flag
moST Otfset arrau
DF
DS 8P| ooO
ES SI oooS

eS DS O mov alCsiJ
PES o700 add Sum-LSB,al
daa
2) Observe and write the contents of memory
location in Data Segment after the
execution of program
Table 2: Contents of memory location in Data
Segment
Dext:
Address
Contents Address Contents
DS:0000 DS:0008
DS:0001
DS:0002
DS:0009
DS:000A
loop
mo
up
dlSumMSB
DS:0003
DS:000B mov ab2
DS:0004 DS:000C
DS:0005 DS:000D
DS:0006
DS:0007
DS:000E mov dlSum-lSB
DS:000F

mov abch
iot lb
Maharashtra State Board of Technical Education ends
56
eod
Progran Code with
Page Nol comments
Date
a...*iRS..o.t.texOdeciMN..: .DANbers
...Nkdel
.d.ata.
....Aar...y..d.
Outpti SOAa.D. .3.AA9.. AD..oh..4.c.
...........

.. .. ..e.

ARAAY
Ob

OA b
03h

AAAANEANAn ,\.
aA.CD..scd)...
...A.ax..As.,.aa.
9 9D. eNdS. .).t.a..h..

SUM-LSB 0FH AaX.S...ot.fRSet


SUN- MSB
O0 H
..NA.azsiI.
net.i....D.a...si.
..d..ak..LS.
.daa.
.d.ec.ce...
Results (Output of the Program)
(Mote: Write an Output of program
assigned by teacher)

ARR....SAADH.3MAohe.tos)RANA...s.00b
.SU.D...OS0h.
XVI Practical related Questions
Note: Below given are few sample questions for reference.
more such questions to ensure the achievement of identified Teachers
must design
C0.
1 Note down the registers used as memory pointer and counter in a program?

..As.. ...m....I..

2 State the use of INC instructionin your program.

NC.iAStuGtian..s..Jsecl.o.
..csmet..t.paRd..yte....

57

Maharashtra State Board of Technical Education


1Croprcessor (224!D

attach more pages if needed)


ansvers or
XVII xercise providedfor formed usingL00P instruction?
space teminateloop
(Use blank
conditiooto used?
the instruction can be LOOp
is
1. Whatapplications whereloop
counter to store count for a instruction?
2. Write used as a
rezister is
.....
3. Which (Spacefor answers)

..aNatisaa.t.teoi
fama.si..tt.a.
.caatm.A.te.RXESa
.Cxoependiag..a.n.sa.hetkae
cAddeSs.slZe...S..Se..ata.32.ats
.ar.le.bAta).becaARA..
..e.A.aap..nadth.o.o
.SR2A..alays..d.aea..aae.

o.Ade..ASSe....ANG
d.iti.aa.mp.oesA.ta.S.
laap..aga.. .A..cae.tac.a..
houll..eaiAe.tama

2..he..oop.nstAAtia.c..
.Aa.inlg..uSed.to.simlatthe
diEfecet..aap..
.a..aap..stucbiaGS..Ss.
th.a.CZs.ceaiste..n.icate.
the..Kap.caa.E..
.oapig...s..a..progoAM.cg...
AAcaghat..ntat.th.
***********

.Caprocaasa.m..ea.t..t.
task.

Maharashtra State Board of Technical Education 59


58
Education
State Board lof Technical
Maharashtra
Micropl
destinatiox

sourcc
thenon-destruct:.
and should not both Resources required (Additional)
Microprocessor (2241)
memory
Jocation.

register or a ocations.
The
However.,the
comparisonis
actually
destinalion
fronthe flags will
one bywordip
bytc or specif
aftectto
thc
the sourcesubtraction
and 1h.
results of ih. Sr.
No.
Instrument
/Object/Software Specification
memory word the ompUter Quantity Remarks

of the source
byteorchange. but
willnot 2.
yste
|HP Laptop
operCtin9
Systeo
rAaoisWindoWS)
destination 3. peci
SF.ZF.
comparison.
CE PE.AF, GGB RAm
Flag
affected:OF
and
lag
status
CEZESE/Mcaningofdestination operands
are equal
greaterthan source operand
5 sPtuoeemu 8o26
Source operandis sour
Condition 0
00/Destination Smallerthan Precautionsto be followed
AX = BX operandis
0Destination Handle computer system and
AX> BX
to
certain Jocation/memory
address, Shut down PC properly peripherals with care.
AX < BX to jump 2.
instruction is used
ConditionalJump
condition is
satistied Flags Procedure
atier
affected a. Write algorithm and draw flowchart for given
Symbol/
Description
ZF or attach more pages if needed) program (Use blank space provided
Instruction Zero
orJumpif b Double clik on DOSBOX TASM 14
jcon.
JumpifEqual ZF
JE/JZ
orJump if
Not Zero Type edit filename.asm on DOS prompt and
JumpifnotEqual press Enter
Key
JNE/JNZ Below/Equal CF,ZF d. Type the program and save on disk.
Jump ifNot
JA/JNBE Jump ifAboveor e. Once the assembly language program is
created, then type tasm filename. asm on the
Below CF
or Jump ifNot command prompt and press Enter Key to create filename.obË file
JAE/JNB Jump if Above/Equal Above/Equal
ifNot
CF f Type tlink filename.obj or tlink filename on
JBJNAE Jump ifBelow or Jump command prompt and press Enter Key
to create filename .exe file.
or Jump if Not AF,CF
JBE/JNA Jump if Below/ Equal g. Finally, type debug filename.exe or td filename. exe on the
command prompt and
Above press Enter Key to debug your program step by step.
Less/Equal OF,SF.ZF
JG/JNLE Jump if Greater or Jump if not h. Observe the contents of registers, memory location
used and status of flags.
Jump if Greater/Equal or Jump if not
Less OF,SF
JGE/JNL
XII Resources used (Additional)
Greater/Equal OF,SF
JL/JNGE Jump if Less or Jump if not
JLE/JNG Jump if Less/Equal or Jump if not Greater OF,SF,ZF
CF
...apa.a.AaAcGAI..AS.3.8..R.am..
s.i.aas.J.
JC Jump if Carry ..CM.OL.
JNC Jump if not Carry CF

VII Work Situation: XIII Observations


a. Faculty will demonstrate the use of assembly language 1) Observe and write the contents of memory location and AL register after the
and execute the program. programming tols to write execution of program.
b. Faculty must form a group of two
students.
C. Students group will use the assembly
execute the programs. language programming tools to write alu

Maharashtra State Board of Technical


Education
63
Maharashtra State Board of Technical Education
findino
while smallest
Mronrecessor(41 andAL
location
register

Loop 4
mumber
Contents
ofmemory
Loop2
Loop3
Loop s Dati

able1:
Original Loop1
Contents AL=18
Address

DS:0000
AL
=02AL-0
7 AL=l2|
AL=99
DS:0001
25
DS:0002
DS:0003
18
location and AL register dec c
DS:0004
0
contents of
memory
ater h
write the
Obsereand
) ereutonofprogram. register whilefinding largest loop tars
locationand
memory
AL number
Contentsof
Table2: Loop 4
Loop 2
Loop3 Loop 5
Original Loop1
Address Contents eods
=O7 AL Ô2 eod
DS:0000
DS:0001 07
AL=25
AL AL=|2 AL
25
DS:0002
DS:0003 18 output:
02
DS:0004 NUrO comments
Program Code with
Q.Pcsaa.c.ta. Aod.angest.AA LARGST
>.Mde..Aa..
data.
pum..da......3za..A.BS.hsh
grogram to hod smallest from arroy
Targn d....
ES.... >MOde Snol
"God.e. dato
.ON.aadata.
SOa)| db 2
Cgde
mav a z d a t a
Lea..s..
movsae
moclah
Loap... moy al FFh
-Cmp..ad,Es.J.
-joc..lop.2m. loop)Cmp
Maharashtra State Board of Technical Education al IsiJ
Results(Output ofi
the
Date
(Note: Write an
Output ofPrprogrogram)am
assigned by teucher)

loup2
mOV adLsi]

Note:
moresuch
e..aMEpdt. t. octhcad
PracticalIrelated Questions
Below given are jew
auestions to ensuresample questions for
deccd 1. Which lags arc
affected by CMPthe achievement ofreference. Teachers
identified CO.
must design

mavsnall-al
instruction?
mov o h , c h
iot alh
.A.E..
P..Str.sAc.o. cGect.tha
plag.a.a.Zo.PE.3.d.
2. Which
program?
instructions are used to make decision to find
ends smallestlargest number in the
end
.ampa.re)istrca..s.
SE.D.nase.decis.s.t.aod....
output
Nu
SDALEST
(2b31h SAG.eS,.a.ngeat..Aumae..
Exercise
(Use blank space provided for
answers or attach more pages if needed)
1. Show flag status after
comparisons of following operands
NI N2 CMP N1.N2 CMP N2,.NI
CF ZF NI N2
SF CF ZF SF
25 45
75 36
75 43 23 87
234 234 100 100

2. Write syntax of CMP instruction with suitable example.


3.Which condition jump instructions are used to find largest and smallest number?

(Space for answers)

2...LaeAStrusta..basi.ca...if..
SuotaCts.aAAaa..am..
t.other.fo.x..aompaciog.hethex..
..Idees.Ot..s.tr.the.

65

Maharashtra State Board of Technical Education


Microprocessor (224 05)

u:Ld...AlaQ.A.).a..
.Si.s..Lana..RA...ostActaa..
...sR....AaJ.C...:

S....CMe...S...3...
..CME..a.
.3......INC.Ad...NZ..caa..at.A.
"d.Dp.. .a.ata.sdctdaas.anc.ASed..
.a..icad...a.l.Aeat.asAs...sCA.I.lest
..DwAbe.I.

Maharashtra State Board of Technical Education 66


Maharashtra

XIV XIII (22+15)


Microproccssor
H9...J,.s... 2)
....AN..sa...a.J..
State
AN..S.J.. .Code...
.........ON...CS,.a.a.
..nAN.bl.La.t...,. :.cdotA Program DS:0004
DS:0003
DS:0002
DS:0001
DS:0000 Address DS:0003
ObserveDS:0004 DS:0002
DS:0001
DS:0000 Address l)
Board e.NAde..sNA.
.HaAd.Ag..p.Id.e....
...NA..Dadata..
....OL.echattS...
..ea..E.S....
.APa.:..may.G....QA..
Observe
Observations
Table

. .2..St...da...9Sha.......aa..A.p.
a.sa.Ash36.b. . .de.s. .s.
Table
of and
Technical Code Contents and
Original 2: Contents 1:
02 18 25 07 12
Contents
write 02 18 25 07 Original
12 Contents write
with
Education the the
comments
Pass 1 contents
of Pass 1contents
of
memory memory
of of
o | Pass 2 memory Pass 2 memory
location location
8
location location
in
....Ezad.
....daud..i..Osa.Si. Pass 3
in
ascending
Pass
...sc.c.. descending
after after

the the
order
l2 Pass 4order Pass execution
4
exccution operation
operation
Pass 5 of of
Pass 5 pi
program.
70

clown:
ioC movalLi])
s XCHG lea data
eds decch dec cdLsJ-d rDoN
DceOdiOg
Order

blSitJ

4Sh36h
-12b,SE b

pate
MIe

outputti
g9hsbtSh S36b,

2h
Date
.......

ASNAI...atla.D.
ssl.Ras.2.Rass.
,.A.Rss.s.. Exercise
XVII
wVI
.ASasA.s...e..
a...Q...L.ad.a.Cs..
TaE..bbl.sata..a.lqa.r..toa..
Mi

pass Ifpass 1
If ot..A...ag..ats... Practical Note:
numbers J...e.otect..t..
AS...taae.px.ao£m..
a..cchanathe..calis Which .sJ.
KCh..G...cOat.sA more
Note: Results
while numbers (Use while What OJtpt.a...
of
Conteots blank sorting is suchBelow Write
(Output
arrangingarranging the related
in in
an an questions
use an
array array space algorithm given Output
of Questions of
numbers numbers provided XCHG are the
are are to of
Program)
Q.a.ON (Space
for
07H,02H,09H,10H,06H,
07H,02H,09H,10H,06H,
in in for
used
is
instruction
ensure w
sample
fe program

descendingascending in the
answers assigned
answers) your achievement
questions
in
program? your
order or by
order. attach teacher)
program? for
of
reference.
array
writethe write more identified
thepages
array Teachers
C0.
if
contents
each in needed)
contents
must
tia....
in design
cach
71
ToprOCl

Microprocessor (22415)

|L2:0OL...........O.D...

..9.S
.Da:9.002
References /8
..J.O
Suggestions for further
1. htps://www.cllpprocus.com/ 8086-assembly-language-programs-explanation/
Reading
OQ. 2. http://mysc.alltervista.org/beginners-guide-8086/
3. https://www.
.....

Assessment Scheme
.tutorialspoint.com/as embly programming
a..cantenta.o..memanf...sa:
TIse
Performance Indicators
Process related (35 Marks) Weightage
.descena.q.a.da editor to create
2
file
Use assembler and
assembly language prograrn 70%
10%
Addes.QCqia........a.Pe Jse debugger in l1nker to create .exe file
the errors and single step mode to locate/trace
20%
Cetents correcting the errors 40%
Product related (15 Marks)
4 Practical related questions 30%

LDS.09.J...0a.....a....d....J.o.o9
Completion and submission of practical in time 10%
Expected Output/Observation 10%
Total (50 Marks) 10%
100%
O.Aa2..J...J. ........&. List of student Team Members

DS.og03..O.. |OO........... .....Q.S. 2

3.

... 4

Marks Obtained Dated signature of


Teacher
Process Produet Total
Related(35) Related(15) (50)

33 46

Maharashtra State Board of Technical Education


72 73

Maharashtra State Board of Technical Education

You might also like