Simple Flowcharts 1

Flowchart the procedure that will read in two values representing hours worked and rate of pay. Multiply these two values together to calculate gross pay. Then print all three values.

Flowchart      RAMM Machine Language Program     RAMM Assembly Language Program
    

Flowchart:



RAMM Machine Language Program:

0000 00 Storage for H
0000 01 Storage for R
0000 02 Storage for PAY
5000 03 STRT  no operation
6500 04       Read an integer into H        
6501 05       Read an integer into R        
1200 06       (A-reg) <- (H)        
2401 07       (A-reg) <- (A-reg) * (R)        
2002 08       (PAY) <- (A-reg)      
6600 09       Print H        
6601 10       Print R        
6602 11       Print PAY      
0000 12       Halt
9903 13       End; begin program execution at STRT


RAMM Assembly Language Program:

H     BSS 0001
R     BSS 0001
PAY   BSS 0001
STRT  NOP
      RDI H
      RDI R
      LDA H
      IMU R
      STA PAY
      PRI H
      PRI R
      PRI PAY
      HLT
      END STRT