aboutsummaryrefslogtreecommitdiff
path: root/xex.h
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-04-29 18:37:04 -0400
committerB. Watson <urchlay@slackware.uk>2024-04-29 18:37:04 -0400
commitd592ce4834411a63c89670f7990e86ae5dbaf40f (patch)
tree9bad05fe6fcd1bf14b8ddef80329d66ecb36c16a /xex.h
parente43fb619b7782f64fa5e8c68c7b49536a5180073 (diff)
downloadbw-atari8-tools-d592ce4834411a63c89670f7990e86ae5dbaf40f.tar.gz
xex.c: add xex_get_run_addr() and xex_get_init_addr().
Diffstat (limited to 'xex.h')
-rw-r--r--xex.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/xex.h b/xex.h
index 2300481..2b113fc 100644
--- a/xex.h
+++ b/xex.h
@@ -104,6 +104,14 @@ int xex_get_object(xex_segment *seg, unsigned char *data);
Returns true if segment is OK. */
int xex_check_seg(xex_segment *seg);
+/* Get run address from a segment, if there is one. This can handle the case
+ where the address is embedded in a larger segment (that doesn't just consist
+ of 2 bytes loaded at RUNAD). Returns -1 if there is no run address. */
+int xex_get_run_addr(xex_segment *seg);
+
+/* Same as above, for init address. */
+int xex_get_init_addr(xex_segment *seg);
+
/* Get human-readable error message. If xex_errno is XSYSCALL, the system's
strerror() is called. */
char *xex_strerror(int err);