summaryrefslogtreecommitdiff
path: root/v4.0/src/BIOS/JUMPMAC.INC
diff options
context:
space:
mode:
authorGravatar Mark Zbikowski2024-04-25 21:24:10 +0100
committerGravatar Microsoft Open Source2024-04-25 22:32:27 +0000
commit2d04cacc5322951f187bb17e017c12920ac8ebe2 (patch)
tree80ee017efa878dfd5344b44249e6a241f2a7f6e2 /v4.0/src/BIOS/JUMPMAC.INC
parentMerge pull request #430 from jpbaltazar/typoptbr (diff)
downloadms-dos-main.tar.gz
ms-dos-main.tar.xz
ms-dos-main.zip
MZ is back!HEADmain
Diffstat (limited to 'v4.0/src/BIOS/JUMPMAC.INC')
-rw-r--r--v4.0/src/BIOS/JUMPMAC.INC31
1 files changed, 31 insertions, 0 deletions
diff --git a/v4.0/src/BIOS/JUMPMAC.INC b/v4.0/src/BIOS/JUMPMAC.INC
new file mode 100644
index 0000000..e631e2e
--- /dev/null
+++ b/v4.0/src/BIOS/JUMPMAC.INC
@@ -0,0 +1,31 @@
1 ;;Rev 3.30 Modification
2;
3; given a label <lbl> either 2 byte jump to another label <lbl>_J
4; if it is near enough or 3 byte jump to <lbl>
5;
6
7jump macro lbl
8 local a
9.xcref
10
11 ifndef lbl&_j ;; is this the first invocation
12a:
13 JMP lbl
14 ELSE
15 IF (lbl&_J GE $) OR ($-lbl&_J GT 126)
16a:
17 JMP lbl ;; is the jump too far away?
18 ELSE
19a:
20 JMP lbl&_J ;; do the short one...
21 ENDIF
22 ENDIF
23lbl&_j = a
24.cref
25 endm
26.xcref jump
27;REDEFINE THE ABOVE MACRO TO ALWAYS TRY A 3 BYTE NEAR JUMP
28JUMP MACRO LBL
29 JMP LBL
30 ENDM ;;End of Modification
31 \ No newline at end of file