|
1 | 1 | --- ira/ira.c 2015-09-11 09:25:13.000000000 +0200
|
2 |
| -+++ ira/ira.c 2015-09-11 09:19:33.000000000 +0200 |
| 2 | ++++ ira/ira.c 2015-09-11 10:29:42.000000000 +0200 |
3 | 3 | @@ -254,7 +254,7 @@
|
4 | 4 | if (baseoff > 0)
|
5 | 5 | fprintf(f,"+%hd,A%hu\n",baseoff,basereg);
|
|
36 | 36 |
|
37 | 37 | if (!ptr3) base = area1;
|
38 | 38 | if (area1<prgstart || area1>prgende || area2<prgstart || area2>prgende)
|
| 39 | +@@ -1269,7 +1269,7 @@ |
| 40 | + for(modulcnt=0;modulcnt<modulcount;modulcnt++) { |
| 41 | + if (!modultab[modulcnt]) |
| 42 | + if (!(pflags&KEEP_ZEROHUNKS)) continue; |
| 43 | +- fprintf(targetfile,"\tINCLUDE\t\"%s.S%s\"\n",targetname,itoa(modulcnt)); |
| 44 | ++ fprintf(targetfile,"\tINCLUDE\t\"%s.S%s\"\n",targetname,itostr(modulcnt)); |
| 45 | + } |
| 46 | + fprintf(targetfile,"\tEND\n"); |
| 47 | + fclose(targetfile);targetfile=0; |
| 48 | +@@ -1295,7 +1295,7 @@ |
| 49 | + } |
| 50 | + strcpy(tsname,targetname); |
| 51 | + strcat(tsname,".S"); |
| 52 | +- strcat(tsname,itoa(modulcnt)); |
| 53 | ++ strcat(tsname,itostr(modulcnt)); |
| 54 | + if (!(targetfile = fopen(tsname,"w"))) |
| 55 | + ExitPrg("Can't open %s\n",tsname); |
| 56 | + } |
| 57 | +@@ -1481,7 +1481,7 @@ |
| 58 | + } |
| 59 | + strcpy(tsname,targetname); |
| 60 | + strcat(tsname,".S"); |
| 61 | +- strcat(tsname,itoa(modulcnt)); |
| 62 | ++ strcat(tsname,itostr(modulcnt)); |
| 63 | + if (!(targetfile = fopen(tsname,"w"))) |
| 64 | + ExitPrg("Can't open %s\n",tsname); |
| 65 | + } |
| 66 | +@@ -1686,7 +1686,7 @@ |
| 67 | + } else { |
| 68 | + if (tflag==1) {tptr[k++]='\"';tptr[k++]=',';} |
| 69 | + if (tflag==2) tptr[k++]=','; |
| 70 | +- strcpy(&tptr[k],itoa((ULONG)buf[j])); |
| 71 | ++ strcpy(&tptr[k],itostr((ULONG)buf[j])); |
| 72 | + if (buf[j]>99) k+=3; |
| 73 | + else if (buf[j]>9) k+=2; |
| 74 | + else k++; |
| 75 | +@@ -1726,7 +1726,7 @@ |
| 76 | + longs_per_line=0; |
| 77 | + for(i=0;(ptr2-ptr1)>=sizeof(ULONG) && be32(buf)==0;ptr1+=sizeof(ULONG),buf+=sizeof(ULONG)) i++; |
| 78 | + mnecat("DS.L"); |
| 79 | +- adrcat(itoa(i)); |
| 80 | ++ adrcat(itostr(i)); |
| 81 | + Ausgabe(); |
| 82 | + } |
| 83 | + else { |
39 | 84 | @@ -1833,7 +1833,7 @@
|
40 | 85 | }
|
41 | 86 |
|
|
45 | 90 | if (LabelAdr2[p2labind]==adr && p2labind<labcount) {
|
46 | 91 | flag = 1;index=p2labind;
|
47 | 92 | while(LabelAdr2[p2labind]==adr && p2labind<labcount) {
|
| 93 | +@@ -1928,13 +1928,13 @@ |
| 94 | + } |
| 95 | + if (pflags&OLDSTYLE) { |
| 96 | + if (getlab) GetLabel(adr,mode); |
| 97 | +- else adrcat(itoa((BYTE)(buf&0x00FF))); |
| 98 | ++ else adrcat(itostr((BYTE)(buf&0x00FF))); |
| 99 | + adrcat("("); |
| 100 | + } |
| 101 | + else { |
| 102 | + adrcat("("); |
| 103 | + if (getlab) GetLabel(adr,mode); |
| 104 | +- else adrcat(itoa((BYTE)(buf&0x00FF))); |
| 105 | ++ else adrcat(itostr((BYTE)(buf&0x00FF))); |
| 106 | + adrcat(","); |
| 107 | + } |
| 108 | + if (mode==6) { |
| 109 | +@@ -1993,7 +1993,7 @@ |
| 110 | + } |
| 111 | + else { |
| 112 | + if (P2WriteReloc()) return((UWORD)0xffff); |
| 113 | +- adrcat(itoa((WORD)be16(&buffer[prgcount-1]))); |
| 114 | ++ adrcat(itostr((WORD)be16(&buffer[prgcount-1]))); |
| 115 | + } |
| 116 | + adrcat(".W"); |
| 117 | + } |
| 118 | +@@ -2052,7 +2052,7 @@ |
| 119 | + else adrcat(".W"); |
| 120 | + if (scale) { |
| 121 | + adrcat("*"); |
| 122 | +- adrcat(itoa(1<<scale)); |
| 123 | ++ adrcat(itostr(1<<scale)); |
| 124 | + } |
| 125 | + square1&=~4; |
| 126 | + operand&=~4; |
| 127 | +@@ -2063,7 +2063,7 @@ |
| 128 | + if (operand&8) { |
| 129 | + if (odsize==2) { |
| 130 | + if (P2WriteReloc()) return((UWORD)0xffff); |
| 131 | +- adrcat(itoa((WORD)be16(&buffer[prgcount-1]))); |
| 132 | ++ adrcat(itostr((WORD)be16(&buffer[prgcount-1]))); |
| 133 | + adrcat(".W"); |
| 134 | + } |
| 135 | + if (odsize==3) { |
| 136 | +@@ -2077,7 +2077,7 @@ |
| 137 | + dtacat(itohex(be16(&buffer[prgcount++]),4)); |
| 138 | + if (P2WriteReloc()) return((UWORD)0xffff); |
| 139 | + adr=(be16(&buffer[prgcount-2])<<16)+be16(&buffer[prgcount-1]); |
| 140 | +- adrcat(itoa(adr)); |
| 141 | ++ adrcat(itostr(adr)); |
| 142 | + } |
| 143 | + adrcat(".L"); |
| 144 | + } |
| 145 | +@@ -2098,13 +2098,13 @@ |
| 146 | + } |
| 147 | + if (pflags&OLDSTYLE) { |
| 148 | + if (getlab) GetLabel(adr,mode); |
| 149 | +- else adrcat(itoa((BYTE)(buf&0x00FF))); |
| 150 | ++ else adrcat(itostr((BYTE)(buf&0x00FF))); |
| 151 | + adrcat("("); |
| 152 | + } |
| 153 | + else { |
| 154 | + adrcat("("); |
| 155 | + if (getlab) GetLabel(adr,mode); |
| 156 | +- else adrcat(itoa((BYTE)(buf&0x00FF))); |
| 157 | ++ else adrcat(itostr((BYTE)(buf&0x00FF))); |
| 158 | + adrcat(","); |
| 159 | + } |
| 160 | + if (mode==6) { |
| 161 | +@@ -2119,7 +2119,7 @@ |
| 162 | + else adrcat(".W"); |
| 163 | + if (scale) { |
| 164 | + adrcat("*"); |
| 165 | +- adrcat(itoa(1<<scale)); |
| 166 | ++ adrcat(itostr(1<<scale)); |
| 167 | + } |
| 168 | + } |
| 169 | + } |
| 170 | +@@ -2204,12 +2204,12 @@ |
| 171 | + } |
| 172 | + else { |
| 173 | + if (pflags&OLDSTYLE) { |
| 174 | +- adrcat(itoa((WORD)buf)); |
| 175 | ++ adrcat(itostr((WORD)buf)); |
| 176 | + adrcat("(A"); |
| 177 | + } |
| 178 | + else { |
| 179 | + adrcat("("); |
| 180 | +- adrcat(itoa((WORD)buf)); |
| 181 | ++ adrcat(itostr((WORD)buf)); |
| 182 | + adrcat(",A"); |
| 183 | + } |
| 184 | + adrcat(itohex(reg,1)); |
| 185 | +@@ -2230,7 +2230,7 @@ |
| 186 | + /* PEA wegen den C-Proggies (Stackuebergabe) */ |
| 187 | + if (opcnumber==OPC_PEA || |
| 188 | + (sourcetype==1 && NoPtrsArea(prgcount*2+prgstart))) |
| 189 | +- adrcat(itoa(adr)); |
| 190 | ++ adrcat(itostr(adr)); |
| 191 | + else { |
| 192 | + if (sourcetype == 1 && (adr >= prgstart && adr <= prgende)) |
| 193 | + GetLabel(adr,mode); |
| 194 | +@@ -2409,11 +2409,11 @@ |
| 195 | + break; |
| 196 | + case 19: /* TRAP */ |
| 197 | + adrcat("#"); |
| 198 | +- adrcat(itoa(sigw&0xF)); |
| 199 | ++ adrcat(itostr(sigw&0xF)); |
| 200 | + break; |
| 201 | + case 20: /* moveq */ |
| 202 | + adrcat("#"); |
| 203 | +- adrcat(itoa((BYTE)(sigw&0x00FF))); |
| 204 | ++ adrcat(itostr((BYTE)(sigw&0x00FF))); |
| 205 | + break; |
| 206 | + case 21: /* Bcc */ |
| 207 | + if ((sigw&0x00ff)==0x00ff) { |
| 208 | +@@ -2449,7 +2449,7 @@ |
| 209 | + else { |
| 210 | + if (P2WriteReloc()) return(-1); |
| 211 | + adrcat("#"); |
| 212 | +- adrcat(itoa((WORD)buf)); |
| 213 | ++ adrcat(itostr((WORD)buf)); |
| 214 | + } |
| 215 | + break; |
| 216 | + case 23: /* BTST,BCLR,... IMMEDIATE®ISTER,SOURCEOP ONLY */ |
| 217 | +@@ -2473,7 +2473,7 @@ |
| 218 | + if (buf&0xFFE0) |
| 219 | + mode=NOADRMODE; |
| 220 | + } |
| 221 | +- adrcat(itoa(buf)); |
| 222 | ++ adrcat(itostr(buf)); |
| 223 | + } |
| 224 | + extens=0; /* Set extension to BYTE (undefined before) */ |
| 225 | + break; |
| 226 | +@@ -2489,7 +2489,7 @@ |
| 227 | + if (reg>7) mode=NOADRMODE; |
| 228 | + adrcat("D"); |
| 229 | + } |
| 230 | +- adrcat(itoa(reg)); |
| 231 | ++ adrcat(itostr(reg)); |
| 232 | + adrcat(":"); |
| 233 | + reg=(extra&0x001F); |
| 234 | + if (extra&0x0020) { |
| 235 | +@@ -2498,14 +2498,14 @@ |
| 236 | + } |
| 237 | + else |
| 238 | + if (reg==0) reg = 32; |
| 239 | +- adrcat(itoa(reg)); |
| 240 | ++ adrcat(itostr(reg)); |
| 241 | + adrcat("}"); |
| 242 | + if (((sigw&0x0700)>>8)&1) { |
| 243 | + /* BFEXTU, BFEXTS, BFFFO, BFINS */ |
| 244 | + if (extra&0x8000) mode=NOADRMODE; |
| 245 | + adrcat(",D"); |
| 246 | + reg=(extra&0x7000)>>12; |
| 247 | +- adrcat(itoa(reg)); |
| 248 | ++ adrcat(itostr(reg)); |
| 249 | + } |
| 250 | + else { |
| 251 | + if (extra&0xF000) mode=NOADRMODE; |
| 252 | +@@ -2514,7 +2514,7 @@ |
| 253 | + case 26: /* RTM */ |
| 254 | + if (sigw&0x0008) adrcat("A"); |
| 255 | + else adrcat("D"); |
| 256 | +- adrcat(itoa(reg2)); |
| 257 | ++ adrcat(itostr(reg2)); |
| 258 | + break; |
| 259 | + case 27: /* CAS2 SOURCE/DESTINATION */ |
| 260 | + buf = be16(&buffer[prgcount]); |
| 261 | +@@ -2525,24 +2525,24 @@ |
| 262 | + if (buf&0x0e38 || extra&0x0e38) mode=NOADRMODE; |
| 263 | + else { |
| 264 | + adrcat("D"); |
| 265 | +- adrcat(itoa(extra&7)); |
| 266 | ++ adrcat(itostr(extra&7)); |
| 267 | + adrcat(":"); |
| 268 | + adrcat("D"); |
| 269 | +- adrcat(itoa(buf&7)); |
| 270 | ++ adrcat(itostr(buf&7)); |
| 271 | + adrcat(","); |
| 272 | + adrcat("D"); |
| 273 | +- adrcat(itoa((extra&0x01c0)>>6)); |
| 274 | ++ adrcat(itostr((extra&0x01c0)>>6)); |
| 275 | + adrcat(":"); |
| 276 | + adrcat("D"); |
| 277 | +- adrcat(itoa((buf&0x01c0)>>6)); |
| 278 | ++ adrcat(itostr((buf&0x01c0)>>6)); |
| 279 | + adrcat(","); |
| 280 | + if (extra&0x8000) adrcat("(A"); |
| 281 | + else adrcat("(D"); |
| 282 | +- adrcat(itoa((extra&0x7000)>>12)); |
| 283 | ++ adrcat(itostr((extra&0x7000)>>12)); |
| 284 | + adrcat("):"); |
| 285 | + if (buf&0x8000) adrcat("(A"); |
| 286 | + else adrcat("(D"); |
| 287 | +- adrcat(itoa((buf&0x7000)>>12)); |
| 288 | ++ adrcat(itostr((buf&0x7000)>>12)); |
| 289 | + adrcat(")"); |
| 290 | + } |
| 291 | + break; |
| 292 | +@@ -2553,10 +2553,10 @@ |
| 293 | + if (extra&0xfe38) mode=NOADRMODE; |
| 294 | + else { |
| 295 | + adrcat("D"); |
| 296 | +- adrcat(itoa(extra&7)); |
| 297 | ++ adrcat(itostr(extra&7)); |
| 298 | + adrcat(","); |
| 299 | + adrcat("D"); |
| 300 | +- adrcat(itoa((extra&0x01c0)>>6)); |
| 301 | ++ adrcat(itostr((extra&0x01c0)>>6)); |
| 302 | + } |
| 303 | + break; |
| 304 | + case 29: /* DIVIDE/MULTIPLY LONG SIGNED/UNSIGNED */ |
| 305 | +@@ -2569,21 +2569,21 @@ |
| 306 | + if (opcnumber == OPC_DIVL) { |
| 307 | + if (!(extra&0x0400) && reg!=creg) mnecat("L"); |
| 308 | + adrcat("D"); |
| 309 | +- adrcat(itoa(creg)); |
| 310 | ++ adrcat(itostr(creg)); |
| 311 | + if ((extra&0x0400) || |
| 312 | + (!(extra&0x0400) && reg!=creg)) { |
| 313 | + adrcat(":D"); |
| 314 | +- adrcat(itoa(reg)); |
| 315 | ++ adrcat(itostr(reg)); |
| 316 | + } |
| 317 | + } |
| 318 | + else { /* mul?.l */ |
| 319 | + if (extra&0x0400) { |
| 320 | + adrcat("D"); |
| 321 | +- adrcat(itoa(creg)); |
| 322 | ++ adrcat(itostr(creg)); |
| 323 | + adrcat(":"); |
| 324 | + } |
| 325 | + adrcat("D"); |
| 326 | +- adrcat(itoa(reg)); |
| 327 | ++ adrcat(itostr(reg)); |
| 328 | + } |
| 329 | + mnecat(".L"); |
| 330 | + } |
| 331 | +@@ -2595,7 +2595,7 @@ |
| 332 | + if (P2WriteReloc()) return(-1); |
| 333 | + if (P2WriteReloc()) return(-1); |
| 334 | + adrcat("#"); |
| 335 | +- adrcat(itoa(displace)); |
| 336 | ++ adrcat(itostr(displace)); |
| 337 | + } |
| 338 | + break; |
| 339 | + case 31: /* MOVE16 POSTINCREMENT ONLY (DESTINATION) */ |
| 340 | +@@ -2603,7 +2603,7 @@ |
| 341 | + else { |
| 342 | + if (P2WriteReloc()) return(-1); |
| 343 | + adrcat("(A"); |
| 344 | +- adrcat(itoa((buf&0x7000)>>12)); |
| 345 | ++ adrcat(itostr((buf&0x7000)>>12)); |
| 346 | + adrcat(")+"); |
| 347 | + } |
| 348 | + break; |
| 349 | +@@ -2640,7 +2640,7 @@ |
| 350 | + if (sigw&1) { |
| 351 | + if (buf&0x8000) adrcat("A"); |
| 352 | + else adrcat("D"); |
| 353 | +- adrcat(itoa(reg)); |
| 354 | ++ adrcat(itostr(reg)); |
| 355 | + adrcat(","); |
| 356 | + } |
| 357 | + if (creg&0x0800) creg=(creg%8)+9; |
| 358 | +@@ -2650,7 +2650,7 @@ |
| 359 | + adrcat(","); |
| 360 | + if (buf&0x8000) adrcat("A"); |
| 361 | + else adrcat("D"); |
| 362 | +- adrcat(itoa(reg)); |
| 363 | ++ adrcat(itostr(reg)); |
| 364 | + } |
| 365 | + } |
| 366 | + break; |
| 367 | +@@ -2660,7 +2660,7 @@ |
| 368 | + reg=(extra&0x7000)>>12; |
| 369 | + if (extra&0x8000) adrcat("A"); |
| 370 | + else adrcat("D"); |
| 371 | +- adrcat(itoa(reg)); |
| 372 | ++ adrcat(itostr(reg)); |
| 373 | + } |
| 374 | + break; |
| 375 | + } |
48 | 376 | @@ -2806,7 +2806,7 @@
|
49 | 377 | if (!(strnicmp(odata,"OMPAT=",6))) {
|
50 | 378 | char c,*p = odata+6;
|
|
0 commit comments