-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patht65_u_branches.a65
80 lines (55 loc) · 1.18 KB
/
t65_u_branches.a65
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
; Test the unsigned branches.
; Note: The 'cmp' instruction is OK for unsigend data.
.include "test65.i65"
.include "../asminc/u_branches.i65"
.export _main
.pc02
.code
_main:
lda #42
cmp #43
bult pass_10 ; branch if 42 < 43
tests_fail 10
pass_10:
cmp #42 ; branch if 42 < 42
bult fail_11
cmp #41 ; branch if 42 < 41
bult fail_12
lda #42
cmp #43
bule pass_20 ; branch if 42 <= 43
tests_fail 20
pass_20:
cmp #42
bule pass_21 ; branch if 42 <= 42
tests_fail 21
pass_21:
cmp #41
bule fail_22 ; branch if 42 <= 43
lda #42
cmp #43
buge fail_30 ; branch if 42 >= 43
cmp #42
buge pass_31 ; branch if 42 >= 42
tests_fail 31
pass_31:
cmp #41
buge pass_32 ; branch if 42 >= 41
tests_fail 32
pass_32:
lda #42
cmp #43
bugt fail_40 ; branch if 42 > 43
cmp #42
bugt fail_41 ; branch if 42 > 42
cmp #41
bugt pass_42 ; branch if 42 > 41
tests_fail 42
pass_42:
tests_pass
fail_11: tests_fail 11
fail_12: tests_fail 12
fail_22: tests_fail 22
fail_30: tests_fail 30
fail_40: tests_fail 40
fail_41: tests_fail 41