Changeset 46 for trunk/INCLUDE/ASM.INC
- Timestamp:
- Apr 12, 2014, 8:23:32 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/INCLUDE/ASM.INC
r45 r46 100 100 ; This macro does a check for this condition and aborts if it exists. 101 101 ; If there is space between the new location and the last emitted code or data 102 ; will be filled.102 ; it will be filled with a filler-value defined in this macro.. 103 103 ; 104 104 ; There are differences between assemblers on when and how labels and values … … 107 107 ; That's why the actual check for overlap is done by db getting a negative 108 108 ; value if an overlap occured. 109 ; So don't change the (after - before) calculations by assigning it to a110 ; variable; thatwill break this macro.109 ; Don't change the (after - before) expression to a pre-calculated label 110 ; because that won't work and will break this macro. 111 111 ; 112 112 ORIGIN MACRO loc … … 119 119 ; Use this value to fill the gap between the new origin and the last 120 120 ; emitted code or data. 121 fillchar = ' X'121 fillchar = '0' 122 122 123 123 ; Mark the location of the last emitted code or data. … … 125 125 126 126 ; JWasm can do db 0 dup (0). 127 ; Using db dup() causes JWasm to recognize the after label so that 128 ; overlap calculations are correct. 127 129 IFDEF JWASM 128 130 db (z_&loc&_2after - z_&loc&_1before) dup(fillchar) 129 131 ENDIF 130 132 131 ; Tasm cannot. 133 ; Tasm cannot do db 0 dup(0), so we exclude that condition. 134 ; Overlap checking could be done differently in Tasm but to keep things 135 ; easy the JWasm method above is used. 132 136 IFDEF TASM 133 137 IF (z_&loc&_2after - z_&loc&_1before) NE 0 134 138 db (z_&loc&_2after - z_&loc&_1before) dup(fillchar) 135 139 ENDIF 140 ENDIF 141 142 ; Masm can also do db 0 dup (0), and it does calculate correctly 143 ; but cannot find the after label. 144 ; Same issue as with JWasm but the db construct does not solve it for masm. 145 ; The label-values show-up to be correct in the listing though. 146 ; Currently overlap-checking is disabled when assembling with Masm ! 147 ; FIXME: Find a solution for Masm. 148 IFDEF MASM 149 ;~ db (z_&loc&_2after - z_&loc&_1before) dup(fillchar) 150 ECHO ** Warning: Overlap Check on: loc not performed ! 151 ENDIF 152 153 ; Wasm can also do db 0 dup (0), but it complains about brackets or so. 154 ; Seems to be some syntax issue. 155 ; It cannot generate a list-file so values cannot be checked. 156 ; It does not even support ECHO so no warning can be given. 157 ; So overlap-checking is disabled when assembling with Wasm ! 158 ; FIXME: Find a solution for Wasm. 159 IFDEF WASM 160 ; NOT EVEN ECHO IS SUPPORTED ! 161 ;~ db (z_&loc&_2after - z_&loc&_1before) dup(fillchar) 136 162 ENDIF 137 163 … … 161 187 162 188 163 sector_size equ 512 164 image_size_60secs equ 7800h 165 image_size_62secs equ 7c00h 189 sector_size equ 512 ; Normal size of a sector. 190 image_size_60secs equ 7800h ; Size of the pre v1.07 image. 191 image_size_62secs equ 7c00h ; Size of the post v1.06 image. 166 192 167 193 ;image_size equ image_size_60secs 168 194 image_size equ image_size_62secs 169 195 170 sector_count equ image_size / sector_size ; Image size in sectors 196 ; Image size in sectors 197 sector_count equ image_size / sector_size 171 198 172 199 IF image_size EQ image_size_60secs 173 partition_count equ 30 ; Maximum number of partitions supported 200 ; Maximum number of partitions supported in pre v1.07. 201 partition_count equ 30 174 202 ELSE 175 partition_count equ 45 ; Maximum number of partitions supported 203 ; Maximum number of partitions supported in post v1.06. 204 partition_count equ 45 176 205 ENDIF
Note:
See TracChangeset
for help on using the changeset viewer.