On Windows use the following command:
netstat -aon | more
You can remove the more operand followed by a pipe if your command line window buffer is large enough to scroll through the list.
On UNIX and the Mac (OS X):
netstat -na | grep LISTEN
You can add grep 80 followed by a pipe sign, for example, to list all ports starting with 80 (including 8080, 8081, and so on...) being listened to.