home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 June / MacFormat 25.iso / Shareware City / Developers / kvikkalkul / kvik / text / library_routines < prev    next >
Encoding:
Text File  |  1995-04-05  |  2.2 KB  |  56 lines  |  [TEXT/MPS ]

  1. Kvikkalkul Library Routines
  2. ---------------------------
  3.  
  4. Notes:    DN means "does nothing".
  5.     A decimal number is in the range -0.99995 to 0.99995.
  6.     An integer is in the range -19999 to 19999.
  7.     A scaled fraction is in the range -399.98 to 399.98.
  8.  
  9.  11    Integer .0 = integer .0 * integer .1.
  10.  12    Integer .0 = integer .0 / integer .1.
  11.  21    Convert decimal number in .0 to scaled fraction in .0.
  12.  22    Convert fractional part of scaled fraction in .0 to decimal number
  13.     in .0.
  14.  31    As 11 for scaled fractions.
  15.  32    As 12 for scaled fractions.
  16.  48    Wait until character ready on teletype. Read to .0. Return neg on EOF.
  17.  49    Same as 48 for paper tape. (DN)
  18. 100    Write .0 to teletype in decimal format.
  19. 101    Write .0 to paper tape in decimal format. (DN)
  20. 150    Read decimal number from teletype to .0.
  21. 151    Read decimal number from paper tape to .0. (DN)
  22. 200    Send CRLF to teletype.
  23. 201    Send CRLF to paper tape. (DN)
  24. 250    Wait until CRLF received from teletype.
  25. 251    Wait until CRLF received from paper tape. (DN)
  26. 300    Write integer in .0 to teletype.
  27. 301    Write integer in .0 to papar tape. (DN)
  28. 302    Write scaled fraction in .0 to teletype.
  29. 303    Write scaled fraction in .0 to paper tape. (DN)
  30. 350    Read integer to .0 from teletype.
  31. 351    Read integer to .0 from paper tape. (DN)
  32. 352    Read scaled fraction to .0 from teletype.
  33. 353    Read scaled fraction to .0 from paper tape. (DN)
  34. 400    .0 = sqrt(.0)
  35. 450    .0 = sin(.0 * PI)
  36. 460    .0 = cos(.0 * PI)
  37. 470    .0 = atan(.0) / 0.5PI (input is scaled fraction)
  38. 480    .0 = log2(.0+1) (output is scaled fraction)
  39. 490    .0 = 2^.0 - 1
  40. 530    Read a line into storage pointed to by /0 from teletype. Line is
  41.     terminated with line feed.
  42. 531    As 530 for paper tape. (DN)
  43. 540    Write a line to the teletype from the storage pointed to by /0. Stops
  44.     at the end of the storage or a line feed.
  45. 541    As 540 for paper tape. (DN)
  46. 550    Read a line in packed format into storage pointed to by /0 from
  47.     teletype. The packed form can contain numbers that would not normally
  48.     be producable in kvik.
  49. 551    As 550 for paper tape. (DN)
  50. 560    Write a line in packed format in the storage pointed to by /0 to the
  51.     teletype.
  52. 561    As 560 for paper tape. (DN)
  53. 666    Emergency stop.
  54. 888    Dump program state to a file called 'k.state.c'.
  55. 900    Set .0 to hour number / 24.0.
  56.