title: LC3 assembly language - create 2 arrays, multiply, and add sums
body: <p>I am trying to figure out how to create two arrays (hardcoded), multiply them together (a[0]x b[0], a[1]x b[1] ...etc.) and then add the sums together and print it.</p>
  
  <p>I don't have much yet but that's because I am still getting used to this. Please please please help!</p>
  
  <p>What I have so far is listed below -</p>
  
  <pre><code>.ORIG x3000
  LEA R1, arr1
  LEA R2, arr2 
  AND R3, R3, #0  ;index 
  AND R4, R4, #0  ;total
  
  
  LOOP    ADD R4, R3, #4  
  BRzp    DONE    
  ADD R5, R1, R3  
  LDR R6, R5, #0  
  ADD R4, R4, R6  
  ADD R3, R3, #-1     
  BR  LOOP
  
  HALT
  
  arr1    .FILL   5   
  .FILL   2   
  .FILL   7   
  .FILL   3    
  arr1    .FILL   7   
  .FILL   4   
  .FILL   1   
  .FILL   2   
  
  .END
  </code></pre>
  
  <p>Please and thanks,</p>
  
  <p>Kristyn</p>