I have to build code for a 3-8 decoder anyone have basic structure?
Need to look at a Datasheet of the chip you have on the board. And check the mapping of Port 0 and Port 1 pins with the internal signalling of the ports. I was looking at a book on the web maybe inconsistent with the pin locations you are describing.
Also should look at the Schematic of the board to gain information.