home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 4 / 004.d81 / p_p_s#8 < prev    next >
Text File  |  2022-08-26  |  3KB  |  130 lines

  1.     PEEKs, POKEs, & SYSes - Part 8
  2.     ------------------------------
  3.  
  4.  
  5. ======================================
  6. Location:  16      Hexadecimal:  $0010
  7. Official Label:  SUBFLG     Type:  RAM
  8. Useful BASIC commands:  PEEK, POKE
  9.  
  10.  
  11.    There are 2 cases in which a vari-
  12.  
  13. able name might be followed immedi-
  14.  
  15. ately by a number in parentheses.  One
  16.  
  17. of these is an array reference 'A(5)',
  18.  
  19. and the other is a defined-function
  20.  
  21. reference 'DEF FNA(5)'.  Since integer
  22.  
  23. variables are illegal as dummy argu-
  24.  
  25. ments to a defined-function, this flag
  26.  
  27. is used to distinguish the two so that
  28.  
  29. BASIC knows if integers are allowed!
  30.  
  31.  
  32. ======================================
  33. Location:  17      Hexadecimal:  $0011
  34. Official Label:  INPFLG     Type:  RAM
  35. Useful BASIC commands:  PEEK, POKE
  36.  
  37.  
  38.    In case you hadn't noticed, the
  39.  
  40. format of data in a DATA statement is
  41.  
  42. identical to the format of data to be
  43.  
  44. entered via an INPUT statement.  BASIC
  45.  
  46. uses the same routine for both, and
  47.  
  48. part of that routine for GET as well.
  49.  
  50. So, this location contains a 0 for IN-
  51.  
  52. PUT, a 64 ($40) for GET, and a 152
  53.  
  54. ($98) for READ (to read DATA state-
  55.  
  56. ments).  That way, the routine knows
  57.  
  58. how to handle the subtle differences
  59.  
  60. between READ and INPUT (such as where
  61.  
  62. to get the data!).
  63.  
  64.  
  65. ======================================
  66. Location:  18      Hexidecimal:  $0012
  67. Official Label:  TANSGN     Type:  RAM
  68. Useful BASIC commands:  PEEK, POKE
  69.  
  70.  
  71.    This flag has 2 purposes.  BASIC
  72.  
  73. uses it to keep track of the sign of
  74.  
  75. the result of trig (SIN, COS & TAN)
  76.  
  77. functions during computation, and as a
  78.  
  79. place to hold the result of a compari-
  80.  
  81. son (255 (-1, $FF) for '<', 0 for '=',
  82.  
  83. 1 for '>').
  84.  
  85.  
  86. ======================================
  87. Location:  19      Hexadecimal:  $0013
  88. Official Label:  (none)     Type:  RAM
  89. Useful BASIC commands:  PEEK, POKE
  90.  
  91.  
  92.    It's a shame that Commodore didn't
  93.  
  94. supply this one with its own label!
  95.  
  96. It holds the logical file # currently
  97.  
  98. being used for input.  Normally, this
  99.  
  100. is zero.  The file # here is used for
  101.  
  102. only one thing:  to check to see if
  103.  
  104. INPUT needs to output a '?' prompt be-
  105.  
  106. fore asking for the INPUT, and whether
  107.  
  108. to output a RETURN after the INPUT is
  109.  
  110. entered.  If this location is zero,
  111.  
  112. the prompts are output.  If non-zero,
  113.  
  114. they aren't!  If you would like to
  115.  
  116. prevent the '?' on INPUT's, you don't
  117.  
  118. need to open the keyboard as a file.
  119.  
  120. Just POKE 19,1.  You will have to
  121.  
  122. print your own RETURN's after each IN-
  123.  
  124. PUT, though!  POKE 19,0 to return IN-
  125.  
  126. PUT to normal.
  127.  
  128.  
  129. ============End of Article============
  130.