0% found this document useful (0 votes)
18 views12 pages

Adobe Scan 08-Apr-2025

The document outlines various assembly language experiments, detailing the code and expected outputs for operations such as multiplication, addition, and finding the largest or smallest number in a list. Each experiment includes a section for input values before execution and output values after execution. The experiments demonstrate fundamental programming concepts using assembly language syntax and operations.

Uploaded by

vedhviraat
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)
18 views12 pages

Adobe Scan 08-Apr-2025

The document outlines various assembly language experiments, detailing the code and expected outputs for operations such as multiplication, addition, and finding the largest or smallest number in a list. Each experiment includes a section for input values before execution and output values after execution. The experiments demonstrate fundamental programming concepts using assembly language syntax and operations.

Uploaded by

vedhviraat
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/ 12

ouuput :

Expe

1. Pejeve tx eution dltc Uution Expre

Ro 0r0CCOOO 00 Ro 0O00O00 OA Ri 020000000A


OXO000C000 Ro 02O0000009 Ri 0z 00 DO0C)3
Ro O 000O0008 Ri O2O00O001B
Ro OX O00 O0D07 RI DZDO000022
Ro 02000O0006 02000000a8
Ro D2OD00O00s OxO000002 D
Ro OxODDO0O04 Ri 0r0000O031
Ro 0V00DOO003 RJ 0x00000034
Ro 0x00000O02 RI OVOODO0036
Ro RI OX00000O87
Ro 0XOD0OOO00 0X00000037.

0410 10
1049 19
194 2 &1

544t55 (31 in hexa)00S


Experiment -01
r e r i m e n tN o .
Date: / /20 -20 Page No.: Is
pele: Waik an HUP to find Sum o! lrÁt 0 ntegeso

AREA PRCGRAM cODE READ ONLY


ENTRY

STARL
Moy l0 in Ro
moy RI,#0 o a d vaue 0 in RI
SKIP ADD RI, RL RO s add value inRI &Ro and Atoe

SUBS Decrement a conter byi


BNE6kIp Branch not egual.
BSTOP
END
2. Butput
Bejore execution AJHI execuhi on.
RI OxOO00000 RI Or00001900
R2 z000OO000 Ra: 02D00Coc 80
R3 0r00000000 R3: Oz013 88000.

(64 O0) C1900 h 1900 X OC8O


(3200) d (0C &0),
(o1389000 )h

eutput :
Befoe &xecution
Ro OX0000O000 Ro
RA 0X0000000D
R2 Ri :
0z0000O000
0X33333333.
Eperinernt No..

Date: /20 -20 Page No.: 6


perimentTitleetbwit an ALp ê) Mulipy
koo l6 - bit nemblrs.
AREA MLTIPLY
ENTRY
CODE, READDLY
5TART
moV RI, S00: &oe deimal yatue in TeQiSktaLRI
0V R2, # 3a00 : St serrmd numbtz in TQakz inka
MDL R2, RL, R2 muttiply the Lontnh q aegkaRRI.
STOP STOP.
END.

write an ALP ) Add two 92 - bit numbead

AREA ADDLTLONcODE READ ONLY


ENNTRY
STARL
Ro,= 02||| loaddt value ia RO Jegúke
LDR
DR
ADDS Ra, RL Ro
STOP B STOP
END.
3. Qutput:

Bejove Exe ution Afe Ereatio,


Ro 0z000000o4
Ro Ox000O 0000
Oz 0000 0003
RI OX000OOO00 R3 60000O00C
R?
R3
Ox0000o000 RO
RI Oz0000000a
R3 OxOccc0018

Ro OxDO0OG0oI2
RI
R3 0x000O0O 18
a e i m e n tN O .. . .

Date:/ /20 -20 Page No.:


Title: Wiitt a Program to hnd actor'a! of numbes.

AREA FACTORLAL, CODE READONLY.


ENTRY
START
moy RO# 43 Copy
oDu tacnzia! Dumbher
mLmberia RO
Move the sam in R.
FACT SUBS RL R # L Substaachon
CMP RI #L c0mpasism
BEQ STDP Bronch EQual.
MUL R3, Ro RL
Stone elut in Ri.
MOV RO,R3 Move the Ysult to Ro.
BANE FACT BrQnch N0t Equal
STOP
NOP
NOP
END
Bkput
Bejoe cetion dfe erecution
b0066OOG6
Ro: Ox00000000 RO 0x 00000648.
: 0xOO000000 R4 0xAAAAAPAA
0x c0O00000 R3 Ox OO0ODOGA
RE : 0x 00000000 RA 0xg99999g99
R6 : OIDO00000 R6 Oz O00O0001
aneriment NO. i)
Date: / / 2 0 -20 Page No.:
ENperiment Title:

Wile
QI10y 32 hi Dumbea
AREA LAgG EST CODE READONLY
EDIRY
START
Re
O5; Initalizo loop counter Rs t05
LDR R0, = VALDE ; Laad addres of Yalue to Teqateo Ro.
LDR RI, [Ro, # 4 Load irAt valne fam value intn Ri,pstia.
LOOP LDR R4, CROl# 4:oad the nett vabne facm vALUE thto Ru.

CMP R, RHi compaTe RI wwith Ru


BHE Next
pdak
4Skip updating max.
mOy RI RH blse
Next SUBSR6 R6, #LAecILment loop counter.
Camparton, check i onty 4 elebnert.
t more lemenk 1peat loop
LOR B3, RESVLI load adds o RSVLT nto R2
STR RESULT.
B HERE
HERE
VALVE DCD
DCD

DCD
022 AAFAAAAA :
DCD
02 99999999:
DeD QATA READIIRITE
LARGEST
AREA
DCD
RESU LIL
END -B.I.E.T. -
cuiput : PJone ex eaticn dfter reution
Ro Oxo0000000 RO oLO00ODO48
Ox00000000 RI oz000O0001
Cx00O00000 R3 0x HOO00000
R4 0x0000C000 R4 Ox OBAA4 433
R6 CXOOOO0000 R6
Date: / /20 -20 Page No.:

LOit aa picgia tn_lind smauut


AREA SMALLEST CoDE READONLY
NIRY
START

R6, # 5 Initiaize toop counttr Re to6


LDR
LDR
LOOP P8t lncaement Ro' to poin next vate
l0ad nett vale from vALUE iN R4.

CMP RI Ru Lompae RLRi with Ru Igi ka


BLT 4 RI < R4Skip updah ng min.
MOy RI P4 Ese, updatt min to R4
NEXT SUBS R6 R6,# DecaeMent 0p COuDtca
CMP R6# ; check if ony element Lee
BNE LOOP I! more temenB neptat loqp
LDR
STR 10to RESULT.
HERE HERE
025656 7878L
VALUE
0z 098R1166
DCD

DCD
oxabaA 4433
DCD
OxDEEEDDCGJ

SMALLESI- , DATA_READRRLIE

AREA
RE6VLT
END
-B.I.E.T.
tput :

Belove exELtion dHier xeation


RO 0x00CO0000 Ro 0X AA BBCC22
Re Cx 0000 CO 00 R2 0z000O00 10
R6 0X O00O0000 R6 0R00000028
Page No.:
.....
Experiment No. ..... Date: /20 -20

Experiment Title:

5.
aata ndmber.

AREA NUm CODEREADONLY.


ENTRY
SIART
gtr R2
LDR RG = VALUE ond addies of wALVE OTegLlita R6.
LDR
MOV R!, # 3A : S t Counte or 32 bit numb.
LOOP
RORS RO#
p store relult to Yegats Ra
BCS SKIP
then fuanp tn lahel skip.
ADD R2R2# Add R2.

SKIP
SUBS
BAVE LOOP checks 2eI0 1lag.
HERE B HERE

VALDE
END

-B.IE.T. -

You might also like