I just said this today: "The PIC16/18 architecture is archaic, strange and full of gotchas but it's simple." All this is OK because a great deal of time and effort has been spent into making the same buggy architecture faster and faster, use lower power, be as cheap as possible and still be able to run (with a few tweaks) programs that were designed in the 90's.PICs arent really great with bits either. You cant set/reset a bit by index.
I think since the 80386 x86 can do it actually.
Its of course a pain and quite slow to load the bitnumbers via pointers, then manipulate the data with masks.
But if you want to use random IO assignment, you need the tables anyway.
I was hacking assembly on super-mini computers in the 80's to find and fix bugs in OS (completely written in a very CISC assembly instruction set that would make the x86 look like a PIC) code so I have good idea of what's possible using with good hardware. Was completely burned out on ASM programming then and have not looked back with fondness.
http://www.textfiles.com/bitsavers/pdf/harris/brochures/Harris_500_brochure_Jan80.pdf
I know this machine seems like nothing now but this was 1979.
Last edited: