Begin: Ciro
Begin: Ciro
ul23
5 Wite and explain he algosthm for a
velocahng larde
fo a Std Macine
ans
Begin
get PROGADDR Fron
wile not end d lnput do
beqin
Ycad nert ecod
wile Tecord
od type + '¬ do
wie
bjin
get Cong Hh= Second data
mask oit (M) as Hid data
for Ciro; ie lngth, it)
M;=l Hhen
add
PROGADDR locahion
PRO CoADDR t specficd acahon
ebe
move
obect Cocle bom necord to locahon
PROGADp2 + speuied locahon
Yead next e Covc
end
ent
End
> Explanahoni
The adolyes
statiny ie, he PRO ADDR is katcen
Bom the qpeahiny ytcm "The 7eCONds ae
ae Hll he end Tecord
vd for each text veecvd
and nask bit
Hhu ungth and are
Scanneo . And \a
for all text eCad, etnif Hhe mak bit
be coms tha PROGAODR 1s addod to Hhe
P
Speufied locahon else hehe obect
obect Cocte is
to locahon were PROGADDR + SpeciAed locahicn qives
(() ESTAB
() PROG AD DR
Gi) Cs ADpR
() EstAB
The main data stuctuve o the loadey s
an
extenal Smbol table (esTAB) · t is linking
analogous to
table (sYMTAB) 1t stores the name and addesCs
et each Syml nin Con bol Sectionabo indicates in
wich Canhol Secion
Contol
Sechon Addres
name
() PROGADDR
Pogam stlainy
Proqram chould be
in memory where Hu inked
Loaded is vae i suppied to the
loader kby Hhe Operating Syatem it's a Vaviale
abu also
(U) CSADDR
Contains the slanting address dd he En assighed
to he Conbol Sectioyn wich ave curently being
Hhe PROGADDR lor Hh
GCanned The cs ADpR ic Same as
Contol Section. and |he is
chango
d He previdus Conhal seche,
dirpendid he
Bagin
gct paooADPR Rom Opoaliny syate
Set Cs ADDR o PROGA DDR [For fist Conhol Section
wile net end st lnput do
impotant te ensure
Compatia
hat cevies
l ty Rglor updatea are
BLOCK CHARACTER
* Block denes ane havdwave * Chaachey evices
cleias wich Yandomly aLs aesed as a stream
ixed si2cd Chuok ot dak Sequnhial data One
yte
ctey another
possibu
Sekiny seeing is net porsiblu
* Reads and wite cloene wnte )
* The Yead ()
by buPfer cace mechanSm Calls de not Yetun wh
by bread C), bwnte (). unil me operahorn is omplete
These vequesk may be
asyoch ronouw
* More complex han * uss Complea
Chavachte
htes devices
* The kesnal coes have to * The kernel doesn't have to
Provee a n entire
o bck devies
subsyetem provide an entireceicessubsytem
to chavachnte
Had oisk, pendive kegboavd, deuce Senal
pak
wih a neat
diagm outine he shucture t a text cditor
pispla
oukput
deias
Cemponuntb
Conbel
Paging
ouhnu
--lata
Syptom
* The
command lang uage pacae aeps input Fom the uie's
input dleuccs and analyses He to ken and Synhehie struckves
Commands That is it funchons Ule xical and
syntahie phaso t a compile.
Compiler It invowu he sem antic outines
drcly Thu Cormmand languageLanquage proceao alio pretuces an
inte, mudiate epresentaion d he desincd edihng openationdThis
eprcsen tation îs used clleocled an
interpretex that involvee
the appropiate Semantic Voutines
Eduting Componunks - ln a
docament, the start of tha
avea to be eoi ted is dla teined he cuYYent
pointes maintined
he eiting component Eai ting conmpneat
s a callee tion ct madales clealiny uith editing tasks
(avvent ecihng pointer Can be set o eset de to net
etc
pogaph paste
* Tavaling Componnts posfom he
seling he Current
small bakbactig
pgams Hhe method of baek
*
moe
To wse
eFective
is mihod
to Locate eors taling
start at he place In
whene an incoweet Yesult Prgpam
prducd and
backwavd in Hhe Prgyam One sBep at a hme
1his is
deive
execuing the programn in
Yevese Order to
he Vals al awlaae vañables in
he previows step hen eNo can be locatel
Fncions and lapabilla ?
15. Explain dbugging fnchons
ene important equirement o any lp' is unit tet
fanchons Speeihel by he preqyamer " Such funcions clealy
with
exeruhon Seqen
Con hol o Hhe flow t
wich is he cbsevahen and
execution
he proqram may be suspened alter a hxed not
insbuehonn aYe executed
’funethons
Tiaang Can be wed to tyaelk h Pow ot execution
toqic and clatu mocú hcahons . The Contl tos Can be
braed at diffevert level s t cetail proccdure, bainch
tndividualinztuctian and so on. Trae baek can shew
Hhe pah by wich the cument statement in he preqram
was Teached
’ Capabi ithes :
should have
Pregnamm- display capaaita i Adeloe
gouc pregm - cisplay Capabilites
*A debuggny syem should Consice he
langy
wich he clebugged is witen
Program being
* The dubugging syetem should
should be abe to deal it
optimizod Coce
d vaiables