| 206 |
for( int j = 0 ; j < 8 ; j++ ) { |
for( int j = 0 ; j < 8 ; j++ ) { |
| 207 |
sprintf(buf[1], fmt, regs[k*8+j] ); |
sprintf(buf[1], fmt, regs[k*8+j] ); |
| 208 |
gtk_clist_set_text(winregs, j, i, buf[1]); |
gtk_clist_set_text(winregs, j, i, buf[1]); |
| 209 |
|
|
| 210 |
|
/* correct column width if insert value |
| 211 |
|
* isn't zero */ |
| 212 |
|
if ( regs[k*8+j] != 0 ){ |
| 213 |
|
gtk_clist_set_column_auto_resize |
| 214 |
|
(winregs, i, true ); |
| 215 |
|
gtk_clist_set_column_auto_resize |
| 216 |
|
(winregs, i, false ); |
| 217 |
|
} |
| 218 |
} |
} |
| 219 |
} |
} |
| 220 |
|
|
| 295 |
gtk_clist_clear( codelist ); |
gtk_clist_clear( codelist ); |
| 296 |
|
|
| 297 |
if ( vm.is_on() ){ |
if ( vm.is_on() ){ |
| 298 |
char buf[3][100], *ptrs[3] = {0}; |
char buf[3][100], *ptrs[4] = {0}; |
| 299 |
vector<unsigned long> mem = bin_loader.get_instr(); |
vector<unsigned long> mem = bin_loader.get_instr(); |
| 300 |
|
despasm despasma(mem, 1); |
| 301 |
|
|
| 302 |
for(int i = 0 ; i < 3 ; i++) |
ptrs[0] = buf[0]; |
| 303 |
ptrs[i] = buf[i]; |
ptrs[1] = buf[1]; |
| 304 |
|
ptrs[3] = buf[2]; |
| 305 |
|
|
| 306 |
for( int i = 0 ; i < mem.size() ; i++ ){ |
for( int i = 0 ; i < mem.size() ; i++ ){ |
| 307 |
sprintf( buf[0], "%08X:", i*4 ); |
sprintf( buf[0], "%08X:", i*4 ); |
| 308 |
buf[1][0] = '\0'; |
strcpy( buf[1], despasma.getline(i).c_str() ); |
| 309 |
|
|
| 310 |
|
ptrs[2] = strchr( buf[1], '\t' ); |
| 311 |
|
if (ptrs[2]){ |
| 312 |
|
ptrs[2][0] = '\0'; |
| 313 |
|
ptrs[2]++; |
| 314 |
|
} |
| 315 |
sprintf( buf[2], "%08X", mem[i] ); |
sprintf( buf[2], "%08X", mem[i] ); |
| 316 |
|
|
| 317 |
gtk_clist_append( codelist, ptrs ); |
gtk_clist_append( codelist, ptrs ); |
| 318 |
gtk_clist_set_background(codelist, i, &colors ); |
gtk_clist_set_background(codelist, i, &colors ); |
| 319 |
} |
} |
| 320 |
|
|
| 321 |
for( int i = 0 ; i < 3 ; i++ ) |
for( int i = 0 ; i < 4 ; i++ ) |
| 322 |
gtk_clist_set_column_auto_resize(codelist, i, true ); |
gtk_clist_set_column_auto_resize(codelist, i, true ); |
| 323 |
|
|
| 324 |
|
gtk_clist_set_column_justification(codelist, 3, |
| 325 |
|
GTK_JUSTIFY_CENTER); |
| 326 |
} |
} |
| 327 |
|
|
| 328 |
gtk_clist_thaw( codelist ); |
gtk_clist_thaw( codelist ); |