First page Back Continue Last page Overview Graphics

Loading Data into an Array


This program reads input port $ae and stores the values read in memory starting at location array. Index register X is initialized to 0, and the first byte of data is stored at location array+0. After the value is stored, register X is incremented so that the next time through the loop the value read from the input port will be stored at location array+1. The program continues to loop until index register X contains a 50. The program structure is do-while.

As a practical matter there is no delay in the loop and values will be read in quick succession, possibly filling the array with the same value.