If (Input_X==1 && Input_Y =1 )
 For (24bit_counter=1; 24bit_counter<256,000; 24bit_counter++)
 {
  Read 8 bit data from ADC
  latch 24bit_counter to the SRAM Address
  Store Data to the Sram
  Increment the 24 Bit Counter
 }