void AnnotateStack(Graphics g,int bp,int col,int row,int nrows,boolean topFrame) {
	int lastLoc = regs[29];
	int firstLoc = lastLoc - 4*nrows + 4;

	if (bp != 0 && bp >= firstLoc && bp <= lastLoc) {
	    // mark old BP location
	    int bpline = (bp - 4 - firstLoc) >> 2;

	    if (topFrame) {
		DrawString(g,"BP",col-6,row+bpline+1,Color.BLACK);
		DrawArrow(g,col-4,row+bpline+1,4,E,hx,2);
	    }

	    if (bpline < 0) return;
	    DrawString(g,"oldBP",col-5,row+bpline,-2,0,Color.WHITE);

	    // mark old LP location
	    bpline -= 1;
	    if (bpline < 0) return;
	    DrawString(g,"oldLP",col-5,row+bpline,-2,0,Color.WHITE);

	    // see how many arguments this function has
	    int returnInst = ReadMemory(ReadMemory(bp-8));
	    if ((returnInst & 0xFFFF0000) == 0xC7BD0000) {  // DEALLOCATE?
		int nargs = (returnInst & 0xFFFF) >> 2;
		int arg = 1;
		while (arg <= nargs) {
		    bpline -= 1;
		    if (bpline < 0) return;
		    DrawString(g,"arg"+Integer.toString(arg),col-5,row+bpline,-2,0,Color.WHITE);
		    arg += 1;
		}
	    }

	    // recurse to earlier stack frame
	    AnnotateStack(g,ReadMemory(bp - 4),col,row,nrows,false);
	}
    }