0% found this document useful (0 votes)
27 views7 pages

Assembler Problems

Uploaded by

Sakshi Sonavane
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)
27 views7 pages

Assembler Problems

Uploaded by

Sakshi Sonavane
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/ 7

Asse mbly Lauguage Proqo)

Ihstuchon

seu do-op mach ine0p


START Registtr. Registe
Dal Conut
RR
END - Index)
Rx (Registey
Dc (becaí Contumkelsbraye
o a t symb|/sbrae
ST (Sto10ge mmediote

DS(Declaire Storase)
Rs Registe Shorag
OS ING s toraqe)
LTO (Literal Organisahon) SS (storage
equa) to)

DPoP

RR Eud with R RR
ypes dPegishe eSR BR BALR,
2 byte SI
RR eud t h 1
SI
4byte
R e L I , AI
Abyte
Rx ifend o nstnichan is
4 byhe
ST not I hen it 's Rx
6 byte
1n3hnmchion
e AR
Cenecal Instn/cHonm formal

DATA Dc eF's'

Label OpCode Opezaud

No. byBe
Infotmahom
H (Ho1f wond) o bytu

F(Sull word)
L byfu
8 byte
D (Double wOTd
byhe
C Charactea

of hsSembly Lauguag
Design poeedure
Couju (U)
hssigvalue
o Locatuon
ST
prepane
repale LT

Prepape
BT
Cocd
Generat mC

LocaHon Coun)er ) wnte


CL) wnte
valuw to locaion er L
Counter
Cound
To asst g9n
to hese
the Intrement ( Coyres pond ing
mle Instnuc hion
type o
In8ucHon (tg RR, x,sl
euLonla alignmenthould
be done ancwrdnq
antmding
S
1DC, DS Cons ant
Cons tant
hen 10rement alcorclin9 vho
aCcoroling

to b e Constau
Dc 4 16
tnCyemen by
eg DS F5' 20 Snce f-,
e16t 4c 20
byte
AanenE
Del Ds MulHiple f 4
mubiple o 2
8
DelDs D mullple
itera
vala Ol
TORG s eutouey hen 1t asign 4he
table
for ( while making Jideral
See eralis progrdo
hove aU nntchom with ID Sont in table
st ijeral should be aluways
MuWiple 3.
enCounter -F) Heral (:)
AD
Symbo) in unt

mathne Code
value 2
RR yau 1
PR yalu Value 2

R value 4 offset
Rx Value Valuu 2 8aue value

Value 1, valur2 ndt e


ST ST valu 2,0ffaeh Re. NO

Boe

able
Solve ef
How to
minu
BaAR 1able
10
Offset valus o (Jymbo)| ukrat) (B) 6a Content valuu)

BNE Always Chauges into 3


8R14 Alwaya Chage 19to BCR 1 14
DC COTepomeingConuta
DS Blauk
Relalirn A bsokub
Su mbol Table R e l a t i v t a l l S y b o ) t h e s e

wnte
wnte R.
K.
aud
Symbo value plA Le
values
hase
thase
ae
SIMPLE Abolutu
value
ev
LOunt

LOOP will
hen you Symbol.
In
fnt o
valu
EQU

Onle tocale) exampl&


COunes valu
So R 1 s Symbol
So not
valuw
0Equ
wnk
LCvalu u tabe

toble,
bm1u
A iD
aud
Lteral Table

LiHhal valueR

32

far 3

Tuble See OSING


Base
tor Bae Table
Ke.o
Conhent
InshnucHon iD pro
1S 1S
ee USING ,
(onlent theae
So Keg.No- 1c
LC vee
S mean see
'0
s'6'So
my Caoe
Symbo Table litral
Ofor the following ALP shoo its
mathint Code.
Luble, Bape Table aud Qtne:ole
LC
TOHN STAR O
UsING , IS
R x nJ
L ,fIVE R Ing
A 1 foUR
8 n
ST 1TEMP

FoUR DC 2's' 2 12

16
FiVE DC f's 16
20
EMP DS 20

END

Symbol fOuytenval
Table
A LOTo10
I DeDS

w
1nJInichon

noF
eulounfr
wnhing Le val
Symbo vae RA
malcing
aliqn ment
we
R check it multple
16HN not hern
e ov
LC
o
FoUR 2 valu
CUAS19

vE
Pseudo-Op Code insnuin
TEMP 20
Local Couuten
ke Uye
netla khle he.
Baue Tabl e -Localun
COUuwen mk 1nuthuchoo
Nelu Cnly tor
Content Lc ki
Reg.No lca Lye
Valn khte ha
S
for the olloungALP sho i Synmbol Table lileral Table,
Baae Table ud 9heate machine Code
LC

My PRO STA RT

BEGN 8 ALR
1S
Us ING BEGIN+2,
SR
L 3,-f10

LOOP
( DATA (4)
12
2,Fas

16
S2, DAm (4)
20
4,=F

B 9, L00P 24

14 28
BR
LTOR9
0

DAA DC F1,3,3 4,S9


E ND
48

LITERAL Table
Sumbol Table
RA valut R
vat Literal
Symbo
32 R
mypRo
fas 36
BT GID

LooP 8 - fA 40

DATA
Table
Bapt
RegNo. Conteut

2
S
Mathine vde
Machine Code
Relahve
Lwcahom
ind
offse
SALR S,
2 SR 44
H L 3, 30(0, 15)
L8 4y2 (4, 15)
12 A 2,0, 1)
34

1G Sr 2, 42 l4, 1s)
20 A 4, 38 (o, 15)
BCT 3, 6 (0, 1S)
BCR IS, 19
28

10
32

2S

4T

S2

You might also like