#define BIT(addr,bit) bit #define ADDR(addr,bit) addr #define MASK(addr,bit) 1<<(bit) Then: #define myflag somereg,5 movlw BIT(myflag) movf ADDR(myflag),w andlw MASK(myflag) etc...
see also:
file: /Techref/scenix/lib/math/bit/index.htm, 1KB, , updated: 2004/6/10 13:40, local time: 2024/11/8 20:29,
18.226.98.161:LOG IN ©2024 PLEASE DON'T RIP! THIS SITE CLOSES OCT 28, 2024 SO LONG AND THANKS FOR ALL THE FISH!
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://ecomorder.com/techref/scenix/lib/math/bit/index.htm"> PIC Microcontroller Bit Math Method s</A> |
Did you find what you needed? |
Welcome to ecomorder.com! |
Welcome to ecomorder.com! |
.