Postfix Calculator

Tom Kelliher, CS 220

Due Oct. 17, 2007

Simply, hand-compile the postfix.cc program on the class home page to MIPS assembly. Use typescript to record a session in which you run the expressions on the ``Postfix Calculator Test'' document on your calculator in SPIM. Hand-in the typescript session and your commented MIPS source code.

Ground rules:

  1. Frames and a frame stack must be used.

  2. Implement the following functions:
    int isEmpty(void);
    int isFull(void);
    void push(int item);
    int pop(void);
    int getValue(void);
    void compute(void);
    void output(void);
    void die(const char *s);
    int main();
    

  3. Use mnemonic register names.

  4. Adhere to the following MIPS conventions: call, register use, and memory use.

  5. $t8 and $t9 may be used to permanently store the two external pointers (stackPointer and next).

Oct. 8 milestone: Lay-out the frame structure and write the bodies of the functions, save for main. Do not consider the call or return code for now. Hand in hard copy.



Thomas P. Kelliher 2007-10-03
Tom Kelliher