L #Length
L 0.0
==R
L 0.0
L #Length
==R
L D[AR2 said:I'm being picky here, but you could swap the order of the loads
toCode:L #Length L 0.0 ==R
Code:L 0.0 L #Length ==R
to save the TAK - but you may be using this fact in the remainder of the code that we can't see.
Also the JC HIGH could be JU HIGH as the RLO will always be true if program flow arrives at this point. The JC implies that there is a decision being made when in fact it has already been made earlier.
Ken M said:If only they were all like this!
S7Guy said:Combo, I would look at NW1 and see if it is necessary to write constants to the same addresses every time. Usually if my program needs constants, I write to them once during start-up rather than doing it every scan.
Also, another minor point, you could also initialize your CHARs using something other than the byte data type. For instance:
L 'COID'
T DBD 0
It sometimes makes the code a little easier to read.
Yes, I agree. Combo is one of my favorite posters.
Combo said:L 'KE'
T DB100.DBW 4
L '$R'
T DB100.DBB 6
L '$L'
T DB100.DBB 7
jacekd said:I don't have a CPU at hand to check it for sure, but this also should work:
L 'KE$R$L'
T DB100.DBW4
PeterW said:Don't understand why you changed from
OPN DB100
L 'C'
T DBB0
to
T DB100.DBB0
unless the DB is symbolised and the comment is on the DBB is important.
The newer way means that you attempt to open DB100 every time, this uses up scan time, even though the block is already open.