From d592ce4834411a63c89670f7990e86ae5dbaf40f Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Mon, 29 Apr 2024 18:37:04 -0400 Subject: xex.c: add xex_get_run_addr() and xex_get_init_addr(). --- xex.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'xex.h') 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); -- cgit v1.2.3