DSPA Exp-8

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Ennoument No.

AIM: Wide an Assenmbly Longua qe


puoom wAng
dsuhion o TMS puocexo o divtdë Jwo hunous

GDETWAR ECode Composo Studio 1DE

FLOICHART

STA RT

Lood the Dividend in Accumulaton (A)

Lood he Divico in Pearstt Bie dnumL


Talizee xeqisteo C(Quotient)ie.dnumH

COmpote the no in Butgtsteu uoith the no. in Accumulodor|

Is 6A YES

NO

Staxe the Condends o A ad Inotment Reqisler C


SOme memOkuy addhess

o C to A Subtra the no. in B


Move he tonderds
and Jood iad some
adduess Lom he no. in accumloou
END
CIN

1 Page No:
yDate:Date:

Expeximent No. 8&


AIM: Wnite oan Assembly Languag puogMamu uing-
instuchion o IMS puocssans to divde tuo numbeus
SOFTARE : Cod Compose Studio IDE

THEORY
Tocas Tnatxuments' Code Compaser Studio dlelopmenk
doola auxe bundled uwith the 5416DSK puovidina he uatn
wit an industzial- atenath inteqkaied enisonment anC
Oad AMemlaly poguaraaing Code Coapose Studin communicatu
Lwi he DsPwina Qm on-boaxd TTAG emulatox -Hough.
ausBinkieace
Assembly Lanquaqe PRogeamminqin C54X-

lhe Assemblp language pueg44amming i dpne wling ihe


HallnuaingApsemble dinechis
temt sechion
E conists o ae aMembly pngNamWhich haa to be
txalated in ohiect ede by te asiemdle, and it á naded
ino he pkoguam memau tax ezecuhon

data &echon
t conists o tha onwtants amd voiahle ohch ane
initalined and a e loaded into dhe datn aema areaa
The 0xin. the data memouyA given in thecnmd
le

Plyush Enterprisess Teacher's Signatur..


GCOEN
Page No:
Date:

include xx":
9+ incudes the asemble o instnt a list o
instuchions in he ile «xx' whil ascmblinay
end
T6 end h aKemhluzlamguagLpMsam
eQui-
Teauat a sumba uita a cankant valuz
SUBC pexpoum binasy dinsion Jike lona dirisian
32- hit by lkbit integue division ia ioaplemcntrd uingy thue
sfagts a lá-hit by 16-hit _inteqr didisian Tha t staa
dakesz urntG bils o tai 32-hit diidend asd iue
I6=bit_diuisox_aA inatsThe xeuulbngz quabiont beconses
the hiahe la bits otheinal quotient The kemainder
leltshilted by LG bitsmd adda tae Jower_6 bits
thi oxioinal diddea ThaAum asad fhe 16-bit
dirison_became inputs_ta the secand kage Tae aer.
6 bits otaekesultinaquohent. _á the iaal qunhiont
and Hhe ssulkiag,uenandei heinal_ucmainder
ALGGORTIHM
Sttp T Tha alapxitam dekounainss he_aa ahe quaitnat
Amd stoxes thsdn accuulatax
Step TTke pxngeana datuumines the quekirnt othe abhsaluke
volue ofi humarato and denanainatasusiag epeafcd
SURC commamda
Step TILThe punaxam dakes_dhe negahsct o #ha nesult
step 2 appxapxiate, accoxdinq to the valuc in.
AcCumulatox
Piyush Enterprises Teacher's Signature
atOEN
PagePage No:
Date:

PROCaRAM

include 5416 IV, asm


Maxd
cdata

SSBX SXML Stqn wteaMian mude on


LD d-Den,l6, A
MPYA d-NumH 8 has sign a quahcnt
ABS A
STHA d Rem d-Rem abs(Den) tempaxrily.
LD d-Numi, 16, A
ADDS dNumdL,A
ABS A
STH A, d-GuotH d-QuetH abs(NumH) tempacasep
SIL A,d-GuotL d-QuotL =ass (Num) temporoaaly
LD dAuotH,A
RPT #1L-D
SUBC d-RemA
STL A, d-auotH_ AH abs CQuoH)
XOR d-QuotH, A_ clea AL
OR oQuot A ALE abs CNumL)
RPT E(L-1D
SUBC d-Rem,A4
STL A,d-QuntL AL abs CQuotL)_
STH A, d-Rem AH E Rem_
Bcp BGEQ i B is nea, then uot -abs CQuot
LD dQuotH,16,A
AODS dAuctLA
NEG A

Piyush Enterprises Teacher's Signature.


Al
AA
AT

A
RESULT
We hae succenwlly ex ccuted Memblyy Janqud
sntuchon of
pp0gpam to divde fioo rumbe win
TM PDCONDs

AM
A
GC
GCOEN
1 Page No:
Date

STH A, d-QuotH
STL A, d-duot
RET
Lend.

PROCEDURE
Open Code Composer Studio on the PC
_) Cueate a nur puoieck withname odepit
(Addhequined Jibeaup
(iBuild Lkad and Ru dhepunua
ObsexAthe Output
RESULT:
Ae hast Successll ereauked amcmblyy Lamguags
puagAamdo dinds shun numbesw
huna inBructin op
TMs potkoxs

Piyush Enterprises Teacher's Signature

You might also like