16 bit Assembly
ADC - Add with Carry
ADD - Add
AND - Bitwise AND
CALL - Call Routine
CLC - Clear Carry Flag
CLD - Clear Direction
CLI - Clear Interupt Flag
CMPS - Compare
CMP - Compare
DEC - Decrement
DIV - Divide
HLT - Halt
IDIV - Divide Signed
IMUL - Multiply Signed
INC - Increment
INS - Input
INT - Interupt
IN - Input
IRET - Interupt Return
JMP - Jump
J - Jump Conditional
LAHF - Load Flags
LDS - Load Far Pointer
LEA - Store Address
LES - Load Far Pointer
LFS - Load Far Pointer
LGS - Load Far Pointer
LODSB - LODSW - Load
LODS - Load
LOOP - Loop
LSS - Load Far Pointer
MOVSB - Move Far
MOVSW - Move Far
MOVS - Move
MOV - Move
MUL - Multiply
NEG - Negate
NOP - No Operation
NOT - Bitwise NOT
OR - Bitwise OR
OUTS - Output
OUT - Output
POP - Stack Retrieval
PUSH - Stack Store
RCL - Roll Left
RCR - Roll Right
REP - Repeat
RET - Return
ROL - Roll Left
ROR - Roll Right
SAHF - Save Flags
SAL - Shift Left
SAR - Shift Right
SBB - Subtract with Borrow
SCAS - Compare
SET - Set Condition
SHL - Shift Left
SHR - Shift Right
STC - Set Carry Flag
STD - Set Direction
STI - Set Interupt Flag
STOSB - STOSW - Store
STOS - Store
SUB - Subtract
TEST - Compare
XADD - Exchange and And
XCHG - Swap
XOR - Bitwise XOR
The AND Instruction performs and AND action with the second operand on the first operand.
However 2 memmory addresses cannot be used together.
The first operand holds the result of this operation. All matching bits set to 1 in both operands result in that bit being returned as a 1 otherwise the bit is set to 0.
This command has 3 parts, Instruction, then either operand can be a Register or Immediate value or a memory address.
Assembly
SampleDescription 16 bit Machine
CodeMOV AX, 0x02F2 ; Assign a value to AX B8 F2 02 MOV BX, 0x0020 ; Set Address of BX BB 20 00 MOV [BX], 0x0106 ; Assign a value to address at BX C7 07 06 01 AND AX, 0x00F2 ; AND a 16 bit immediate to AX 25 F2 00 AND [BX], 0x00F2 ; AND a 16 bit immediate to an address 81 27 F2 00 AND AH, AL ; AND two 8 bit Registers 22 C4 AND AX, BX ; AND two 16 bit Registers 23 D8 AND [BX], AX ; AND a Register to an Address 21 07 AND AX, [BX] ; AND an address to a Register 23 07