Tuesday, October 20, 2009 11:51 PM,
A student writes: I was just curious about the program that we have created on monday so I have created an .obj file to see what it will do so I ran the program and one screen popped up and say input a chacter. what do I do after I input a character? You recall in class that after you input the character, the operating system took that character and put it into R0, and subsequently compared that character to every character in a file, counting the number of times your typed character occurred in the file. Then the program displayed that character on the screen and halted. So, to see what the program will do, you need to have the starting address of a file you are going to examine, and it better be the case that that file has no more than 9 occurrences of the character you type. So, if you: a. create a file of characters, b. put it in memory, c. put the starting address of that file into the location labeled STARTADDR in the program we developed in class on Monday, d. set a breakpoint just before the halt, and e. hit the run button, the program should execute until the breakpoint, and the count should appear on the screen. ...unless of course there are more than 9 such occurrences, or there is a bug in my program :-) Good luck on program 2. Yale Patt