You are on page 1of 3

30/09/2010

The Intel 8086 / 8088/ 80186 / 8028

The Intel 8086 / 8088/ 80186 / 80286 / 80386 / 80486 Jump Instructions

This is 8086.tk.

This HTML version of the file intel.doc from the PC Game Programmer's guide was produced by Zack Smith, fbuiNOSPAM@comcast.net. Fancy HTML modifications are copyright 2005 by Zack Smith, all rights reserved. This information is provided in the hope that it will be useful, but without any warranty; it is provided AS-IS, without even the implied warranty of fitness for a particular purpose.

J Instructions
Jxx - Jump Instructions Table
Mnemonic JA JAE JB JBE JC JCXZ JE JG JGE JL JLE JMP JNA JNAE JNB JNBE JNC JNE JNG JNGE JNL JNLE JNO JNP JNS JNZ JO JP JPE JPO JS JZ Meaning Jump if Above Jump if Above or Equal Jump if Below Jump if Below or Equal Jump if Carry Jump if CX Zero Jump if Equal Jump if Greater (signed) Jump if Greater or Equal (signed) Jump if Less (signed) Jump if Less or Equal (signed) Unconditional Jump Jump if Not Above Jump if Not Above or Equal Jump if Not Below Jump if Not Below or Equal Jump if Not Carry Jump if Not Equal Jump if Not Greater (signed) Jump if Not Greater or Equal (signed) Jump if Not Less (signed) Jump if Not Less or Equal (signed) Jump if Not Overflow (signed) Jump if No Parity Jump if Not Signed (signed) Jump if Not Zero Jump if Overflow (signed) Jump if Parity Jump if Parity Even Jump if Parity Odd Jump if Signed (signed) Jump if Zero Size 808x 286 386 486 Bytes 16 4 7+m 7+m 3 3 3 1 4 2 Jump Condition CF=0 and ZF=0 CF=0 CF=1 CF=1 or ZF=1 CF=1 CX=0 ZF=1 ZF=0 and SF=OF SF=OF SF != OF ZF=1 or SF != OF unconditional CF=1 or ZF=1 CF=1 CF=0 CF=0 and ZF=0 CF=0 ZF=0 ZF=1 or SF != OF SF != OF SF=OF ZF=0 and SF=OF OF=0 PF=0 SF=0 ZF=0 OF=1 PF=1 PF=1 PF=0 SF=1 ZF=1

Clocks Operands Jx: jump no jump

Jx: near-label no jump -

7+m 3 3 1

- It's a good programming practice to organize code so the expected case is executed without a jump since the actual jump takes longer to execute than falling through the test. - see JCXZ and JMP for their respective timings

JCXZ/JECXZ - Jump if Register (E)CX is Zero


Usage: JCXZ label JECXZ label Modifies flags: None

(386+)

Causes execution to branch to "label" if register CX is zero. unsigned comparision.

Uses

home.comcast.net/~fbui/intel_j.html

1/3

30/09/2010
Operands label:

The Intel 8086 / 8088/ 80186 / 8028


808x 18 6 Clocks 286 386 8+m 4 9+m 5 486 8 5 Size Bytes 2

jump no jump

JMP - Unconditional Jump


Usage: JMP target Modifies flags: None Unconditionally transfers control to "label". Jumps by default are within -32768 to 32767 bytes from the instruction following the jump. NEAR and SHORT jumps cause the IP to be updated while FAR jumps cause CS and IP to be updated. Clocks 286 386 7+m 7+m 7+m 11+m 15+m 38+m 175+m 180+m 41+m 178+m 183+m 7+m 7+m 7+m 7+m 7+m 10+m 10+m 12+m 27+m 45+m TS TS 43+m 31+m 49+m 5+TS 5+TS 12+m 27+m 45+m TS TS 43+m 31+m 49+m 5+TS 5+TS

Operands rel8 (relative) rel16 (relative) rel32 (relative) reg16 (near, register indirect) reg32 (near, register indirect) mem16 (near, mem indirect) mem32 (near, mem indirect) ptr16:16 (far, dword immed) ptr16:16 (far, PM dword immed) ptr16:16 (call gate, same priv.) ptr16:16 (via TSS) ptr16:16 (via task gate) mem16:16 (far, indirect) mem16:16 (far, PM indirect) mem16:16 (call gate, same priv.) mem16:16 (via TSS) mem16:16 (via task gate) ptr16:32 (far, 6 byte immed) ptr16:32 (far, PM 6 byte immed) ptr16:32 (call gate, same priv.) ptr16:32 (via TSS) ptr16:32 (via task state) m16:32 (far, address at dword) m16:32 (far, address at dword) m16:32 (call gate, same priv.) m16:32 (via TSS) m16:32 (via task state)

808x 15 15 11 18+EA 24+EA -

486 3 3 3 5 5 5 5 17 19 32 42+TS 43+TS 13 18 31 41+TS 42+TS 13 18 31 42+TS 43+TS 13 18 31 41+TS 42+TS

Links
Software FramebufferUI (FBUI): My in-kernel windowing system for Linux. Frugal Windowing Environment (FWE): My simpler user-space windowing system for Linux. FrugalWidgets: My C++ based widget set for Win32. Bandwidth: My C-based benchmark to measure memory bandwidth. Maxilla: My OpenGL-based VRML viewer for Windows. bmplib: My library for creating BMP image files. C@: My experimental compiler. Muvy: My video editor for Windows. Wanderlust: My outline editor for Windows. Documentation My nicely formatted overview of Intel 8088, 8086, 80186, 80286, 80386, 80486 (x86) instruction set Notes on programming in C++. Notes on using Visual C++. List of Windows (Win32) messages. Notes on programming with OpenGL. Notes on Linux programming. Method for creating a bootable live Linux flash drive. Notes on Linux administration. Free software recommendations. Criticisms of cloud computing. Notes on Android programming. Notes on iOS programming. Object-oriented C programming. A few notes on using TeX/LaTeX. My Linux installation guides. Linux on the CTX Ezbook 700 Linux on the Compaq LTE 5280 Linux on the Lenovo 3000 N200 Linux on the Thinkpad 380ED Linux on the Thinkpad 560e Linux on the Thinkpad 560x Linux on the Thinkpad 560z Linux on the Thinkpad T500 Linux on the Toshiba 2065CDS

home.comcast.net/~fbui/intel_j.html

2/3

30/09/2010

The Intel 8086 / 8088/ 80186 / 8028


Linux on the Toshiba A105 Linux on the Toshiba A135 Linux on the Toshiba A205 Linux on the Toshiba A215 Linux on the Toshiba M35x Linux on the Toshiba P205 Two sites offering big listings of pages on installing Linux on virtually every type of laptop: TuxMobil Linux on Laptops Other Various files

home.comcast.net/~fbui/intel_j.html

3/3

You might also like