Since portpins rarely move(constants) you could use the LOOKUP statement to get the offset values. Should free up some RAM. The LOOKUP could ofcourse be placed in a subroutine if you need to access it from many different locations in your program. That way saving ROM.
/IngvarCode:x var byte i var byte main: for i = 0 to 3 ' a b c d ' 0 6 4 2 LOOKUP i, [0,14,20,26], x porta.0[x]=1 PAUSE 1000 porta.0[x]=0 PAUSE 300 next i
Bookmarks