- Treballant en el visor de la pila

This commit is contained in:
2024-04-11 19:55:07 +02:00
parent dbff53cc2f
commit b06d880614

View File

@@ -191,6 +191,32 @@ namespace z80debug
printtxt(13,5, tohex(memory[z80::getDE()], 2), COLOR_GRAY);
printtxt(21,5, tohex(memory[z80::getHL()], 2), COLOR_GRAY);
offset_x = offset_y = 0;
box(46,8,11,12,COLOR_WHITE);
printrect(48,8, 8,1, COLOR_DARK);
printtxt(49,8, "STACK:", COLOR_WHITE);
offset_x=47;offset_y=9;
uint16_t sp = z80::getSP()-8;
for (int i=0; i<10; ++i) {
uint8_t c1=COLOR_CYAN, c2=COLOR_GRAY;
if (sp == z80::getSP()) {
printrect(0,i,9,1,COLOR_BLUE);
c1 = c2 = COLOR_YELLOW;
}
printtxt(0,i, tohex(sp, 4), c1);
printtxt(5,i, tohex(*((uint16_t*)&memory[sp]),4), c2);
sp+=2;
}
offset_x = offset_y = 0;
box(57,8,14,12,COLOR_WHITE);
printrect(59,8, 9,1, COLOR_DARK);
printtxt(60,8, "BREAKS:", COLOR_WHITE);
offset_x=58;offset_y=9;
printtxt(0,0, "#1", COLOR_CYAN);
printtxt(3,0, "FFFF", COLOR_WHITE);
printtxt(8,0, "read", COLOR_GRAY);
offset_x=offset_y=0;
box(0,20,71,8,COLOR_WHITE);
printrect(2,20, 9,1, COLOR_DARK);