Syntax: IN 8-bit Where 8-bit is an output port address. Byte: 2byte Addressing Mode: Direct Addressing Working: 1. 2. Example: IN 35H Where [35H]= 20 H After execution of above [A] = 20H
One Byte Instructions needs only one Byte of memory for execution. Here, in these instructions, general purpose registers are used as operands i.e. Source Register Rs and Destination Register Rd. Example: MOV , LDAX , STAX , XCHG
Syntax: ADI 8-bit Where 8-bit is an immediate data operand. Byte: 2byte Addressing Mode: Immediate Addressing Working: 1. 2. 3. 4. Flag Example: ADI 22H where [A]= 11H After execution of ADI 22H [A] = 33H Program: write an ALP for 8bit addition of value present in Register A that is 44H with an immediate value 30H. Store result at memory location 5000H. Label Mnemonics Comments Start: ADI 30H STA 5000H Stop: HLT Output: [5000H]= 74H
Comments
Post a Comment