dc (desk calculator) emulation project

Hey guys, I'm working on a project where we have to duplicate the 'dc' command. I'm having trouble figuring out how to queue the different commands available (such as printing stack contents or saving/executing macros and registers). I'm also having a great deal of trouble finding any literature on this subject. Can anybody help me out?

Please direct all home-/coursework questions to the appropriate forum. Be sure to read the special rules for posting there.