just a jack program. I know
makes i=100 but i dont know how to make an array like a and initialise it
You can set a to 0 like this:
A=A+D // A = memory address of a
To set a to an arbitrary value is a bit tricky because you need the value in D and the array element address in A. You should not need to do this until chapter 7. Hint: to do this you need to use one of the "registers" like R15 to hold either the address or the data for the array element.
Working backwards you need 17 in D and arr+j in A so that the last instruction
will set arr[j] = 17.
The only way to get 17 in D is by using A either as @17 or as a memory address for some RAM that contains 17.
Now you need to get arr+j into A without changing D. The only way to do this is to have arr+j stored in RAM somewhere.
You will need to use a temporary variable. Do something like
compute R15 = arr+j
load 17 into D
load R15 value into A