Advertisement
rakiru

LMC Remainder Calculator

May 14th, 2012
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. LDA BIG //Load dividend...
  2. LOOPSTART STA REMAINDER //...and store as current remainder
  3.  
  4. LDA BIG //Load in dividend
  5. SUB SMALL //Subtract divisor
  6. BRP LOOPSTART //If 0 or larger, continue loop
  7. OUT REMAINDER //Else, output remainder
  8.  
  9. BIG DAT 10
  10. SMALL DAT 2
  11. REMAINDER DAT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement