Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing Arrays

Status
Not open for further replies.

vinicrestani

Programmer
Joined
Jun 7, 2010
Messages
1
Location
BR
Hello,

Please, I need help to learn how I access a data at array.

For example, I have 2 arrays...

Array1 DB 30h,32h,40h
Array2 DB 32h,43h,22h

How I'd do for compare the second element in array1 with de first element of array2?

Thanks...
 
Assuming option base zero, IF Array1(1) = Array2(0)...

Beir bua agus beannacht!
 
Crud! Sorry - thought I was in the VBA forum [banghead]

Beir bua agus beannacht!
 
The simplest way would be something like this:

Code:
...
mov al, array1+1  ; move 2d element of array1 into al
mov ah, array2    ; move 1st element of array2 in to ah
cmp al, ah        ; execute compare of ah to al
je SomeLabel      ; if they are equal, jmp
...
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top