8088 assembly speed check manual
8088 assembly speed check brochure 1, data transfer instructions - ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ────── ─ ─ Transfer data between the memory and registers, registers, and input and output ports. 1. General Data Transfer Directive. MOV Transfer word or word Festival. Movsx First symbol extension, then transfer. Movzx First zero extension, then transfer. Push Press the word into the stack. Pop pull the word Pop up the stack. pusha Press the AX, CX, DX, BX, SP, BP, SI, DI sequentially into the stack. Popa Put Di, Si, BP, SP, BX, DX, CX, AX sequentially pops up. pushad Press EAX, ECX, EDX, EBX, ESP, EBP, ESI, EDI sequentially into the stack. Popad EDI, ESI, EBP, ESP, EBX , EDX, ECX, EAX sequentially pops up the stack. Bswap swaps the order of the 32-bit registers to exchange words or bytes. (At least one operand is the register, the segment register is not As an operand) cmpxchg compares and exchanges the operand. (The second operand must be accumulator Al / Ax / eax) xadd First exchange recovery. (The result is in the first operation Miles) XLAT byte check table conversion. ─- BX points to the starting point of a 256-byte table, Al is the index value of the table (0-255, ie 0-ffh); return Al is the results of the surfriend. ([BX Al] -> Al) 2. Enter the output port transfer command. ini / O port input. (Syntax: IN accumulator, {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {port number {语:: OUT {port number │DX}, accumulator) When the input and output port is specified immediately, its range is 0-255; when the register DX is specified, the range is 0-65535. 3. Destination address transfer command. LEA Loading effective address. Example: Lea DX, String ; Departing the offset address to DX. LDS Transfer the target pointer, put the pointer content into the DS. : LDS Si, String ; Put the section address: Offset Address to DS: Si. les Transfer the target pointer, put the pointer content into the ES. : Les D I, String ; Put the segment address: Offset address to ES: Di. LFS Transfer the target pointer, put the pointer content into the FS. Example: LFS Di, String ; Segment address: The offset address is deposited to FS: Di. lgs Transfer the target pointer, put the pointer content into GS. Example: LGS Di, String ; Put the segment address: Offset address Save to GS: Di. lss Transmit the target pointer to load the pointer content into SS. : LSS Di, String ;
Send the segment address: Offset Address to SS: DI. 4. Sign Transfer Instruction. lahf flag register transmits, load the flag into ah. SAHF flag register transfer, AH Content Load Sign Register. Pushf Sign in the Stack. Popf Sign Out Stack. pushd32 Bit Sign In Stack. Popd32 Bit Sign Out of the stack. Second, arithmetic operation instructions - ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── Add 加 加. Adc Belts carry the addition. c plus 1. AAA add ASCII code adjustment. daa add Ten etch adjustment. SUB subtraction. SBB Borrow subtraction. DEC 1. nec reverse (with 0 minus). Comparison of cmp. (Two operations subtilion, only modify the flag, no return result). ASCII code adjustment of aas subtraction. Decimal adjustment of das subtraction mul No symbol multiplication. imul integer multiplication. Many of the two, the result is sent to AH and Al (byte operation), or DX and AX (word operation) ASCII code adjustment of the multiplication of Am . div No symbol division. IDIV integer division. 两, 结果 回 回 回:: 送: 商 回 送, the remainder return AH, (byte operation); or 商 回 送 AX, the remainder return DX, (word operation). ASCII code adjustment of AAD CBW byte converted to the word. (Extended the symbol of the AL to AH) CWD word to double words. (Extend symbolic symbol in AX Go to DX) CWDE word converted to double words. (Extend the word symbol in the AX to Eax) CDQ double word extension. (Put the word in Eax) Symbol extension to EDX) three, logical operations - ──────────────────────────────── ─ or calculation. 或 或. NOT to reverse. Test Test. (Two Operations and Operations, only modify the flag, no return results). SHL logic left shims. SAL arithmetic left shift. (= ShL) SHR logic right shift. SA R Algorithography right shift. (= Shr) rol Cycle left shift. ror loop right shift. rcl Transmission by the cycle of the company. rcr Moves the right to relay. The above eight shift instructions, the number of shifts can reach 255 times. When shifting once, you can use the opcode directly. such as SHL AX, 1. shift> 1 time, the number of shifts is given by the register CL. such as MOV CL, 04 SHL AX, CL four, string instructions - ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ─ DS: Si source segment register : Source string address. ES: DI target serial register: Target String address. CX Repeat number counter. al / AX scan value. D flag 0 indicates that Si and Di should be automatically incremented in repeated operation; 1 indicates automatic reduction. Z flag is used to control the end of scanning or comparison operations. Movs String. (Movsb Transfer Character. Movsw Transfer word. Movsd Transfer double word.) cmps string comparison. (CMPSB Compare characters. cmpsw comparison word.) SCAS String scan. Compare the contents of Al or AX with the target string, the comparison results are reflected in the flag. lods load strings. Take the elements in the source string (word or bytes) Map of Al or AX one by one. (LODSB Transfer character. lodsw Transfer word. lodsd Transfer double word.) stos Save strings. is the reverse process of LODS. rep is when CX / ECX <>