'----------------------------------------------------------------------------
'                          RS232BUFFEROUT.BAS
'                     (c) 2000-2002 MCS Electronics
'Sample demonstrates how to use a serial output buffer
'----------------------------------------------------------------------------
$baud = 9600
$crystal = 4000000

'setup to use a serial output buffer
'and reserve 20 bytes for the buffer
Config Serialout = Buffered , Size = 20

'It is important since UDRE interrupt is used that you enable the interrupts
Enable Interrupts
Print "Hello world"
Do
 Wait 1
 'notice that using the UDRE interrupt will slown down execution of waiting loops like waitms
 Print "test"
Loop
End

