abc Asembler - elektronski priručnik
VII dio Načini adresiranja

Direktno offset adresiranje

Ovaj način adresiranja koristi aritmetičke operatore da modifikuje adresu. Na primjer, pogledajmo sljedeće definicije koje definišu tabele podataka:

BYTE_TABLE    DB 14, 15, 22, 45         ; Tables of bytes
WORD_TABLE  DW 134, 345, 564, 123       ; Tables of words

Sljedeće operacije premještaju podatke iz tabela u memoriji u registre:

MOV  CL, BYTE_TABLE[2]   	; Gets the 3rd element of the BYTE_TABLE
MOV  CL, BYTE_TABLE + 2 	; Gets the 3rd element of the BYTE_TABLE
MOV  CX, WORD_TABLE[3] 	    ; Gets the 4th element of the WORD_TABLE
MOV  CX, WORD_TABLE + 3 	; Gets the 4th element of the WORD_TABLE

Direktno memorijsko adresiranje    <    Index    >    Indirektno memorijsko adresiranje