Skip to content

Commit

Permalink
Merge pull request #1985 from ghaerr/disasm
Browse files Browse the repository at this point in the history
[disasm] Fix sign extension bug when disassembling large RAM segment offsets
  • Loading branch information
ghaerr authored Sep 3, 2024
2 parents 1474364 + da14621 commit 6fdef65
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion elks/include/linuxmt/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ word_t fmemcmpw (void * dst_off, seg_t dst_seg, void * src_off, seg_t src_seg, s
/* macros for far pointers (a la Turbo C++ and Open Watcom) */
#define _FP_SEG(fp) ((unsigned)((unsigned long)(void __far *)(fp) >> 16))
#define _FP_OFF(fp) ((unsigned)(unsigned long)(void __far *)(fp))
#define _MK_FP(seg,off) ((void __far *)((((unsigned long)(seg)) << 16) | (off)))
#define _MK_FP(seg,off) ((void __far *)((((unsigned long)(seg)) << 16) | ((unsigned int)(off))))

/* unreal mode, A20 gate management */
int check_unreal_mode(void); /* check if unreal mode capable, returns > 0 on success */
Expand Down
2 changes: 1 addition & 1 deletion elkscmd/debug/dis.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ char * noinstrument getsegsymbol(int seg)
return buf;
}

#define peekb(cs,ip) (*(unsigned char __far *)(((unsigned long)(cs) << 16) | (int)(ip)))
#define peekb(cs,ip) (*(unsigned char __far *)(((unsigned long)(cs) << 16) | (unsigned int)(ip)))

static int nextbyte_mem(int cs, int ip)
{
Expand Down

0 comments on commit 6fdef65

Please sign in to comment.