The following program shows the problem:
Code: Select all
#include <conio.h>
#include <stdio.h>
#include <spectrum.h>
#include <rs232.h>
// zcc +zx -oterm -lrs232if1 -lndos -create-app term.c
void main(void)
{
unsigned char inb,ch;
rs232_params(RS_BAUD_9600|RS_STOP_1|RS_BITS_8,RS_PAR_NONE); // Bauds tested 1200[/] 2400[/] 4800[/] 9600[/] 19200[X] 38400[X] 57600[] 115200[]
rs232_init();
printf("tinyterm ready.\n");
for (;;)
{
ch=getk();
if (ch!=0x00)
rs232_put(ch);
if (rs232_get(&inb)!=RS_ERR_NO_DATA)
putch(inb);
}
}
Am I breaking some unwritten rule?
-Thom