sending digital port status to Mac

is there a way to send the port status of each digital port to the mac say using real basic or xcode. Say as to see if ditigal pin 1 was high on the board to show that on screen?