If the file has been read without errors STATUS has the end-of-file bit 6 set. It opens a text file, reads the contents byte by byte and prints these bytes on the screen. This program uses STATUS to recognize the end-of-file condition even in case of errors. Note: the blank after "ST" prevents the tokenizer from recognize it as S TAND 64, which leads to a ?SYNTAX ERROR (because BASIC tokens like TAN are favored against variable names). Prints 64 in case the end of file has been reached, otherwise 0. To check only a distinct bit (according to the table above) mask the desired bit like this To get unsigned results (in range 0 to 255) use Value may appear as negative value because of BASIC implicit sign expansion. The value of STATUS is taken from memory location at address $0090 and can be viewed with following BASIC (errornous read bytes from pass 1 could not read correctly even in pass 2) Indicates data direction if a timeout occurred STATUS bits and values ĭepending on the device and executed operation the corresponding bit in the STATUS variable is set as a result. This may lead to confusion if one uses a variable like START (which is also ST) and tries to assign a value to it, which unexpectedly shows an error. An assignment to it raises a ?SYNTAX ERROR. STAT or STATUE and every other name beginning with ST refers to this system variable. The long written name STATUS is used only by convention. Any letter or digit combination following still refers to this system variable.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |