0% found this document useful (0 votes)
35 views20 pages

Colocviu AC

Uploaded by

AndreiNeleptcu
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)
35 views20 pages

Colocviu AC

Uploaded by

AndreiNeleptcu
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/ 20

Diolactic

*torfor *

Codificure: ·
-
↳ Cool
operation
· Moy;
transferan curant
specificant de
operandal
Sulsa la operandel destinatie; S

- ahesore direct adosa in


e
prevent
memorie ex: MOVRA, adhere
- aesore indirector: aohera
locatia
efective citate
is

corci advesdate
din memorie, die a

continut in as doilea 'curontal instructance:


I >

ex: MOURA, Jaohera]


imediat COPCs) 0010
operand
Ce
* =

imediate Copto:37=
6
* Fard
operand 0000

In decode,
·
if more
et coptois]=0000
(ee apliconyet MOU, PUSH, POP, IMPST CALL
+
of nor
pt ceptc:6]=000 (specific
nor) &

Ge idiot, aproome access


operand
-
S

povedte dor seduce into stare de


-

load-operand-imediat;
stared transfer: realized" T7 Ta
S
A all, all
2
- oer,
carry-o, opcode-or,
He vex, state next
-
=
decoded toe 1
-

carul Faroeredial

S
do next =
d;
exec-next='transfer:
det- next (mod
= == 1) IIIE?

'det-reg:
11) 11
'det- man;

usc- next
= Good = =

(0)?
'Ne-reg: ste-mom
store-next (mod==IDII(EE1)?
=

"Store-nm
store-reg:
Operared immediat
/desic destinative
-

S
resultatulia a
merc RM
exee-next =
'transfer;
det-next-mod =-2'bl)? det-rey? det-mom
she-next="load-operare, imediat;
-

store-next (mod =-cibli)?


=

Store-reg? Store, men

Penta obtinera operadului imdiat,


incremerton' ⑯o ii Luam din rail valoarea
do to adora cot, care repretivte valoarea
induct.
operandula
themorarerof
rotate, inedial
obstine 3

do la advesa
operandul
cp+1

store 1: thve =1;


>00=1;
airi se merored into, Op
state 2: tz-0-1; aluoot =1;
alue, -1;
Cory alu-opcode: ADe;
are, we o
up,Ve=1, (prep+1)
aici se
face (p=T2+1 (adical
stare 3: am, Ol=1j

stare 4: rai, OCF1; fo-We-1;


puneue in a voloorea
operandulai imediate din RAM

state -
next-decoded-dst.
- -
M
-T

·MP: solt meconditionate la o anumit adress


CODC0=3 = '0000, CODt= 6= 101
op care la valorea din T1
in If si apoi of
- DECODE C COSTOL Coptic]

S
do next =
0;

exec-next=yup;
det-next =
(wod== 11)?'Load-dut-reg: "skip_load-dit;
are-next='skip. Good-se;
store-next=
(mod==1)?'Store-reg: 'tore-wer;
skip,
· bad -
perfree conserole in core me s

incarce curse son destinatio


>
skip-wood-es: state, next-decoded-det; -

state, next-decoded-ee;
skip-load-det:
Iare la odua
Starea
jup: din destinatic

C
7.-oc: 1 j

tr-0e=0;
alr
opcode: "OR;
ale- Oc-1;

up-
We =
1;
state-next: Eetch; I oce
iapoi to fetch
·
zcord:transfer control La atta reventa, doc
S

sunt
indeplinite conditite de feet, attel so recere la
incrementarea cp sise continues
programulus
exercitive
Transfered so
face plin: CP=cP+solt;
Copto:3) =
1001

Conotitute
de test set date de
rigital
anumiti valor all
UN
S
respection unor

indicatori de conolite.
O
astare: ind-sel-1;/pector a obtive
stare:
of tagrrob
of packer forcode instructure
-

un

(8A, JAE, 83, JBE, JO, IE etc


ex:
ptJA, =4 5,000 =
state -
next
=
lidEz]) =
0?
=

oud
A
Ransfera
+3): To
executi >

controll
conditute
>
progrocer
otstare (de transfer):
I
deplasomented - Te
Six 1

Y
0 =

/ scrim
-ve-1 in To
deplosomeated
·Asre: 1) 2p Te +

tl-We=1, I meurez up
ICp>0C =
1,
·stare: 1) CP=cP+
deploroment

S
troe-1;
tz -0 =

1, Is in de vice

alu-cossy co;
ale-
opcode: C; /oaduna"
alu-oc=1; /e a set. Adunoire

up,ve 1;
I / le solve aid
=

L state -
next =

"Fetch;
x 3, 2.5 lafel portra boots conditite;
deploroment To
+
-
severe
-

serfere OP+Ti
Op cO+
diplosament
-
=

adice T+T
up:
· Pust: decrementos indicatoral stirei is,

apoi transfer in
C M
cuvant specificant de
vorul ctirai, medicat do
&

operandel surea in is.

duromentin is, it
punem into,
-

nord is it introduce in AM,


apai
Petra a dierba adveso la care pointes
memoria.

S
d -
next =
0;
exee-next='decrement - 15:
det-next dot-mere
(MOD --bD)?
det-reg:
=

My next-
skip-lood-ste;
store, next stores I
were;

decrement- IS:
//penem is in To

S
Reys-Of-1;
regs-addr =
15;
to -ve=1j

* decrements I5 +
1: //redereentes free,
t2-00=1; a
pure
in Is

ale. Of 1;

rays - We =1;

regs-addr-"is;
alu-cobry =1;
all-
opcodez' SBBC;
LawWe
decoded -
bore,
·POP: transfercuantel die
vorful etive.
destetic
indicat de is la
incrementor is
operandel apoi
indico noul
pentre a

vorfal stee

<
& -
next =
0;
exec, next='increment- IS;
dot-next (od 11)?Load,dut-reg:plod
=
==

Mr-next-'skip-bad-se;
store, next (ode=11)? Istore, stole, rem
reg:
=

A increment, is: ↳reobtine die memorie

Greys,
Reggs-Of=1;
are -
addr-"S;
we
1.
- I
pur pe
operandel

increment, is + 1:

law-or-1 in merrie
pure
Ainconcent, is + 2 ↑a +Is
pure be
:

Ramos, Inow due eenore


A increment is: 1/ to memorie f
pur

Hoc
L
ale -

Corry=0;
all -

Opcode="ADC;
all> 0c=1;

A increment
-15th://puram is in t

Iregs-addr="s;
Rugs-oe=1;
fex ve =

1;
A incrurent, 5 + 5: // reface it, escroe in is

His apoi pune


I
FtaT c

Bauefor

I
tix0e:1;
Rags Ve=1;
regs-adds='rs;
ale -

Corry=1,
ale-Opcode: DC;
all
OCF1;
-

state, next-orarsfer; // operondel


destinato
agage in

/rojistud >

a PUSHF: dicomented indicatoral stive is S

apoi transfersoti indicatori in curated


din
varful stie'

ushf: I
punam operaudul in te

& An-Ve=1;
be -00-1;
go
Lreys-add-"S;
:I decreative is Cadic Jn)
*
pustufte

S
A -
0 =
1;
-0020;
1
regs. 3
We =

addr-"IS;
regs.
ale-colry 1; =

alle-
opcode: SBB1;
all-oc=1;
A
pushf+2: 1/pun
-
in AM

regs. addr='s;
Sregs-oc=1;
all -
We =
1;
*
purhft3:
--
/ pur in memorie

3
ar- Oc=1

rave- vO 1;
=

rid-oc-1; /pun tote indicatori


state, next='ive-up;
·
POPF: Ransfer Citi corpunsatori dim cunantul
inocind
·flat in
vorful stice in indicatori de conditio
vechile volri ale acetora; is a incremental
valoured lui
*
popf
- -
:// sover is an AM
i in
1;

S
air -
Ve =

#1 - We =
1;

regs-addr="is;
regs- Dr =1

*popf
--
+ 1:

am -or =1;1 in merorde?


puree
#
popf 2:
+

- -

rove, or -1;

iol-ve-1; / is era in is
purer
I ridicatori
I incrementare is
Aft3:

I
A.0c=1;
* de reverit la PUSH
Az>0c=0;
rags-addr-'IS;
Regs-ke=1;
ale.
Carry=1'
ale-
opcode="ADC;
all, or=1;
state -
next: INC, 9;

solt reconditional la
·CALL: o
procedura
-

se incremented op
-

so decroverteot Is
-

se introduce up in RAM la nova valore a


lui is

-
s
efectueo un trp lacr

S
d. next =
0;
exec, next='call;
det-next=(od==11)? dut-reg: skip-cod,dt
tre-next-tkip, bad-ste;
stores next (od==1)?
Store-reg: store-were;
=

A call: 1 pur to
TE>CP
Up-0e=1;
< --We
I
=
1;

A call
11: 1) CP=T2th, Kadie OP=CP1

(
tz- oczl;
F1 <0c =
0,

ale,colry=1;
ale-
opcode-AC;
ale- OC=1;

Up-rc=1
Alt2: 1/ purove is in Te

S
2 NC21; -

rays-addr='IS;
Reys-Of-1;
C3:11 I
T201,
=
iS =
1501

t2 >0 =1;
S
ale-
corry-1;
SBBC;
ale-
gcode:
all 0=1

"is;adds:
regs-
Regs-ve=1
-caleth: 1 irr
-
puer

Slegs-or=1;
are - WC =
1

reys-addr z's;

Cole+5: I1 up in RArla adsa is


-
pune

Youocas;
up -0l=1;

Rave-KO=1;
alt6:I jup la p

#1 -0c-1;

S
F2,0C=0;
alr,
opcode: "OR;
ale- Oc=1;

up-v 1;
=

state - next: 'fitch;

· DET: reverire
reconditionate dintro
procedure"
t cpvalose din memorie de la
punom
-

advesa storate in is, incrementin is


apoi
ret: 1 in the valorea divis
x
-
pure
rays-adolsz'IS;
easy to 00:1;
re =c;

*th: 10 in t
per so
rays-aodr="5;
Sregs-
- We
Of=1;
=
1;
#2: 11 lain valora dier to

or O-1; 10 in memorie
peer
+3: I to recorie in up
peer ex

hopveentair
Ram, O:1;

ha uaitovre
is
sitecu
Al <00:1 instructure

3
2 -
00:1

rays-addr= "g;
regs, OC=1;
ale-carry "I;
ale-
opcode: ADC;
al-of-1;
state, next: "Eetch;
· Adresare immediate:

if (CoptO:s) 3'boxs]
=
=

d, next 0; =

det-next =

(wood+=11)?dut-reg: dot-mere;
ere-next='load-operand, imediat;
exec,
next='exec-cop;
store, next =

("copts])?Eskip-stone: (od =
12)?
=

reg: store-me)
store,

*Akipstore
net-'ine-api
· Mod aoesore 01:

* Adresare indirect: We in die RA

valorea
operandal care
repretinta deplosave.
rect:
#add

GopoetA copoes up in to

Mindirect
+1:

I
S1x0=s'
ale,
Corry=1;
ale>
opcode:"AC;
ale- Oc =
1;
are al =
1)

upave=1;/ fee up=Tetl


Rpt 1
-
ador-indirect +2:

al -Or=1

ador-indirect +3;
Rovex O=1

of(decoded)
2 - We =1

else
te-NO = 1

state, next: decoded-ste;


-Exercitic +--
V

① G stodeosa is conde colont in


Register tempore Tea atcoat
panther
executate in CAL, resultate
a
portra
Operousin
Mnei
Operatic
to
intermediate calculated adrsei efective we
is
accesbol de
set in word
explicit progromator.
Do?
⑧ Go
represent
Overflow/Deptire: in urma unei
operatic arituetice

resultated a un w.
pootic plea mare saw un

numor
negativ prea mic
penther a
putea fi represett
Toote
in
operandel destinatie. I ignoret in
operatile
a numer Ford came.
PUSHERB me exista
③ Le stocheot ii cond
e
folot AlE?
Peter a so stoa cokesa
portali or core se

doceste so so communice, Folosit cod se doceste


>

transmitcrea pe interfata
paralela.
④ 2 moduri de adesare:
* direct to
register: operondel so
gointe in C

MOV RA, RB + se trecel the RA, RB

imediate
*
operandel a
specificat in

introduce ex: MOV RA, I

⑤ Codificati XOR FBAXA*, RB

1100
· to
⑥ Deferent T
ii D.

T=1, adure resultated


a ur.
positive in a
pe
mai
multi bit
I

D=1, adun a the


positive/negative is obtice
un mr.
negativ/positiv
⑦ drex
Ciupet in, output on outputos,
sell
uput
&

module (outputo,
vodule
my- input [c.o] C,
wire out, outs, outs, ;
input se
indecex;
not NOT (out 2])
it
OR NOR
--- D Do
AND NAND
D DO

⑧ SBBRA, 7
- -

4 Th < PA

2. T7 Op+1

33. OPE T2

↳.

5.citice
AECP/ se pure
for a ve
out be
record
wagatrale
pure
6. THE RAita] /Ise - in Te
pure
E. THE Tn -
To

8. RA = Je

Abb RA,RB
I TH < PA
2. T2E RB
3. T1< T To -

4. RAE To =14 cicli

⑨ Devrie pe sat due RC

Fetch:

Up-Oe=1;
1.

ar-ve-i1l
peer
OP
pe mayestrd
2. aw-or-sill the eros
panel
3. rain-Ol=1;
riawe=z;/scoe in Rightro
Decode:Dec, we
operared,
wood adresore 11

Execute: The Re

th - We 1;
=

up-0c =1;?
Ti Re-1 adie Tn=Tn -1
apei
iNa CO

⑩ aduce instructune in
Etspade Fetch
registral instructive
mororox to R

1.
Up.t=1'
are NO
1;
=

2. all_Or=1;
3. rom-O1
li-We =1;
⑫ Rez Mis]
1. is.Ol=1,
aw-we=;11 pur is
pe magistrale"
2. au ocid; 11 to remove
per
3. Raum -Oc=1

regn-addr= 4C;
We =1;11 RC
regs, per pe

You might also like