home *** CD-ROM | disk | FTP | other *** search
/ Complete Bookshop / CompleteWorkshop.iso / compute / cardiac / test-2.hrt < prev   
Encoding:
Text File  |  1987-06-30  |  1.5 KB  |  38 lines

  1. 666666666   Start of program
  2.  01   050   First number to multiply by
  3.  02   051    second number, please note both numbers must be positive
  4.  03   875   Jump to location 75, and do routine
  5.  04   550   Print 1st number
  6.  05   551   Print 2nd number
  7.  06   552   Print 1st * 2nd number
  8.  07   999   All done.
  9.  75   150   Load first number
  10.  76   700   Subtract 1 from it (location 00 always contains 1)
  11.  77   655   Store it at the temporary location
  12.  78   151   Load the second number, and
  13.  79   656    store it at the temporary location
  14.  80   199   Load return statement and store it for safe keeping.
  15.  81   697    at location 97.
  16.  82   155   Load the temporary number.
  17.  83   700   Subtract 1 from it (location 00 always contains 1)
  18.  84   395   If negative then done, goto 95
  19.  85   655   otherwise store it back again.
  20.  86   156   Load the second number, and
  21.  87   251    add the contents of the original number,
  22.  88   656    and store it back at location 56
  23.  89   882   Go back to 82 and do it until done
  24.  95   156   Load the answer,
  25.  96   652    and store it at location 52.
  26.  97   000   And this is the return statement.
  27.  50   000   Location of 1st number
  28.  51   000   Location of 2nd number
  29.  52   000   Location of 1st number * 2nd number
  30.  55   000   Temp storage for 1st number
  31.  56   000   Temp storage for 2nd number
  32. 777777777 Done with instructions, now for the data
  33.    009
  34.    007
  35.   -999
  36. 888888888 Done with data.
  37. 999999999 Done with program.
  38.