jaredec18

Untitled

Sep 17th, 2019
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. Address 52 is the beginning of a string "ABC". Since each ASCII character is one byte, we can assume than address 52 and two consecutive addresses stores "A", "B","C", i.e. address 52 stores "A", address 53 stores "B", address 54 stores "C".
  2.  
  3. So code to send each byte of the string to the printer,
  4.  
  5. load R0, 52 (Copies data at address 52 to register 0)
  6.  
  7. save R0, 1 (Copies data from the register 0 to the printer at address 1)
  8.  
  9. load R1, 53 (Copies data at address 53 to register 1)
  10.  
  11. save R1, 1 (Copies data from the register 1 to the printer at address 1)
  12.  
  13. load R2, 54 (Copies data at address 54 to register 2)
  14.  
  15. save R2, 1 (Copies data from the register 2 to the printer at address 1)
Advertisement
Add Comment
Please, Sign In to add comment