diff options
Diffstat (limited to 'device/lib/stm8/atoi.lst')
| -rw-r--r-- | device/lib/stm8/atoi.lst | 145 |
1 files changed, 0 insertions, 145 deletions
diff --git a/device/lib/stm8/atoi.lst b/device/lib/stm8/atoi.lst deleted file mode 100644 index 113ded5..0000000 --- a/device/lib/stm8/atoi.lst +++ /dev/null @@ -1,145 +0,0 @@ - 1 ;-------------------------------------------------------- - 2 ; File Created by SDCC : free open source ANSI-C Compiler - 3 ; Version 3.9.3 #11345 (Linux) - 4 ;-------------------------------------------------------- - 5 .module atoi - 6 .optsdcc -mstm8 - 7 - 8 ;-------------------------------------------------------- - 9 ; Public variables in this module - 10 ;-------------------------------------------------------- - 11 .globl _atoi - 12 ;-------------------------------------------------------- - 13 ; ram data - 14 ;-------------------------------------------------------- - 15 .area DATA - 16 ;-------------------------------------------------------- - 17 ; ram data - 18 ;-------------------------------------------------------- - 19 .area INITIALIZED - 20 ;-------------------------------------------------------- - 21 ; absolute external ram data - 22 ;-------------------------------------------------------- - 23 .area DABS (ABS) - 24 - 25 ; default segment ordering for linker - 26 .area HOME - 27 .area GSINIT - 28 .area GSFINAL - 29 .area CONST - 30 .area INITIALIZER - 31 .area CODE - 32 - 33 ;-------------------------------------------------------- - 34 ; global & static initialisations - 35 ;-------------------------------------------------------- - 36 .area HOME - 37 .area GSINIT - 38 .area GSFINAL - 39 .area GSINIT - 40 ;-------------------------------------------------------- - 41 ; Home - 42 ;-------------------------------------------------------- - 43 .area HOME - 44 .area HOME - 45 ;-------------------------------------------------------- - 46 ; code - 47 ;-------------------------------------------------------- - 48 .area CODE - 49 ; ../atoi.c: 34: int atoi(const char *nptr) - 50 ; ----------------------------------------- - 51 ; function atoi - 52 ; ----------------------------------------- - 000000 53 _atoi: - 000000 52 07 [ 2] 54 sub sp, #7 - 55 ; ../atoi.c: 36: int ret = 0; - 000002 5F [ 1] 56 clrw x - 000003 1F 04 [ 2] 57 ldw (0x04, sp), x - 58 ; ../atoi.c: 39: while (isblank (*nptr)) - 000005 16 0A [ 2] 59 ldw y, (0x0a, sp) - 000007 60 00101$: - 000007 90 F6 [ 1] 61 ld a, (y) - 000009 6B 03 [ 1] 62 ld (0x03, sp), a - 63 ; ../atoi.c: 40: nptr++; - 00000B 93 [ 1] 64 ldw x, y - 00000C 5C [ 1] 65 incw x - 00000D 1F 06 [ 2] 66 ldw (0x06, sp), x - 67 ; ./../../include/ctype.h: 53: return ((unsigned char)c == ' ' || (unsigned char)c == '\t'); - 00000F A1 20 [ 1] 68 cp a, #0x20 - 000011 27 04 [ 1] 69 jreq 00115$ - 000013 A1 09 [ 1] 70 cp a, #0x09 - 000015 26 04 [ 1] 71 jrne 00131$ - 000017 72 00115$: - 73 ; ../atoi.c: 40: nptr++; - 000017 16 06 [ 2] 74 ldw y, (0x06, sp) - 000019 20 EC [ 2] 75 jra 00101$ - 00001B 76 00131$: - 00001B 17 0A [ 2] 77 ldw (0x0a, sp), y - 78 ; ../atoi.c: 42: neg = (*nptr == '-'); - 00001D 7B 03 [ 1] 79 ld a, (0x03, sp) - 00001F A0 2D [ 1] 80 sub a, #0x2d - 000021 26 02 [ 1] 81 jrne 00168$ - 000023 4C [ 1] 82 inc a - 000024 21 83 .byte 0x21 - 000025 84 00168$: - 000025 4F [ 1] 85 clr a - 000026 86 00169$: - 87 ; ../atoi.c: 44: if (*nptr == '-' || *nptr == '+') - 000026 6B 02 [ 1] 88 ld (0x02, sp), a - 000028 26 06 [ 1] 89 jrne 00104$ - 00002A 7B 03 [ 1] 90 ld a, (0x03, sp) - 00002C A1 2B [ 1] 91 cp a, #0x2b - 00002E 26 04 [ 1] 92 jrne 00129$ - 000030 93 00104$: - 94 ; ../atoi.c: 45: nptr++; - 000030 16 06 [ 2] 95 ldw y, (0x06, sp) - 000032 17 0A [ 2] 96 ldw (0x0a, sp), y - 97 ; ../atoi.c: 47: while (isdigit (*nptr)) - 000034 98 00129$: - 000034 16 0A [ 2] 99 ldw y, (0x0a, sp) - 000036 17 06 [ 2] 100 ldw (0x06, sp), y - 000038 101 00107$: - 000038 1E 06 [ 2] 102 ldw x, (0x06, sp) - 00003A F6 [ 1] 103 ld a, (x) - 00003B 6B 03 [ 1] 104 ld (0x03, sp), a - 105 ; ./../../include/ctype.h: 62: return ((unsigned char)c >= '0' && (unsigned char)c <= '9'); - 00003D 6B 01 [ 1] 106 ld (0x01, sp), a - 00003F A1 30 [ 1] 107 cp a, #0x30 - 000041 25 23 [ 1] 108 jrc 00109$ - 000043 7B 01 [ 1] 109 ld a, (0x01, sp) - 000045 A1 39 [ 1] 110 cp a, #0x39 - 000047 22 1D [ 1] 111 jrugt 00109$ - 112 ; ../atoi.c: 48: ret = ret * 10 + (*(nptr++) - '0'); - 000049 1E 04 [ 2] 113 ldw x, (0x04, sp) - 00004B 58 [ 2] 114 sllw x - 00004C 58 [ 2] 115 sllw x - 00004D 72 FB 04 [ 2] 116 addw x, (0x04, sp) - 000050 58 [ 2] 117 sllw x - 000051 1F 04 [ 2] 118 ldw (0x04, sp), x - 000053 1E 06 [ 2] 119 ldw x, (0x06, sp) - 000055 5C [ 1] 120 incw x - 000056 1F 06 [ 2] 121 ldw (0x06, sp), x - 000058 5F [ 1] 122 clrw x - 000059 7B 03 [ 1] 123 ld a, (0x03, sp) - 00005B 97 [ 1] 124 ld xl, a - 00005C 1D 00 30 [ 2] 125 subw x, #0x0030 - 00005F 72 FB 04 [ 2] 126 addw x, (0x04, sp) - 000062 1F 04 [ 2] 127 ldw (0x04, sp), x - 000064 20 D2 [ 2] 128 jra 00107$ - 000066 129 00109$: - 130 ; ../atoi.c: 50: return (neg ? -ret : ret); // Since -INT_MIN is INT_MIN in sdcc, the result value always turns out ok. - 000066 0D 02 [ 1] 131 tnz (0x02, sp) - 000068 27 04 [ 1] 132 jreq 00120$ - 00006A 1E 04 [ 2] 133 ldw x, (0x04, sp) - 00006C 50 [ 2] 134 negw x - 00006D C5 135 .byte 0xc5 - 00006E 136 00120$: - 00006E 1E 04 [ 2] 137 ldw x, (0x04, sp) - 000070 138 00121$: - 139 ; ../atoi.c: 51: } - 000070 5B 07 [ 2] 140 addw sp, #7 - 000072 81 [ 4] 141 ret - 142 .area CODE - 143 .area CONST - 144 .area INITIALIZER - 145 .area CABS (ABS) |
