Cards (6)

  • Modes of Addressing:
    • Immediate
    • Direct
    • Indirect
    • Indexed
    • Immediate Addressing 
    • Operand is part of the instruction itself 
    MOV AX, 1234h // Moves the immediate hex value 1234h to the AX register
    • Direct Addressing 
    • The memory address of the operand is directly specified 
    MOV AX, [1234h] // Take the value stored in memory location 1234h and move to the AX register 
  • Indirect Addressing #1
    • A register contains the memory address of the operand 
    • If BX contains the value 2000h
    MOV AX, [BX] // Moves the value from memory location 2000h to the AX register 
    • This does not mean "Move the value 2000h into AX" 
    • Instead, it means, "Look in the memory address 2000h (the value currently stored in the BX register) and move whatever value you find into the AX register." 
  • Indirect Addressing
    • When brackets [ ] are around a register in assembly language (like [BX]), it's an instruction to treat the value inside that register as a memory address and to use the data at that memory address for the operation 
    • Indexed Addressing 
    • Combines a base address with an index to compute the effective address 
    • If BX contains 0050h and SI has a base address 1000h
    MOV AX, [BX + SI] // Move the value at memory location 1050h to AX 
    • Fetches data from the effective address (because 1000h + 0050h is 1050h) and moves it into the AX register