Concepts and Facilities of Operating Systems for Computer Scientists
Concepts and Facilities of Operating Systems for Computer Scientists CSC 246
Popular in Course
Popular in ComputerScienence
This 20 page Class Notes was uploaded by Jaden Jakubowski on Thursday October 15, 2015. The Class Notes belongs to CSC 246 at North Carolina State University taught by Staff in Fall. Since its upload, it has received 25 views. For similar materials see /class/223821/csc-246-north-carolina-state-university in ComputerScienence at North Carolina State University.
Reviews for Concepts and Facilities of Operating Systems for Computer Scientists
Report this Material
What is Karma?
Karma is the currency of StudySoup.
You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!
Date Created: 10/15/15
Basic Pentium Instructions October 18 656201 Section 002 Fall 2000 The EFLAGS Register Bi r 11 Overflow Flag Bi r 7 Sign Flag Bi r 6 Zer39o Flag Bi r O Carry Flag quotSe rs The flagsquot means se rs OF ZF SF CF in The quotnormalquot way CSC201 Secfion 00 Fall 7000 Operand Types and Notation Regis rer operands reg re932 re98 Memory operands mem mem32 mem8 Any memory addressing mode allowed unless specified o rherwise Immedia re values imm imm32 imm8 CSC201 Sec l ion Copyrighf 2000 Douglas Reeves 00 Fall 7000 quotmovquot Instruction Operand combinations regmam regimm quotmov EAX EBXquot quotmov EAX OA34Hquot quotmov EBP4 EAXquot quotmov myvar 022334455hquot Ano rher39 combina rion r39eg mem quotmov EAX mwarquot 8bi r versions of all of The above No effec r on flags CSC201 Secfion Copyrighf 2000 Douglas Reeves 00 Fall 7000 quotmovsxquot and quotmovzxquot Instructions Operands combina rion r39eg r39eg8mem8 quotmovsx EAX BLquot quotmovsx EAX mychar1quot No effec r on flags CSC201 Section Copyrighf 2000 Douglas Reeves 5 00 Fall 7000 quotleaquot Instruction Operand combina rion r39eg mem quotlea EBPmwarquot quotlea EBPmwar5quot No effec r on flags CSC201 Secfion Copyrighf 2000 Douglas Reeves 00 Fall 7000 Push and Pop Push Oper39and combination r39egmemimm push EAX push ES4 push 22AAFF33h Can also push a bytelength immediate Pop Oper39and combination regmem pop EAX pop mwar Cannot pop bytelength operands CSC201 Section Copyright 2000 Douglas Reeves 00 Fall 7000 quotoddquot and quotsubquot Instructions Operands regmem regimm quotadd myvar ECXquot quotsub EBX 22quot Ano rher combino rion reg mem quotadd EAX mwarquot 8bi r versions of The above Se r ring of The flags Overflow de rec r OF assumes operands ore rwoscomplemen r numbers Unsigned overflow de rec r use CF i ns reod CSC201 Sec l ion Copyrighf 2000 Douglas Reeves 00 Fall 7000 quotampquot Instruction Same as quotsubquot but r39esult value not stored in first operand Only sets the flags CSC201 Section Copyright 2000 Douglas Reeves 00 Fall 7000 quotincquot and quotsubquot Instructions Operand combina rion regmem Like quotadd operand 1quot and quotsub operand 1I 8bi r versions of The above Se rs The flags Overflow de rec r assumes operand is rwoscomplemen r number Does no r affec r CF unsigned overflow de rec r no r possible CSC201 Section Copyrighf 2000 Douglas Reeves 10 00 Fall 7000 quotnegquot Instruction Two39scomplemen r a number Operands r39eg mem quotneg EAXquot 8bi r versions of The above Se rs The flags CSC201 Section Copyrighf 2000 Douglas Reeves 11 00 Fall 7000 mulquot Instruction Unsigned mul riply Oper39and combina lion r39egmem Meaning EDXEAX lt EAX mg or39 mem mul EBX mul mydw1 There is an 8bit version we will no r use Only useful flag CF 0 means DX O o rher39wise CF 1 CSC201 Section Copyrighl 2000 Douglas Reeves 12 00 Fall 7000 quotimulquot Instruction Signed mul riply Oneaddress Twoaddress and Threeaddress for39ma rs Operands regmam EDXIEAX lt EAX reg or39 mem mul EBX Operands r39eg regmam reg lt r39eg mg or39 mem mul EAX mwar CSC201 Section Copyrighf 2000 Douglas Reeves 13 00 Fall 7000 quotimulquot Instruction Operand combina lion r39eg regmem imm r39eg lt mg or39 mem imm mul EAX myvar 55 There is an 8bit version we will no r use Only useful flag CF 0 means r39esul r fi rs in EAX alone or39 des rina rion r39egis rer39 CF 1 otherwise CSC201 Section Copyrighl 2000 Douglas Reeves 14 00 Fall 7000 quotdivquot Instruction Unsigned divide Operond combinoTion regmem EDX lt remainder of EDXEAX reg or mem EAX lt quo rien r div EBX There is an 8bit version we will no r use No effec r on flags bu r check for divide by zero or overflow possibili ry first Will genero re on excep rion program hol rs if you don39T co rch i r CSC201 Section Copyrighl 2000 Douglas Reeves 15 00 Fall 7000 divquot Instruction Signed divide O rher39wise some as quotdivquot CSC201 Secfion Copyrighf 2000 Douglas Reeves 00 Fall 7000 quotnotquot Instruction operand regmam quotnot 8bi r version also no effec r on flags CSC201 Section Copyrighf 2000 Douglas Reeves 17 00 Fall 7000 or quotandquot quotxorquot and quottestquot Instructions operands regmem regimm or EAX EDX r39eg mem or39 EAX myvar39quot 8bi r versions also affec rs SF and ZF no r CF or OF quot res rquot only affec rs The flags no resul r s ror39ed No re xor39ing a value wi rh i rself clears i r To 0 programming Trick CSC201 Section Copyrighf 2000 Douglas Reeves 18 00 Fall 7000 shr39 sar39quot quotSHquot and quotsalquot Instructions operands regmem cIimm8 sar39 dwor d ptr39 EBP 8 1 shr39 EAX CLquot cl and imm8 should have a value between 0 and 31 shr39 does zer39o fill sar39 does sign extension shl and sar39 do some thing 8bit ver39sions also but imm8 can only 1 affects ZF SF and CF SM and mm CF leastsignificantbit before shifting shl and sal CF mostsignificantbit befor39e shifting CSC201 Section Copyright 2000 Douglas Reeves 19 00 Fall 7000 quotmlquot and quotr39or39quot Instructions operands regmem cIimm8 r39or39 dwor39d p rr39 EBX 4 ml EAXCLquot CI and imm8 should have a value be rween O and 31 8bi r versions also bu r imm8 can only 1 offec rs ZF SF and CF r39or39 CF leastsignificon rbi r before shif ring r ol CF mostsignificon rbi r before shif ring CSC201 Section Copyrighf 2000 Douglas Reeves 20 00 Fall 7000
Are you sure you want to buy this material for
You're already Subscribed!
Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'