16 bit Assembly
Home Site Map Instruction Index
16 bit Assembly Language
Introduction
The following instructions exclude those used for Protected Mode. I have also excluded 32 bit calls as this site is about 16 bit assembly code.
Compiled code uses a simple method to identify the correct Register combination. It base on the Register sequence shown below.
AX=00 CX=01 DX=02 BX=03 SP=04 BP=05 SI=06 DI=07 ES=08 CS=09 SS=0A DS=0B FS=0C GS=0D EFlags 16 bit addressing is different from the 32 bit compilations.
[BX+SI]=0 [BX+DI]=1 [BP+SI]=2 [BP+DI]=3 [SI]=4 [DI]=5 [BP]=6 [BX]=7 In Reg to Reg calculations one Operand code value is multiplied by 8 and added to the other Operand code value. Finally they are added to an Instruction specific number.
Hence with MOV BX, CX = Second + (First * 8) + 192 (C0h) = 1+(3*8)+193 = 217 (D9h), So the full instruction generates 8B D9.
Instructions
ADC - Add with Carry.html
ADD - Add.html
AND - Bitwise AND.html
CALL - Call Routine.html
CLC - Clear Carry Flag.html
CLD - Clear Direction.html
CLI - Clear Interupt Flag.html
CMPS - Compare.html
CMP - Compare.html
DEC - Decrement.html
DIV - Divide.html
HLT - Halt.html
IDIV - Divide Signed.html
IMUL - Multiply Signed.html
INC - Increment.html
INS - Input.html
INT - Interupt.html
IN - Input.html
IRET - Interupt Return.html
JMP - Jump.html
J - Jump Conditional.html
LAHF - Load Flags.html
LDS - Load Far Pointer.html
LEA - Store Address.html
LES - Load Far Pointer.html
LFS - Load Far Pointer.html
LGS - Load Far Pointer.html
LODSB - LODSW - Load.html
LODS - Load.html
LOOP - Loop.html
LSS - Load Far Pointer.html
MOVSB - MOVSW - Move Far.html
MOVS - Move.html
MOV - Move.html
MUL - Multiply.html
NEG - Negate.html
NOP - No Operation.html
NOT - Bitwise NOT.html
OR - Bitwise OR.html
OUTS - Output.html
OUT - Output.html
POP - Stack Retrieval.html
PUSH - Stack Store.html
RCL - Roll Left.html
RCR - Roll Right.html
REP - Repeat.html
RET - Return.html
ROL - Roll Left.html
ROR - Roll Right.html
SAHF - Save Flags.html
SAL - Shift Left.html
SAR - Shift Right.html
SBB - Subtract with Borrow.html
SCAS - Compare.html
SET - Set Condition.html
SHL - Shift Left.html
SHR - Shift Right.html
STC - Set Carry Flag.html
STD - Set Direction.html
STI - Set Interupt Flag.html
STOSB - STOSW - Store.html
STOS - Store.html
SUB - Subtract.html
TEST - Compare.html
XADD - Exchange and And.html
XCHG - Swap.html
XOR - Bitwise XOR.html