You missed the DEFINE thing, however I came up with the following
And then in the compilation time section you useCode:DEFINE SData PORTB,1 DEFINE SClock PORTB,2
just need to use 'em likeCode:CreateVar MACRO PortIn,BitIn, PortOut, BitOut PortOut = PortIn BitOut = #V(BitIn) ENDM ; ; ; somewhere later ; @ CreateVar SData, SerData, DataBit @ CreateVar SClock, SerClock, ClockBit SerData VAR BYTE EXT DataBit CON EXT SerClock VAR BYTE EXT ClockBit CON EXT
It has some success, ugly... and we also know this method is not going to work all the time... good example? ShiftoutCode:HIGH SerClock.0[ClockBit]
Keep thinking...





Bookmarks