commit 0dc6ce6dbfeebace70a555db02f7e7f037ca149f
parent 42863e5a96d45237e353ff54bc93a82dc4c07a48
Author: Virgil Dupras <hsoft@hardcoded.net>
Date: Thu, 29 Jun 2023 16:25:36 -0400
asm/i386: fix mis-selection of jump width
$7f should have been $7e, I don't know why it was thus. Replaced it with
"$80 + 2 -" to make it clear that we have the count the 2 - adjustment that's
going to be applied in jmp8 mode in the "isbyte?" check.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/asm/i386.fs b/fs/asm/i386.fs
@@ -200,7 +200,7 @@ create _tbl $8c , $120 , $121 , $124 ,
\ of the size of its relative offset. To that end, we auto adjust that relative
\ address to the size of the op. Therefore, "0 jmp," is an infinite loop encoded
\ as EB FE.
-: jrel8? ( rel -- f ) $7f + isbyte? ;
+: jrel8? ( rel -- f ) $80 + 2 - isbyte? ;
: jrel8, 2 - c, ;
: jrel32, ( rel32-or-16 ) realmode if 3 - 16b le, else 5 - le, then ;