Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Program:
- [?>]>>>>=<=[<j]<<j>>[->+>+<<]>[-<+>]<<-[<j]<<j>>>>>#>[?>]
- Memory:
- "Enter Multiplicand. Hit Enter. Enter Multiplicator. Hit Enter", 0, 46, 18, 0, 0, 0, 0 "Is the result."
- Memory Aliases:
- S1 F J1 J2 X Y Z T S2
- Step by Step:
- [?>] Print S1
- >>>>= DecIn Multiplicand into Mem(Y)
- <= DecIn Multiplicator into Mem(X)
- [<j]<<j If Mem(X) == 0 then Jump J1 else Jump J2
- *J2*-----------------------------------------------------18
- >> Point at Mem(Y)
- [->+>+<<] Move Mem(Y) into Mem(Z) while Adding Mem(Y) to Mem(T)
- > Point at Mem(Z)
- [-<+>] Move Mem(Z) to Mem(Y)
- <<- Decrement Mem(X)
- [<j]<<j If Mem(X) == 0 then Jump to J1 else Jump J2
- *J1*------------------------------------------------------46
- >>>>># DecOut Mem(T)
- >[?>] Print S2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement