Example #1
0
static unsigned UpdateReg (void)
/* Update the register window */
{
    unsigned char x1 = RegFrame.fd_x1 + 5;
    unsigned char x2 = x1 + 2;
    unsigned char y = RegFrame.fd_y1;

    /* Print the register contents */
    gotoxy (x1, ++y);   cputhex16 (brk_pc);
    gotoxy (x2, ++y);   cputhex8  (brk_sr);
    gotoxy (x2, ++y);   cputhex8  (brk_a);
    gotoxy (x2, ++y);   cputhex8  (brk_x);
    gotoxy (x2, ++y);   cputhex8  (brk_y);
    gotoxy (x2, ++y);   cputhex8  (DbgSP);
    gotoxy (x1, ++y);   cputhex16 (DbgCS);
    gotoxy (x1, ++y);   cputhex16 (DbgHI);

    /* Not needed */
    return 0;
}
Example #2
0
int main(void)
{
    dispBufferOn = ST_WR_FORE;

    GraphicsString(&Table);
    cputsxy(0, 3, CBOLDON "Your Serial Number is:");
    cputhex16(GetSerialNumber());

    DoMenu(&Menu);
    MainLoop();

    // will never reach this point...
    return 0;
}
Example #3
0
static unsigned UpdateCStack (void)
/* Update the C stack window */
{
    unsigned mem     = CStackAddr;
    unsigned char x  = CStackFrame.fd_x1 + 5;
    unsigned char y;

    for (y = CStackFrame.fd_y2-1; y > CStackFrame.fd_y1; --y) {
        gotoxy (x, y);
        cputhex16 (* (unsigned*)mem);
        mem += 2;
    }
    cputsxy (CStackFrame.fd_x1+1, CStackFrame.fd_y2-1, "->");
    return mem;
}