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 STOSB and STOSW instructions are used to save data in AX to the memory pointed to by the DI register.
After each call to the DI register is incremented by one byte for STOSB or by two bytes for STOSW.
DI is decremented backwards when the direction flag is set using the STD instruction.
- STOSB saves 1 BYTE from AL
- STOSW saves 1 WORD from AX.
These commands are limited to the current ES code segment.
This command has 1 part, the Instruction.
This example reads 16 single bytes from SI and saves them in DI before exiting the LOOP.
Assembly
SampleDescription 16 bit Machine
CodeMOV CX, 0x0010 ; Assign 10h (16) to the Counter CX B9 10 00 MOV SI, DataString ; Assign SI to point at a memory
; location to be read.BE 26 01 MOV DI, DataOut ; Assign DI to point at a memory
; location to save in.BF 36 01 LODSB ; Load one byte into AL from SI AC STOSB ; Save one byte from AL to DI AA LOOP 0xFC ; LOOP back to LODSB to read each
; byte until CX = 0E2 FC