It suggests that the MCL file can be used with MikroBasic, so I downloaded MikroPascal, and compiled the test program.
Amongst the files was the irq_usart.MCL file. I copied this to MB and re-wrote the test routine for MB:
Code: Select all
program Uart_test
include "irq_usart"
dim var,tmp As byte
main:
irq_usart_init '// intialises the interrupt
usart_init(4800) '// redefines the baudrate
while true do
while lines_read < 3 do nop '// read into buffer until 3 CR's received
while lines_read > 0 do '// then send's back these 3 line's
tmp = readkey
write(tmp)
wend
wend
wend
end.
6:3 3 Identifier 'irq_usart_init' was not declared Uart_test.pbas comes up in the error zone.
Back in MP, I tried only loading the test file and the MCL. Same result it will not compile, unless the unit irq_usart is present.
How do we use an MCL file? Can it be compiled on its own?
Help!