Arrays in ASM
hello
could any one show me how to set the first cell of an array to zero in ASM???
thanks
January 09, 2001 07:42 PM
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?!?
.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
Popular Topics
Advertisement
Recommended Tutorials
Advertisement