Professional Documents
Culture Documents
Written Notes
Written Notes
~
_1\ an6, cu-.m t-f1C? ~ct: \-~~ Tn 0cb"Oe&
... h\J P(j'(ee(l
Page No. ---__
Date : I 120
- __ __ - - --·-
....._
vJe_'l.l"nttS ___ - - - - - - - - -- - - -
______l. _ T_
~~ ;•·· t bl~ --
-- ---·_; _[ e,,_tlf~ :v,-,,it<; C';~
- - - . ~~~c,91 .d,:01 od & w.i~ns-__:__;cZu~ -
' . ,
'I
, ?• ....... ~ ✓-:,')(I
. . .___ __\--=-----~-~
:',1J :'l'.)
-
r.;71):
-------./
/ /2j
\
C .
,~ --
.., ~ :'.:, ~
::=:;=.:· -- -- -·=--:.: .
-----
- - + ! - - - - -- - - --- - . ·-- - - - - · - - -- - --
!
I --- --- - - ----·--·- ---
II
/'
. Ii
~ --rhe i~ fl5~cl i 0Y> - iS cL (~ckl__,f 'r r to A
Dato: i2r;
-- ~ - ====== ~---
_ ~ ~ ~ \-\_Q J c,.,.¼ ~ ()._t ~ - g,_ 0 !!l Q __: t -'-
)'YY)
~ Q_ _ _
-
-·
... . .
l
1
MGMn
--
~Q Yn 0 j
-
s~ t~ - ----- - -
-:r~~J,~ ~ ,, ,, ---
..
-
I\
- - -:±~t-r-~d-, ~ I
9c,Jo. . -
o_J -~- .
--- - >- - ,, - · _ D ~-- ' - - ,. -
--
- -
- .
I , ' -- - -
- ~'"""' I
t
.
.-.J
-
i ~;_:\~~i r l
--
.. - ' - -- -
J / -7 LU
J I --
. . - I•
.
- q
--
.- .
I.
k <Rio
.._J
t~-" -
• ---
j
- ' .
- I'
x--
~~
,
"' \ u y"\ rtV' ":-'
'
- ' ~
.
- - ' ' . l•
-- -- , ~
.
I , . i
.. ----- --- ~ - IJ !
!
-
'
--
-
-
-
--
--
-
-
- -
T/~
- -
A ~ 'Fe_ '>'I) - . -1 -
l -
r- - - - -- - - - · -
- --- -.--· --
,
-- ---- - ' - - - - - - " - - - - - - - - - - - -
- - - -
L.. 'r
-:_c_~_::=-·:1~
.- rs - &_C is c
- -
.r~ ¼_l,\dJ S"n--S d&' ~;
II . ( .
:I
I \I
J!
t'
I
' : 02•3· ! /2 j
I.'I
'
11
·- -~'} "'f.~·f ' '-> (\ - ---.
1' 11,N·L )
it
=-=== ---- - - ------ - - --
\, i) l
= · r, oR
I
': I 1
sb -.
· -T'J__
'
. .,
.
•
% 3 T,"'n1 Q
,
, Bi . . . l t
:I
I,
1,
'I
-. f I
•'
,
. f ' / .,.
. J -
c lo c -
I
I
I
. -&_ T-;,,. o bu:d..i o;;:;:;s , CoQ..c ,JloJd fuv:> F°" \"' iJ?B: \;'-"'-'L
· j_ L(V\ 'e-:o . to,\ c)c.5ck·c 1 dk.-0 1 b ____ ·
1: J , I ' -LJ -
- - · -- ~ -L..L~~ ~ ~ ~~~~~.2..!...! ....LJ:.-2-l---'S= =-L-s:~C..
=-L):\_ -- ~ ~
__ 1 ::s
-...,--·~..t.-- -.i:~- 1 4 - J . - ~ ~ ~..J-+____::_~ -==--_l,._.,L\.--:-- -1-~ pltll em
- --,t__ 'j
--- - c--k:_c_:\-=-&,Q-6 . T\.:=1- l'N')t-Q~c,l1' (rn.Q
- -T
--=-
'Y)- "'n
ed
_ c__\o
~:-? tXJ __
Co/)(" _ _ . - - --- - 7
I _ _ _ _ _ _ _ __ _ ---,--:.=.
N~"f'O --I--'
}'.)_ _
----
-..IL......__ "'-~
P&{,e ►~c .
,,----- ·../
Date : I 120
II
i • _J_ ______ -~
• .___.'........·:...__:_-✓~--
: j i'Y'-4h.~cP-,~1_h_ _2<11J::lj._c~k-- -".c-. -i----•- - -= - --
1
' ~ I . \ ~ - $_Ji)(_'2..d.c1 ~
- - " - - ----- . . . .' :
_ ___..___ f?cJ- e -:::. 1- _·
2 :..~e)~-s~-~·- - - - - ----
~
(
' ,. ~ V ~ (P @(\
Page No.
( oate : / / 20
'.
c..
-~ 'A
--n----~ J.1. ;~ ·10 ~ 0
o-D ~bt) &-n ,~
I
,,_S~_l"(~-(r,!J_ (l
(oat:: -·,. --~)
Pncyi No.
.J
-~~\-
~-=n r~~; ----- -:--- +~ ~~ ~b~
I \ \ "\
/.1
_ _ __ _ _ _ ___,_ _ _ __ - - -
--
---------------
~- - -- - - - -
.1
1.8.3.1 Sequential Flow
Sequential control flow describes the fundamental movement through a program. Each
instruction contained in the program is executed in sequence, one after another. A signifi-
cant amount of the total code in an application is evaluated and executed in sequential order,
although the individual sequences may be rather short. We capture that notion in the accom-
panying diagram in Figure 1.25, in the following CIC++ code fragment in Figure 1.26, and
in assembler code in Figure 1.27.
Initial
a= 10;
b= 20;
c =a+ b;
Final
TI1e execution first assigns voJues lo sevcrnl variables and , then performs an arithmetic
operfttion ()fl the two variat,Jer,;.
_, If(•• b)
Clld•«
l',VJ:-,Nn
(r;·it,i :. I. / ?.f l
.
)
- -.-
I • •
'
1 .
., -- -- - - - -- ·- -- -- - - -
- -----
-- -- -----✓
.p~
I
-=~ - -·
,r'\_
U_2?~ls!_ J2.>
®_:_G \. ~\~ is ~ le:_ QR-A-i;:,±@,_ \ '1)'.)
Y)+v-u
·. 3 c,--t;\-t-0 ,- ·½
0 --A -~
1 ~ d ,ifr o
(-e-=ft -·- · -
I
- --
~
,,
I
t • - I
·- 2- 'fJ
,,
,'
ii
1;
I
fl
' . -·----- -
--- . ·-- •·
---~~~~r.a~\~r~~~~~ '-:~~
~ I"' &h e~ l~. 1 .~ Q, QC 66 '1 ~~ ~~ cl y
-
--
"e'
A ~ o CQ _-;,.s, o..,,
l
Isb kT> Cll:.8-ri ~ ~ L-
o ci
le. : ) ·-
. C·
--~-----------
!
- - ,. ·- - - - - - - - - - - - - -
- -- --==============-
::I)' o.. rJ:.o \rn &\a mle'.:n 't 8. cu.,Jo 6-.Q. U H2~v f-
----=--- - ~ ~""f Q ~'.h JLt--Ot ,ere If\,'\,C, h: L\~.k f <'-Y'
i~ Tl e o\char~ , . · , ,, l' ,. _\ , ~, . j t. . · _ _
I ,
• J •, • -
-l - - -
-
I
Stack The addressing variations stem from the fact that one use of these instructions is tc
addres sing impleme nt stacks within memory. (!\ stack is a form of l~~!-in-first-out store wh ich
supports simple dynamic memor~ allocation , that is, memory allocation where the
address to be used to store a data' valu;is n~tkno wn at die time ttie program IS
cornplle d or assembledJ An example °would bea recurstve function, where the dept~.
of recursio n depends on the value of the argument~ stack is usually impleme nte'.'.
as a linear data structure which grows up (an ascending stack) or down (a descend-
ing stack) memory as data is added to it and shrinks back as data is removed. ...1.
stack pointer ho~ -~ e a~dr~s~ otjhe current top of th~ ~eJ!her by-pointing r •
the last valid data item pushed.. ....,._... .,... -- -
onto the stack (a full stack), or by
- .--..,..
vacant slot where the next data item will be placed (an empt}:'_ stack). \
--
pointing to th,
The above descripti on suggests that there are four variation; o~ a ; ta~k, repres~nt·
ing all the combinations of ascending and ·descending full and empty stacks. Th:
ARM multiple register transfer instructions support all four forms of stack:
• FuJl ascendin g: the stack grows up through increasing memory addresses and the
base regi ster points to the highest address containin g a valid item.
.,,,,- • Empty ascending: the stack grows up through increasing memory ad<lresse~ 3.nd
the base register points to the first empty location above the stack.
/ • Full descending: the stack grows down through decreasing memory addres~~s
and the base register points to the lowest address containing a valid item .
., • Empty descending: the stack grows down through decreasing memory addres.)C)
and the base register points to the first empty location below the stack.
C
A 1-< C'>cS e c o +o
m l- o..-n + °'
C&n:bco I i ::n <:27":'Yl I o P,-?OCA: -
· 1. ,.7: Q c ps:n. k, !2's du,,cUcc.l~d 3~
t-------J
Q -
. • "'I i
Ov.._
½
......-~ ~ ~ ~ ~J.:.~
0
,I
d
-- - - -IQ~- - - -- - - - - - - - - - - -
; ~:JS:oco s .soo Mob - =-j•-_.: --· , ,
- -- = -
ii -- -;_y .. ,,,,.,,-, =, (I
I' ,r:_:-:_~1 N'.l. - - - __)
1I -.,.,+ ] . / '2'J
,
)
'\ a
-
..-:.
\ I
\l
+o .
__JJ__ _ Vn JJlJV-O d AA& d l ~-n
I [
. •.
\\
r .
"'