home *** CD-ROM | disk | FTP | other *** search
/ Complete Bookshop / CompleteWorkshop.iso / compute / cardiac / test-1.hrt < prev    next >
Encoding:
Text File  |  1987-06-30  |  1.1 KB  |  28 lines

  1. 666666666   Start of program.
  2.  01   499   clear accumulator  (not necessary, but nice)
  3.  02   050   read 1st # into 50
  4.  03   150   load 1st # into accumulator
  5.  04   320   if accumulator <0 then goto 20  BON (branch on neg.)
  6.  05   051   read 2nd # into 51
  7.  06   251   add 2nd # to accumulator.
  8.  07   655   store sum in 55
  9.  08   150   load 1st # into accumulator
  10.  09   751   subtract 2nd # from accumulator
  11.  10   656   store difference. in 56
  12.  11   550   print 1st #
  13.  12   551   print 2nd #
  14.  13   555   print sum
  15.  14   556   print difference
  16.  15   801   goto do all over again...
  17.  20   999   end...
  18.  50   000   storage for 1st #   these statements are not necessary,
  19.  51   000   storage for 2nd #   but they help to keep track of storage
  20.  55   000   storage for sum     locations used for data...
  21.  56   000   storage for difference
  22. 777777777   End of program, beginning of data
  23.    002      first number
  24.    003      second number
  25.   -999      tells Cardiac that the program is done
  26. 888888888   End of data
  27. 999999999   End of source code
  28.