Hi guys,

I have a problem. I'm using CPUSim Wombat 1 to write a program. The goal is to display the numbers that the user has entered in the order they've been entered. What I'm stuck on is the storages. It's currently in a loop. The sentinel value is 0. If I create a storage for one number, the contents will be overwritten when the user enters the next number and the previous number will be lost. I've thought of jumping out of the loop and creating permanent storages but the problem is that only one number can be stored. Any suggestions or ideas. If you're wondering why I'm creating this seemingly pointless program, it's because the answer to this program will solve my assignment question (refer to the link) https://www.daniweb.com/programming/software-development/threads/515824/storing-in-different-memory-locations-while-looping Please not that I cannot use a stack or array. It has to be separate memory storages. And right now I'm looking at storing and displaying 4 numbers. Here's the code:

0011000000000000 ; 0: 3 0 Read A
1010000000001000 ; 2: 10 10 If zero, go to location 8
0010000000001110 ; 4: 2 14 Store A
1001000000000000 ; 6: 9 0 Jump to location 0
0001000000001110 ; 8: 1 14 Load A
0100000000001110 ; 10: 4 14 Display A
0000000000000000 ; 16: 0 0 Stop
0000000000000000 ; 18: 0 0 Storage A
0000000000000000 ; 20: 0 0 Storage B
0000000000000000 ; 22: 0 0 Storage C