projects
/
emu8051.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement workaround for flex --header-file option
[emu8051.git]
/
src
/
gtk
/
pgmwin.c
diff --git
a/src/gtk/pgmwin.c
b/src/gtk/pgmwin.c
index
2bd00d9
..
d1ad010
100644
(file)
--- a/
src/gtk/pgmwin.c
+++ b/
src/gtk/pgmwin.c
@@
-16,6
+16,7
@@
#include "common.h"
#include "memory.h"
#include "cpu8051.h"
#include "common.h"
#include "memory.h"
#include "cpu8051.h"
+#include "opcodes.h"
#include "pgmwin.h"
#include "hexfile.h"
#include "pgmwin.h"
#include "hexfile.h"
@@
-133,6
+134,7
@@
pgmwin_sel_changed_event(GtkWidget *widget, GdkEvent *event, gpointer data)
gtk_tree_model_get(model, &iter, COL_ADDR, &str_addr, -1);
/* Convert hex address in ASCII to integer. */
gtk_tree_model_get(model, &iter, COL_ADDR, &str_addr, -1);
/* Convert hex address in ASCII to integer. */
+ /* No need to check error, has already been validated. */
val = asciihex2int(str_addr);
log_debug(" row address is: $%04X", val);
val = asciihex2int(str_addr);
log_debug(" row address is: $%04X", val);
@@
-261,14
+263,14
@@
pgmwin_refresh(void)
int2asciihex(address, str, 4);
gtk_list_store_set(store, &iter, COL_ADDR, str, -1);
int2asciihex(address, str, 4);
gtk_list_store_set(store, &iter, COL_ADDR, str, -1);
- opcode = mem
ory
_read8(PGM_MEM_ID, address);
- inst_size =
cpu8051_get_instruction
_size(opcode);
+ opcode = mem_read8(PGM_MEM_ID, address);
+ inst_size =
opcodes_get_instr
_size(opcode);
/* Display instruction hex bytes. */
for (k = 0, col_id = COL_B0; k < 3; k++, col_id++) {
if (k < inst_size)
/* Display instruction hex bytes. */
for (k = 0, col_id = COL_B0; k < 3; k++, col_id++) {
if (k < inst_size)
- int2asciihex(mem
ory
_read8(PGM_MEM_ID,
-
address + k),
+ int2asciihex(mem_read8(PGM_MEM_ID,
+ address + k),
str, 2);
else
str[0] = '\0';
str, 2);
else
str[0] = '\0';