Section 10: Programming with ALPHA Strings156
Run the program and watch how the strings are displayed.
Keystrokes Display    
USER PRGM 
  0.0000    
   
XEQ 
  XEQ _ _    
   
ALPHA SHIFTY ALPHA 
  SUNDAY    
   
 
  MONDAY    
   
Problem:
  1.
The following program computes the total price, tax and final cost of items on a billing invoice. Rewrite the program and insert ALPHA strings and PROMPT for the quantity, unit price and tax. In Addition, insert an ALPHA string to label the output of the final amount from the X-register into the ALPHA register using ARCL · X. Run the program for 26 ruby rings that cost $72.90 with a tax of 7.25%; for 11 shovels that cost $7.15 with a 5% tax.
 
Insert these strings into the program to prompt for data: QUANT? (quantity), PRICE? (unit price), TAX? (tax rate). Store this string in storage register R10 (with ASTO ) and recall it (with ARCL ) in the program to label the output: TOT=$ . If you have trouble with this problem, you might wish to review this section before you continue.
(Answers: TOT=$ 2032.82; TOT=$ 82.58.)
 
  01 LBLTBILL1    
  Program name.
 
  02 STOP    
  Stops for input of quantity.
 
  03 STOP    
  Stops for input of unit price.
 
  04 *    
  Computes total price.
 
  05 STOP    
  Stops for input of tax rate.
 
  06 %    
  Computes tax amount.
 
  07 +    
  Computes final amount.
 
  08 END