reference implementation for 'q' command.
Makefile for reference implementation in pascal.
reference implementation for p command.
reference implementation for g(iven) command