// Author : MD Rifat // email : [email protected]
Write Assembly Language Programme for # Jasper Processor.
Here we have 2 task and there solutions. from the branch main you can view and download those code files as a text documents. Save it on the Jasper extracted directory and use it.
Code 1:
Write an assembly language program for the JASPer processor. The program should allow the user to convert a four-digit binary number to decimal. The program works as follows:
- The user will type four digits, using only the digits 1 and 0. The digits will be displayed on the screen as they are typed. If any other digits or letters are typed, they will be ignored and will not be displayed.
- The program will convert the digits to a decimal number and display it on the next line.
- The program will then end.
Example output:
0010
2
1111
15
1010
10
CODE 2:
Create a JASPer assembly language program that allows the user to play a game of higher/lower. The program will choose a random number from 1 to 16. The user will try to guess what it is. If the user guesses a number that is too low, the program will say, “Higher.” If the user guesses a number that is too high, the program will say “Lower.” If the user guesses the correct number, the program will say, “Correct.”, and also display the number of guesses the user made before getting the right answer.
Example output:
8
Higher
12
Lower
10
Higher
11
Correct. You made 4 guesses.