Advertisement

Arrays in ASM

Started by January 08, 2001 07:14 AM
0 comments, last by Arkon 24 years ago
hello could any one show me how to set the first cell of an array to zero in ASM??? thanks
sure, remember, the address of the first cell of the array is the address of the array itself. so...

.data
intarray db 2h,10h,33h,4h,19h //if this is the array
.code
mov si, offset intarray //store the address of intarray in si
mov al, 0h //set accumulator to zero
mov [si], al //store zero in first position

simple enough right?!?

This topic is closed to new replies.

Advertisement