Blame | Last modification | View Log | Download
# file opened: relocation_high_2.asm1 0000 ; test to verify transitions of "relocatable" while using the structs and relocation data generation2 0000 RELOCATE_START HIGH ; definition must be in relocation block too to track default values being rel3 0000 STRUCT RELSTRUCT4 0000 ~ ByteRel BYTE high rel_label5 0000 ~ ByteFix BYTE high fix_label6 0000 ~ WordRelMsb WORD high rel_label7 0000 ~ WordFixMsb WORD high fix_label8 0000 ~ WordRel WORD rel_label9 0000 ~ WordFix WORD fix_label10 0000 ENDS11 0000 RELOCATE_END12 000013 0000 ORG $880014 8800 fix_label:15 880016 8800 ; these are outside of relocation block -> no relocation data in any case17 8800 88 11 88 00 s_1 RELSTRUCT { high fix_label, high rel_label, high fix_label, high rel_label, fix_label, rel_label }17 8804 11 00 00 8817 8808 00 1118 880A 11 88 11 00 s_2 RELSTRUCT18 880E 88 00 00 1118 8812 00 8819 881420 8814 0C 00 18 00 DW relocate_count, relocate_size21 881822 8818 02 11 04 11 RELOCATE_TABLE ; provides relocation addresses pointing directly at the high byte22 881C 07 11 0A 1122 8820 0C 11 0F 1122 8824 29 11 2C 1122 8828 31 11 32 1122 882C 34 11 39 1123 883024 8830 01 11 03 11 RELOCATE_TABLE +1 ; provides relocation addresses pointing one byte ahead of the high byte24 8834 06 11 09 1124 8838 0B 11 0E 1124 883C 28 11 2B 1124 8840 30 11 31 1124 8844 33 11 38 1125 884826 8848 RELOCATE_START HIGH27 8848 ORG $110028 1100 rel_label:29 110030 1100 ; check struct defined "at" address31 1100 s_at_rel RELSTRUCT = rel_label + $100032 1100 s_at_fix RELSTRUCT = fix_label + $100033 1100 ; these should be relocated34 1100 21 00 21 ld hl,s_at_rel35 1103 21 21 00 ld hl,high s_at_rel36 1106 3E 21 ld a,high s_at_rel37 1108 21 01 21 ld hl,s_at_rel.ByteFix38 110B 21 21 00 ld hl,high s_at_rel.ByteFix39 110E 3E 21 ld a,high s_at_rel.ByteFix40 1110 ; these are fixed41 1110 21 00 98 ld hl,s_at_fix42 1113 21 98 00 ld hl,high s_at_fix43 1116 3E 98 ld a,high s_at_fix44 1118 21 01 98 ld hl,s_at_fix.ByteFix45 111B 21 98 00 ld hl,high s_at_fix.ByteFix46 111E 3E 98 ld a,high s_at_fix.ByteFix47 112048 1120 21 01 00 ld hl,RELSTRUCT.ByteFix49 1123 21 00 00 ld hl,high RELSTRUCT.ByteFix50 1126 3E 00 ld a,high RELSTRUCT.ByteFix51 112852 1128 ; check struct with explicit init values (switching relocatable/fixed) - half of them requires relocation53 1128 88 11 88 00 s_init RELSTRUCT { high fix_label, high rel_label, high fix_label, high rel_label, fix_label, rel_label }53 112C 11 00 00 8853 1130 00 1154 113255 1132 ; check struct filled with default values (half of them needs relocation)56 1132 11 88 11 00 s_default RELSTRUCT56 1136 88 00 00 1156 113A 00 8857 113C58 113C ; this makes no sense? should be treated as norel label59 113C s_at_bogus RELSTRUCT = high rel_label60 113C 21 11 00 ld hl,s_at_bogus61 113F 21 00 00 ld hl,high s_at_bogus62 1142 3E 00 ld a,high s_at_bogus63 1144 21 12 00 ld hl,s_at_bogus.ByteFix64 1147 21 00 00 ld hl,high s_at_bogus.ByteFix65 114A 3E 00 ld a,high s_at_bogus.ByteFix66 114C67 114C RELOCATE_END68 114C# file closed: relocation_high_2.asmValue Label------ - -----------------------------------------------------------0x8800 fix_label0x1100 rel_label0x000C relocate_count0x0018 relocate_size0x000A X RELSTRUCT0x0001 RELSTRUCT.ByteFix0x0000 X RELSTRUCT.ByteRel0x0008 X RELSTRUCT.WordFix0x0004 X RELSTRUCT.WordFixMsb0x0006 X RELSTRUCT.WordRel0x0002 X RELSTRUCT.WordRelMsb0x8800 X s_10x8801 X s_1.ByteFix0x8800 X s_1.ByteRel0x8808 X s_1.WordFix0x8804 X s_1.WordFixMsb0x8806 X s_1.WordRel0x8802 X s_1.WordRelMsb0x880A X s_20x880B X s_2.ByteFix0x880A X s_2.ByteRel0x8812 X s_2.WordFix0x880E X s_2.WordFixMsb0x8810 X s_2.WordRel0x880C X s_2.WordRelMsb0x0011 s_at_bogus0x0012 s_at_bogus.ByteFix0x0011 X s_at_bogus.ByteRel0x0019 X s_at_bogus.WordFix0x0015 X s_at_bogus.WordFixMsb0x0017 X s_at_bogus.WordRel0x0013 X s_at_bogus.WordRelMsb0x9800 s_at_fix0x9801 s_at_fix.ByteFix0x9800 X s_at_fix.ByteRel0x9808 X s_at_fix.WordFix0x9804 X s_at_fix.WordFixMsb0x9806 X s_at_fix.WordRel0x9802 X s_at_fix.WordRelMsb0x2100 s_at_rel0x2101 s_at_rel.ByteFix0x2100 X s_at_rel.ByteRel0x2108 X s_at_rel.WordFix0x2104 X s_at_rel.WordFixMsb0x2106 X s_at_rel.WordRel0x2102 X s_at_rel.WordRelMsb0x1132 X s_default0x1133 X s_default.ByteFix0x1132 X s_default.ByteRel0x113A X s_default.WordFix0x1136 X s_default.WordFixMsb0x1138 X s_default.WordRel0x1134 X s_default.WordRelMsb0x1128 X s_init0x1129 X s_init.ByteFix0x1128 X s_init.ByteRel0x1130 X s_init.WordFix0x112C X s_init.WordFixMsb0x112E X s_init.WordRel0x112A X s_init.WordRelMsb