!!! Doesn't work -- isem won't update it's instruction sequence... ! ! Program to store values hand entered into r10 in ! successive memory locations, so long as r11 remains ! zero. The program will begin executing the entered ! values once r11 goes non-zero. ! If you try to enter more than twenty words, you'd better ! think very carefully about what will happen! ! Michael Johnson, 2001. ! This program is a "machine language loader" ! which is provided so that students can experience ! writing, loading and executing their own machine ! code using ISEM. .text 0x2000 start: nop ! All of these will be replaced by entered machine code. nop ! You must make sure you use ISEM in STEP mode, and you nop ! must put the next machine code instruction you want to nop ! enter in r10 before this program steps to address "loop:" nop ! each time. nop ! Remember that you can edit the contents of r10 directly nop ! using the register display window. nop nop nop nop nop nop nop nop nop nop nop nop nop set start, %r12 ! Start address for the entered program add %r0, %r0, %r13 ! r13 will be the displacement from start ! for the next machine code instruction loop: st %r10, [%r12+%r13] ! Store the next machine code instruction add %r13, 4, %r13 ! Advance the displacement cmp %r11, 0 ! Is r11 still zero? beq loop ! If yes, store another instruction nop ba start ! Else, start executing the entered nop ! instructions. ta 0 ! This should never be executed.