projects
/
ulas
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1256712
)
Fixed some instruction parsers for disas
author
Lukas Krickl
<lukas@krickl.dev>
Sun, 25 Feb 2024 07:40:10 +0000
(08:40 +0100)
committer
Lukas Krickl
<lukas@krickl.dev>
Sun, 25 Feb 2024 07:40:10 +0000
(08:40 +0100)
src/archs.h
patch
|
blob
|
history
src/uldas.c
patch
|
blob
|
history
diff --git
a/src/archs.h
b/src/archs.h
index 98f100dab36df20b531df64dabb18450c8314a63..26e885a7071fbf3ac0fd6e8b39b5c319d14abed4 100644
(file)
--- a/
src/archs.h
+++ b/
src/archs.h
@@
-1,6
+1,8
@@
#ifndef ARCHS_H_
#define ARCHS_H_
+#define ULAS_INSTRDATMAX_VAL 0xFFFF
+
enum ulas_endianess {
ULAS_BE,
ULAS_LE
diff --git
a/src/uldas.c
b/src/uldas.c
index c5b17c27080d684b1270ab34da56c9a2f058e0d4..4ca35337bedd7c22fc815e2adbec23857c4f98f7 100644
(file)
--- a/
src/uldas.c
+++ b/
src/uldas.c
@@
-67,7
+67,7
@@
int ulas_dasm_instr_check(FILE *src, FILE *dst, const struct ulas_instr *instr,
int bi = 0; // current buffer index
// test all instruction's contents
for (i = 0; instr->data[i]; i++) {
-
int dat = instr->data[i]
;
+
unsigned int dat = instr->data[i] & ULAS_INSTRDATMAX_VAL
;
if (dat == ULAS_DATZERO) {
dat = 0;
}