423 A few examples will help to clarify the use of these calls. *FX147,5,6 would write to FRED+5 (&FC05) the value 6. Similarly LDA #&97 LDX #&62 LDY #&FF JSR &FFF4 would write &FF into location &FE62. An OSBYTE call with A=&97 will write to SHEILA. The base address of SHEILA is &FE00 and to this is added the offset in X (&62). The value written is contained in Y. The net effect is to write to the 6522 data direction register and to cause all the PB lines to become outputs. OSBYTE call with A=&98 (152) Examine specified buffer This call examines a buffer. The buffer number (same as for OSBYTE calls 21 and 138) must be in X, and the call returns as follows: – Carry bit set if buffer empty.
– Carry bit clear if characters present in buffer. – Y contains the next character which will be returned if the buffer is read. (Note that the character in Y has not actually been removed from the buffer.) OSBYTE call with A=&9E (158) Read from speech processor See Speech System User Guide. OSBYTE call with A=&9F (159) Write to speech processor See Speech System User Guide. OSBYTE call with A=&D1 (209) Enable/disable speech This call reads (or writes to) location &261, which contains the value sent to the speech processor when speech is output. A value of &50 is the default value, representing speech on. Writing to the location with X=1 will turn speech off.
To write to &261, set X=new value, Y=0. To read the location, set X=0, Y=255. On exit, X=the contents of location &261 (if reading), or the previous value held (if writing). The contents of the next location (ie &262) are returned in Y. OSBYTE with A=&D2 (210) enable/disable sound This call reads (or writes to) location &262, which contains the sound status. A value of zero is the default value, representing sound on. Writing to this location with X=1 will turn sound off. To write to &262, set X=new value,