Class Notes (1,100,000)
CA (620,000)
UW (20,000)
ECE (200)
ECE222 (10)
Lecture 5

# ECE 222 Lecture 5: Interrupts

Department
Electrical and Computer Engineering
Course Code
ECE222
Professor
Gordon Agnew
Lecture
5

This preview shows half of the first page. to view the full 2 pages of the document.
Binary'Number'Systems
!"#\$%&\$'%(&#\$")*'+
,"-.)/0")/"./(&#\$")*'+1/2/34-/54.")"6+/&\$'/7/"./\$+#&)"6+
89&(5:+;
222 2
227 7
272 <
277 =
722 %2
727 %7
772 %<
777 %=
>
7?./@4(5:+(+\$)
,"-.)/0")/"./2/34-/54.")"6+1/3:"5/)A+/0")./)4/#+)/")?./\$+#&)"6+/6&:*+
B''")"4\$1/"3/\$4/@&--C/4@@*-.1/&\$.D+-/"./@4--+@)
E3/@&--C/4@@*-.1/@4--+@)/&\$.D+-/0C/&''"\$#/0&@F//7/0&@F
2722GHI
§
7272G%JI
§
K7772/G%7I
§
2772GLI
§
7277G%HI
§
G7I2227/%M/&''/)A&)/4\$+/0&@F/)4/#+)/2272/G<I
§
E3/)A+/."#\$./43/)A+/&''+\$'./&-+/)A+/.&(+1/."#\$/43/&\$.D+-/(*.)/0+/)A+/
.&(+1/"+/7777/N/7277/(*.)/A&6+/&\$/&\$./43/7
89&(5:+;
222 2
227 7
272 <
277 =
722 %=
727 %<
772 %7
777 %2
>
<?./@4(5:+(+\$)
O&F+/)A+/4\$+?./@4(5:+(+\$)/&\$'/&''/7
E3/)A+/."#\$./43/)A+/&''+\$'./&-+/)A+/.&(+1/."#\$/43/&\$.D+-/(*.)/0+/)A+/
.&(+1/"+/7777/N/7277/(*.)/A&6+/&\$/&\$./43/7
2722GHI
§
2277G=I
§
K2777GPI
§
1277G%JI
§
1272G%LI
§
G7I0727//%//Q\$'+-3:4D
§
E3/)A+/."#\$./43/)A+/&''+\$'./&-+/'"33+-+\$)1/"#\$4-+/&\$C/@&--"+.
>
89&(5:+;
222 2
227 7
272 <
277 =
722 %H
727 %=
772 %<
777 %7
Basic'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&\$'/(46+./)A+/\$+9)/:4D+-/+:+(+\$)/)4/)A+/
)45
>
B-(/*.+./&/0-&\$@A/&\$'/:"\$F/GRTI/"\$.)-*@)"4\$/34-/.*0-4*)"\$+/@&::.>
V+)*-\$/&''-+../"./.)4-+'/"\$/V7H>
E\$/BVS1/)A+/.)&@F/"./-+&:"a+'/"\$/(+(4-C/D")A/)A+/&"'/43/V7=1/@&::+'/.)&@F/54"\$)+->
!)&@F/@&\$/#-4D/)4/+")A+-/.(&::+-/4-/:&-#+-/(+(4-C/&''-+..+.1/*.*&::C/]:4D+-]/)4/
5-+6+\$)/@4::"."4\$
>
!)&@F/X4"\$)+-/&:D&C./54"\$)"\$#/)4/)A+/top'of'stack>
O4/5*.A/.4(+)A"\$#/"\$/)A+/.)&@F1
!OV/V21bV7=1/c%Hde/%'+@-+(+\$)/0C/&55-45-"&)+/&(4*\$)1/*5'&)+/.)&@F/
54"\$)+-
>
Assembly'Languages'and'Assemblers
O-&\$.:&)"4\$/43/&/5-4#-&(/D-"))+\$/"\$/&..+(0:C/:&\$#*&#+/)4/&/5-4#-&(/"./
5+-34-(+'/0C/&\$/&..+(0:+-
>
E\$.)-*@)"4\$./&-+/)-&\$.:&)+'/4\$/& one-to-one 0&.".>
>
E\$/&..+(0:C//:&\$#*&#+.1/4\$+/.)&)+(+\$)/K/4\$+/"\$.)-*@)"4\$/GD")A/&/@4*5:+/43/
+9@+5)"4\$.I
>
YWY/:&0+:./&\$'/"\$")"&:"a+./)A+/6&:*+/43/45+-&\$'.
!QS/YWY/2/&..4@"&)+./!QS/D")A/&/(+(4-C/:4@&)"4\$/&\$'/.+)./)A&)/
:4@&)"4\$./6&:*+/)4/a+-4
>
O8\/8fQ/72/&..4@"&)+./)A+/6&:*+/72/D")A/)A+/:&0+:/O8\>
Input/Output'Systems'
OC5+./43/)-&\$.3+-.
X&-&::+:
S*:)"5:+/0")./)-&\$.3+--+'/."(*:)&\$+4*.:C
["#A/.5++'1/0*)/+95+\$."6+
>
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