Would this be a valid C I/O library? : <p>I have a question.  I want to create a simple C I/O library, and I wish to check whether the method I am using is the correct one.  The code is effectively pseudocode, so ignore the syntax.</p>

<pre><code>Simple I/O Library:
Output is 0x0000
Input is 0xFFFF

void writeChar (char* po) {
   char* ph = 0x0000
   char po;
   *ph = po
}

char readChar () {
   char* pi = 0xFFFF
   char in
   in = *pi
   return in
}
</code></pre>

<p>**Update:**Sorry if I wasn't clear.  This is for an memory-mapped I/O system.  The values are simply examples.  I just wanted to test if the idea is valid.</p>

<p><strong>One More Question:</strong> I would like to understand the difference between memory access and port access.  What, if any, changes would be required to access a port instead of a memory location, assuming a port-mapped I/O system this time.</p>
