Course Solutions Uncategorized (Solved) : 1 Write Trap Routine Readint Prompts Integer Input Reads Integer Number Keyboard Echoes Mo Q30331471 . . . .

(Solved) : 1 Write Trap Routine Readint Prompts Integer Input Reads Integer Number Keyboard Echoes Mo Q30331471 . . . .

 

1. Write a TRAP Routine (READINT) that prompts for an integerinput, reads an integer number from the keyboard, echoes it on themonitor and returns the input number’s decimal value in R0 to themain program. This trap routine will be invoked by the trapinstruction:

TRAP x26

For example, TRAP x26 will display

Enter an integer ->

And when 937 is entered as shown below:

Enter and integer -> 937

will return 937 in R0. Note that an integer is a sequence ofdigits followed by a new line character (ascii 0A)

Trap x26 must display an error message and HALT if the inputcharacter is not a digit.

READINT can use

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post