-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfarbranch.inc
98 lines (90 loc) · 3.33 KB
/
farbranch.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
!ifdef FARBRANCH_INC !eof
FARBRANCH_INC=1
;****************************************************************************
; Branch to far address if Carry Clear
; If the carry flag is clear then set the program counter to .addr
;****************************************************************************
; INPUT: .addr - The label to branch to
;****************************************************************************
!macro FBCC .addr {
bcs +
jmp .addr
+
}
;****************************************************************************
; Branch to far address if Carry Set
; If the carry flag is set then set the program counter to .addr
;****************************************************************************
; INPUT: .addr - The label to branch to
;****************************************************************************
!macro FBCS .addr {
bcc +
jmp .addr
+
}
;****************************************************************************
; Branch to far address if EQual
; If the zero flag is set then set the program counter to .addr
;****************************************************************************
; INPUT: .addr - The label to branch to
;****************************************************************************
!macro FBEQ .addr {
bne +
jmp .addr
+
}
;****************************************************************************
; Branch to far address if MInus
; If the negative flag is set then set the program counter to .addr
;****************************************************************************
; INPUT: .addr - The label to branch to
;****************************************************************************
!macro FBMI .addr {
bpl +
jmp .addr
+
}
;****************************************************************************
; Branch to far address if Not Equal
; If the zero flag is clear then set the program counter to .addr
;****************************************************************************
; INPUT: .addr - The label to branch to
;****************************************************************************
!macro FBNE .addr {
beq +
jmp .addr
+
}
;****************************************************************************
; Branch to far address if PLus
; If the negative flag is clear then set the program counter to .addr
;****************************************************************************
; INPUT: .addr - The label to branch to
;****************************************************************************
!macro FBPL .addr {
bmi +
jmp .addr
+
}
;****************************************************************************
; Branch to far address if oVerflow Clear
; If the overflow flag is clear then set the program counter to .addr
;****************************************************************************
; INPUT: .addr - The label to branch to
;****************************************************************************
!macro FBVC .addr {
bvs +
jmp .addr
+
}
;****************************************************************************
; Branch to far address if oVerflow Set
; If the overflow flag is set then set the program counter to .addr
;****************************************************************************
; INPUT: .addr - The label to branch to
;****************************************************************************
!macro FBVS .addr {
bvc +
jmp .addr
+
}