- 2072 Asoj · 4 marks
Short note: INX, XTHL, MUL, JG
Short answer
INX increments a register pair by 1, no flags affected. XTHL exchanges HL with top of stack without altering SP. MUL (8086) performs unsigned multiply, e.g., AX=AL×src; CF/OF set if upper half nonzero. JG (8086) jumps if signed greater, i.e., ZF=0 and SF=OF.
Write short notes on: INX, XTHL, MUL, JG.
INX (Increment register pair) - 8085
INX rp increases the 16-bit content of a register pair (BC, DE, HL or SP) by 1. It is a 1-byte, 6T instruction and no flags are affected. It is used to move pointers through tables.
LXI H,2000H
INX H ; HL = 2001H
XTHL (Exchange top of stack with HL) - 8085
Exchanges L with the byte at M[SP] and H with the byte at M[SP+1]; SP is unchanged and no flags are affected (1 byte, 16T). It is used to replace a value on the stack, for example the return address.
MUL - 8086 (not available in 8085)
The 8085 has no multiply instruction (multiplication is done by repeated addition or shift-and-add). In the 8086, MUL src performs unsigned multiplication:
- Byte: AX <- AL x src8
- Word: DX:AX <- AX x src16
CF and OF are set if the upper half of the result (AH or DX) is non-zero; other flags are undefined. (IMUL is the signed version.)
MOV AL,05H
MOV BL,04H
MUL BL ; AX = 0014H
JG - 8086 (not available in 8085)
JG label (same as JNLE) is a conditional jump for signed numbers: it jumps if the first operand is greater than the second after a CMP, that is when ZF = 0 and SF = OF. It is a 2-byte instruction with an 8-bit relative displacement (-128 to +127).
CMP AX,BX
JG BIGGER ; jump if AX > BX (signed)
✓ Answer checked by Claude Opus 5.5 (high effort)