Array: Difference between revisions

Content added Content deleted
Line 112: Line 112:


;8086 Assembly
;8086 Assembly
mov ax,[bx+di] ;load the BXth element of the array whose beginning is stored in DI, into AX
mov ax,[bx+di] ;load the BXth element of the array whose beginning is stored in DI, into AX.
;alternatively, load the DIth element of the array whose beginning is stored in BX, into AX.


;ARM Assembly
;ARM Assembly
ldr r0,[r1,#4] ;load the 1st element of the array whose pointer to its 0th element is stored in r1, into r0.</lang>
ldr r0,[r1,#4] ;load the 1st (zero-indexed) element of the array whose pointer to its 0th element is stored in r1, into r0.</lang>


====Encoding an Array's End====
====Encoding an Array's End====