A fairly simple assembly language program, shouldnt take any longer than 30 mins for a experience coder in the field.
Draw a flow chart and write a single assembly language program that will try to find out the ASCII word character (i.e. a digit or a letter) at memory address $ 2000. Your program must meet the operation requirements outlined below.
Note that when running this program the memory contents at address $ 2000 can be altered using the MM command of the 68K simulator prior to executing the program,you are not required to implement any functionality to set the value to be stored in location $ 2000. You should use MM to change the value stored in location $ 2000 at start up.
The user must be allowed to enter a character. Your program should check that the value entered is an ASCII word character (i.e. a digit or a letter), and exit with the word â€˜INCORRECTâ€™ if it is not.
If the user input matches the character stored at location $ 2000, the word â€˜CORRECTâ€™ must be printed to the screen and the program must exit.
If the character stored at memory address $ 2000 is higher than the userâ€™s, the word â€˜HIGHERâ€™ must be printed on the screen followed by a newline character. Likewise, if the actual value is lower than the userâ€™s then the word â€˜LOWERâ€™ must be displayed followed by a newline character.
The user must be allowed to enter up to ten characters, with the â€˜HIGHERâ€™ or â€˜LOWERâ€™ prompt given after each try. If the user does not get the correct value after ten attempts, the word â€˜LOSERâ€™ must be printed to the screen and the program must exit.