Hello All,
I am breaking apart a working program into a new program that should come out the same, but will utilize includes. All Declare Subs are remarked. Many subs have been moved out of the main .bas file, but there remains some. My problem is, the compiler complains that the sub or function cannot be found. When using CONFIG SUBMODE = NEW, do ALL subs have to be outside the .bas file?
At the start of the program I have
[code:1:7001b840cf]
$regfile = "m168pdef.dat"
$hwstack = 256 '128 '32
$swstack = 256 '128 '20 '10
$framesize = 160 '144 '128 '96 '40
$crystal = 8000000 '8MHz (internal RC)
$baud = 9600
$noramclear
Debug Off 'Off
CONFIG SUBMODE = NEW
[/code:1:7001b840cf]
Again, all Declare Subs are remarked. The compiler complains about ones that remain in the .bas file.
[code:1:7001b840cf]
Call Update_Ack_Int
[/code:1:7001b840cf]
The compiler also complains about another sub, also in the main .bas file.
[code:1:7001b840cf]
Call Assemblenibble(1)
[/code:1:7001b840cf]
These are at the end of the .bas file.
[code:1:7001b840cf]
'**********************************************************************************************
'**********************************************************************************************
Sub Assemblenibble(byval Cnt As Byte)
Txbuffer(8) = Device_type Or Cnt
End Sub
'**********************************************************************************************
'**********************************************************************************************
Sub Update_Ack_Int
'ACK Interval managed by Random Number Generator
_rseed = Address + 100 '_rseed = Address
Do
Ack_interval = RND(3100) ' Rnd(253) '65535
Loop Until Ack_Interval > 270
End Sub
[/code:1:7001b840cf]
Also, is there anything "wrong" with using "Return" at the end of a Sub, or within a Sub? This is a habit from another IDE.
Thanks all,
Tim
[b:7001b840cf][color=red:7001b840cf](BASCOM-AVR version : 2.0.7.7 )[/b:7001b840cf][/color:7001b840cf]
↧