summaryrefslogtreecommitdiff
path: root/v4.0/src/BIOS/JUMPMAC.INC
diff options
context:
space:
mode:
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