Kompilator (BASCOM 8051 ver. 2.0.11 - DEMO) wykrzacza się na poleceniu GETRC5 (gdziekolwiek by nie było w programie zawsze jest błąd na końcu). Co ciekawsze kiedyś się to kompilowało. Sprawdzałem na różnych systemach i ciągle jest to samo. Dotyczy to również przykładów zawartych w kompilatorze. Może potrzebana jest jakaś dodatkowa biblioteka albo coś w tym stylu?
-----------------------------------------------------------------------------------------------
$regfile = "89c2051.dat"
$baud = 9600
$crystal = 24000000
Dim Address As Byte , Command As Byte
Dim Receive As Bit
Getrc5_out Alias P3.7
Reset Tcon.0
On Int0 Receive_rc5
Enable Interrupts
Enable Int0
Receive = 0
Do
Set Getrc5_out
If Receive = 1 Then
Disable Int0
Command = Command And &B00111111
Reset Getrc5_out
Waitms 5
Print Address
Print Command
Receive = 0
Enable Int0
End If
Loop
End
Receive_rc5:
Getrc5(address, Command)
Receive = 1
Return <------------------------- tutaj kompilator znajduje błąd
----------------------------------------------------------------------------------------------
Error 119: Illegal asm-command: Jnb [P0.0] in file ................
Error 105: Internal Assembler error in file: ....................
Error 117: Illegal asm-command: Jb [P0.0] in file ................
Error 105: Internal Assembler error in file: ....................
Error 120: Label not found [.RECEIVE_RC5] in file:
-----------------------------------------------------------------------------------------------
$regfile = "89c2051.dat"
$baud = 9600
$crystal = 24000000
Dim Address As Byte , Command As Byte
Dim Receive As Bit
Getrc5_out Alias P3.7
Reset Tcon.0
On Int0 Receive_rc5
Enable Interrupts
Enable Int0
Receive = 0
Do
Set Getrc5_out
If Receive = 1 Then
Disable Int0
Command = Command And &B00111111
Reset Getrc5_out
Waitms 5
Print Address
Print Command
Receive = 0
Enable Int0
End If
Loop
End
Receive_rc5:
Getrc5(address, Command)
Receive = 1
Return <------------------------- tutaj kompilator znajduje błąd
----------------------------------------------------------------------------------------------
Error 119: Illegal asm-command: Jnb [P0.0] in file ................
Error 105: Internal Assembler error in file: ....................
Error 117: Illegal asm-command: Jb [P0.0] in file ................
Error 105: Internal Assembler error in file: ....................
Error 120: Label not found [.RECEIVE_RC5] in file: