You are over complicated this
Look at lines 25 and 26 of DT's include:Code:@ MOVE?PB _M_GTE, _glc_s ' get result of compare ( Z=>X) into a tmp PBP byte THIS IS NOT CORRECT!!! if glc_s = 0 then ' if result is 0 then compare sublap < slow_sublap = true
M_GTE and M_EQ are PBP variables(bit).Code:M_EQ VAR BIT ; Equal to, for CMP M_GTE VAR BIT ; Greater than or Equal to, for CMP
So you don't need to copy them or what ever MOVE?PB will do to bit. Just use it as any variable in pbp.
Look at my example, and use it that way to make life little bit easier![]()
EDIT (again):
Look at lines 201 and 202
They move results from PIC STATUS register to bit defined at line 25 and 26.Code:MOVE?TT STATUS,Z, _M_EQ ; STATUS,Z set if Z == X MOVE?TT STATUS,C, _M_GTE ; STATUS,C set if Z => X;




Bookmarks