Rev 3958 | Rev 4180 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3958 | Rev 4166 | ||
---|---|---|---|
Line 263... | Line 263... | ||
263 | from++; |
263 | from++; |
264 | } |
264 | } |
265 | *to = '\0'; |
265 | *to = '\0'; |
266 | }*/ |
266 | }*/ |
Line 267... | Line -... | ||
267 | - | ||
268 | dword itoa( ESI) |
- | |
269 | { |
- | |
270 | unsigned char buffer[11]; |
- | |
271 | $pusha |
- | |
272 | - | ||
273 | EDI = #buffer; |
- | |
274 | ECX = 10; |
- | |
275 | if (ESI < 0) |
- | |
276 | { |
- | |
277 | $mov al, '-' |
- | |
278 | $stosb |
- | |
279 | $neg esi |
- | |
280 | } |
- | |
281 | - | ||
282 | $mov eax, esi |
- | |
283 | $push -'0' |
- | |
284 | F2: |
- | |
285 | $xor edx, edx |
- | |
286 | $div ecx |
- | |
287 | $push edx |
- | |
288 | $test eax, eax |
- | |
289 | $jnz F2 |
- | |
290 | F3: |
- | |
291 | $pop eax |
- | |
292 | $add al, '0' |
- | |
293 | $stosb |
- | |
294 | $jnz F3 |
- | |
295 | - | ||
296 | $mov al, '\0' |
- | |
297 | $stosb |
- | |
298 | - | ||
299 | $popa |
- | |
300 | return #buffer; |
- | |
301 | } |
- | |
Line 302... | Line 267... | ||
302 | 267 | ||
303 | 268 | ||
304 | inline fastcall dword atoi( EDI) |
269 | inline fastcall dword atoi( EDI) |
305 | { |
270 | { |
Line 360... | Line 325... | ||
360 | IF(AL>='')&&(AL<='')DSBYTE[EDX]=AL|0x20; // -¯ |
325 | IF(AL>='')&&(AL<='')DSBYTE[EDX]=AL|0x20; // -¯ |
361 | IF (AL>=144) && (AL<=159) DSBYTE[EDX] = AL + 80; //à-ï |
326 | IF (AL>=144) && (AL<=159) DSBYTE[EDX] = AL + 80; //à-ï |
362 | }while(AL!=0); |
327 | }while(AL!=0); |
363 | } |
328 | } |
Line -... | Line 329... | ||
- | 329 | ||
- | 330 | unsigned char buffer[11]; |
|
- | 331 | dword itoa( ESI) |
|
- | 332 | { |
|
- | 333 | $pusha |
|
- | 334 | EDI = #buffer; |
|
- | 335 | ECX = 10; |
|
- | 336 | if (ESI < 0) |
|
- | 337 | { |
|
- | 338 | $mov al, '-' |
|
- | 339 | $stosb |
|
- | 340 | $neg esi |
|
- | 341 | } |
|
- | 342 | ||
- | 343 | $mov eax, esi |
|
- | 344 | $push -'0' |
|
- | 345 | F2: |
|
- | 346 | $xor edx, edx |
|
- | 347 | $div ecx |
|
- | 348 | $push edx |
|
- | 349 | $test eax, eax |
|
- | 350 | $jnz F2 |
|
- | 351 | F3: |
|
- | 352 | $pop eax |
|
- | 353 | $add al, '0' |
|
- | 354 | $stosb |
|
- | 355 | $jnz F3 |
|
- | 356 | ||
- | 357 | $mov al, '\0' |
|
- | 358 | $stosb |
|
- | 359 | ||
- | 360 | $popa |
|
- | 361 | return #buffer; |
|
- | 362 | } |
|
- | 363 | ||
- | 364 | inline fastcall itoa_(signed int EDI, ESI) |
|
- | 365 | { |
|
- | 366 | $pusha |
|
- | 367 | EBX = EDI; |
|
- | 368 | ECX = 10; |
|
- | 369 | if (ESI > 90073741824) |
|
- | 370 | { |
|
- | 371 | $mov al, '-' |
|
- | 372 | $stosb |
|
- | 373 | $neg esi |
|
- | 374 | } |
|
- | 375 | ||
- | 376 | $mov eax, esi |
|
- | 377 | $push -'0' |
|
- | 378 | F2: |
|
- | 379 | $xor edx, edx |
|
- | 380 | $div ecx |
|
- | 381 | $push edx |
|
- | 382 | $test eax, eax |
|
- | 383 | $jnz F2 |
|
- | 384 | F3: |
|
- | 385 | $pop eax |
|
- | 386 | $add al, '0' |
|
- | 387 | $stosb |
|
- | 388 | $jnz F3 |
|
- | 389 | ||
- | 390 | $mov al, '\0' |
|
- | 391 | $stosb |
|
- | 392 | ||
- | 393 | $popa |
|
- | 394 | return EBX; |
|
- | 395 | } |
|
364 | 396 | ||
365 | void debugi(dword d_int) |
397 | void debugi(dword d_int) |
366 | { |
398 | { |
367 | char tmpch[11]; |
399 | char tmpch[12]; |
368 | strcpy(#tmpch, itoa(d_int)); |
400 | itoa_(#tmpch, d_int); |
369 | debug(#tmpch); |
401 | debug(#tmpch); |