Advertisement
STANAANDREY

lmc pow

Oct 10th, 2024 (edited)
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. INP
  2. STA a
  3. INP
  4. STA b
  5. LDA ONE
  6. STA res
  7. STA prod
  8. pow LDA prod
  9. STA res
  10. LDA b
  11. BRZ done
  12. SUB ONE
  13. STA b
  14. LDA res
  15. STA f1
  16. LDA a
  17. STA f2
  18. LDA ZERO
  19. STA prod
  20. mult LDA f2
  21. BRZ pow
  22. SUB ONE
  23. STA f2
  24. LDA prod
  25. ADD f1
  26. STA prod
  27. BRA mult
  28. done LDA res
  29. OUT
  30. HLT
  31. a DAT
  32. b DAT
  33. f1 DAT
  34. f2 DAT
  35. prod DAT
  36. res DAT
  37. ZERO DAT 0
  38. ONE DAT 1
  39.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement