443 OSWRSC Writes a byte (contained in A) to the screen. The display memory location to be written should be set up in &D6 (LSB) and &D7 (MSB). Y (on entry) is used to contain an offset from this address. The effect of this call can be illustrated (somewhat crudely!) by the program shown below: 10 MODE 7 20 ?&D7=&7C 30 Y%=255:A%=&45 40 FOR J=0 TO 127 STEP 2 50 ?&D6=J 60 CALL(&FFB3) 70 NEXT J On exit, A, X and Y are preserved, C is undefined. OSRDSC Reads a byte from the screen, the display memory location concerned being contained in &F6 (LSB) and &F7 (MSB). The byte is returned in A. The following program illustrates the effect of this call:
10 MODE7 20 FOR K=1 TO 255 30 PRINT "E"; 40 NEXT K 50 ?&F7=&7C 60 VDU14 70 FOR J=0 TO 127 80 ?&F6=J 90 PRINT ~USR(&FFB9) 100 NEXT J This routine can also be used to read bytes from paged ROM, with Y (on entry) set equal to the ROM socket number. In this context, this call has in the past been referred to as OSRDRM. OSFIND Opens a file for writing or reading and writing. The routine is entered at &FFCE and indirects via &21C. The value in A determines the type of operation. A=0 Causes a file or files to be closed. A=&40 Causes a file to be opened for input (reading). A=&80 Causes a file to be opened for output (writing). A=&C0 Causes a file to be opened for input and output (random access).