beginner needs help

I am a student (in my first computer architecture class) doing a basic project with the TCP/IP dev board (using Rabbit 2000) and the Z-World demo board. The sample program demotcp1.com basically turns on/off LEDs 1 and 2 on the demo board.

I am trying to understand the code (which is coming along) but now I am trying to understand how this code is working with the Z-World Demo board. I am reading so many manuals and online documents that I am spinning in circles. I am using the sysio.lib to help guide me with the syntax of the code.

In the program, a line of code reads:

BitWrPortI(PDDR, &PDDRShadow, 0xFF, 0); // turn led on output 0 on

OK, I know it’s writing a bit to Port D data register, and it’s shadow register. I am trying to understand/determine:

  1. how many ports this board has. Is it ports A-E?
  2. Is port D for ALL the LEDs (there are 4 of them)? If so, how would I know that? For instance, I want to add a line of code that will turn on LED 3.
  3. I am confused by parameter 3 for this function. The library file explains that this param is the value to write to port. Isn’t that what param 4 does?

I am such a novice at this and can’t seem to find a starting point to get though what seems to be a simple program.

Thx in advance.

I answered the first 2 questions of my previous post and have learned more about my 3rd question. However, I still need a bit help with this function. Please feel free to jump in with any further info… or correct me if I’m wrong.

the code line I used:
BitWrPortI(PDDR, &PDDRShadow, 0xFF, 0);

Param 4 represents “output 0” which must mean LED 1. If this is true, I can assume that using 1, 2, or 3 for this param would indicate LED 2, 3, or 4.

Also, param 3 0xFF is the value to turn ON the LED, hence 0x00 turns it off.
How would I know this? Is this something from Dynamic C (or assembly language), specific to the board, or specific to the architecture of computers?