First, a little terminology, the plug that plugs into the link port is composed of 3 parts, the sleeve, the ring, and the tip. The sleeve, (the part closest to the wire) is electronic ground (0V). The other two (the ring and the tip) are both data lines. By default these sit at 3V.
Ok, so when you open up calcsys and look at port (00h), you'll notice that it reads 03. It's reading 3 because both the tip and the ring are at 3 volts (the tip is bit 0 and the ring is bit 1).
Now, a pair of headphones is basically a short circuit from both the tip and ring to the sleeve. In normal operation the tip goes to the left earphone and then to ground and the ring goes to the right earphone and then to ground. But, the main point I'm trying to get across here is that the headphones lower both the tip and the ring to 0V. So now, to see what I'm talking about, you can plug a pair of headphones into your calculator and you'll notice that port (00h) now reads 00 (and your calculator is relatively frozen).
The basic idea here is that when disconnected, both the tip and the ring will gives 1's over port (00h). But when you connect them to ground (the sleeve), they will read 0.
Now that that's out of the way, you can start messing around with your accelerometer. The basic idea here is that when your accelerometer is tilted to the left, it will connect the ring to ground and when it is tilted to the right, it will connect the tip to ground (you can swap left/right ring/tip). The way to do this is up to you, but the simplest way would simply be a marble in a tube that connects the circuit when it reaches either end.
Edit:
In axe, you can read the value of port (00h) by using the "Port" command (ClrTable).