Add support for the GBZ80, Z180, and eZ80 variants of the Z80 architecure. Add an...
[deliverable/binutils-gdb.git] / ld / testsuite / ld-z80 / relocs.s
1 .text
2 ; .org 0
3
4 .globl label1
5 .globl label2
6 .globl label3
7 .globl label4
8 .globl label5
9 .globl label6
10 .globl label7
11 .globl label8
12 .globl label9
13
14 .globl value8
15 .globl value16
16 .globl value24
17 .globl value32
18
19 .globl field_0
20 .globl field_1
21
22 call label1
23 call nz,label2
24 call z,label3
25 call nc,label4
26 call c,label5
27 call po,label6
28 call pe,label7
29 call p,label8
30 call m,label9
31
32 jp label1
33 jp nz,label2
34 jp z,label3
35 jp nc,label4
36 jp c,label5
37 jp po,label6
38 jp pe,label7
39 jp p,label8
40 jp m,label9
41
42 ld l,(ix+5)
43 ld a,(ix+field_0)
44 ld c,(ix+field_1-10)
45 ld b,(ix+field_1-11)
46
47 field_0_1 .equ field_0+90
48
49 ld (iy-5),l
50 ld (iy+field_0),a
51 ld (iy+field_1+10),c
52 ld (iy+field_1+11),b
53 ld h,(iy+field_0_1)
54
55 .ifdef ADLMODE
56 ld.is de,value32 >> 16
57 ld.is hl,value32 & 0xffff
58 ld.is de,(value32 + 0x12345678) >> 16
59 ld.is hl,(value32 + 0x12345678) & 0xffff
60 .else
61 ld de,value32 >> 16
62 ld hl,value32 & 0xffff
63 ld de,(value32 + 0x12345678) >> 16
64 ld hl,(value32 + 0x12345678) & 0xffff
65 .endif
66
67 ld d,value32 >> 24
68 ld e,value32 >> 16
69 ld h,value32 >> 8
70 ld l,value32 >> 0
71
72 ld d,(value32 + 0x12345678) >> 24
73 ld e,(value32 + 0x12345678) >> 16
74 ld h,(value32 + 0x12345678) >> 8
75 ld l,(value32 + 0x12345678) >> 0
76
77 .data
78 .db value8
79 .dw value16
80 .d24 value24
81 .d32 value32
This page took 0.03047 seconds and 4 git commands to generate.