Professional Documents
Culture Documents
CPE-3 / COE119-C1
Homework #2
Conditional and Unconditional JMP
instructions:
Unconditional jump:
This is performed by the JMP instruction.
Conditional execution often involves a
transfer of control to the address of an
instruction that does not follow the
currently executing instruction. Transfer
may be forward, executing a new set of
instructions or backward, to re-execute the
same steps.
Conditional jump:
This is performed by a set of jump
instructions j<condition> depending upon
the condition. The conditional instructions
transfer the control by breaking the
sequential flow and they do it by changing
the offset value in IP.
If some specified condition is satisfied in
conditional jump, the control flow is
transferred to a target instruction.
Following are the conditional jump
instructions used on signed data used for
arithmetic operations:
Syntax
The JMP instruction provides a
where the flow of control is
immediately. The syntax of
instruction is : JMP Label (the
tabulated above)
label name
transferred
the JMP
commands
Flow Charting :
An Example of a decision Flowchart
A sequential
flowchart follows
a strict step-bystep process. One
cannot
skip
immediately to
the end.
X86 OP CODES
125.
SETLE/SETNG - Set if Less or
Equal / Set if Not greater or Equal
126.
SETG/SETNLE - Set if Greater /
Set if Not Less or Equal
127.
SETS - Set if Signed
128.
SETNS - Set if Not Signed
129.
SETC - Set if Carry
130.
SETNC - Set if Not Carry
131.
SETO - Set if Overflow
132.
SETNO - Set if Not Overflow
133.
SETP/SETPE - Set if Parity /
Set if Parity Even
134.
SETNP/SETPO - Set if No
Parity / Set if Parity Odd
135.
SGDT - Store Global Descriptor
Table
136.
SIDT - Store Interrupt Descriptor
Table
137.
SHR - Shift Logical Right
138.
SHLD/SHRD - Double Precision
Shift
139.
SLDT - Store Local Descriptor
Table
140.
SMSW - Store Machine Status
Word
141.
STC - Set Carry
142.
STD - Set Direction Flag
143.
STI - Set Interrupt Flag
144.
STOS - Store String
145.
STR - Store Task Register
146.
SUB - Subtract
147.
TEST - Test For Bit Pattern
148.
VERR - Verify Read
149.
VERW - Verify Write
150.
WAIT/FWAIT - Event Wait
151.
WBINVD - Write-Back and
Invalidate Cache
152.
XCHG - Exchange
153.
XLAT/XLATB - Translate
154.
XOR - Exclusive OR
SOURCES :
https://www.tutorialspoint.com/assembly_progra
mming/assembly_conditions.htm
http://creately.com/blog/diagrams/flowchartguide-flowcharttutorial/#HowToDrawFlowchart
http://www.mathemainzel.info/files/x86asmref.h
tml