void setchannel(int rw,int channel,int swi,int port); rw==0 put settings channel==0 swix(swi,port,byte,0) we pass the port parameter to R0 call the swi number and pass the byte to be written to the swi, return -1 if not written channel==1 call a script function defined as int putbyte(int byte) channel==2 serialdevput(byte,port) block driver single byte write channel==3 swix2(swi,port,(int)data,n) we pass the port paramter to R0 call the swi number and pass a pointer to a buffer and number of bytes to read channel==4 sdevblockwrite(putport,data,n) block driver block write rw==1 get settings channel==0 swix(swi,port,0,0) we pass the port paramter to R0 call the swi number and get a value back -1 indicating nothing read channel==1 call a script function defined as int getbyte(void); return -1 for nothing, or the byte read. channel==2 serialdevget(port) block driver single byte read channel==3 swix2(swi,port,(int)data,n) we pass the port paramter to R0 call the swi number and pass a pointer to a buffer and max number of bytes to read, and get back number of bytes channel==4 sdevblockwrite(putport,data,n) block driver block read