diff options
| author | Xavier ASUS <xavi92psx@gmail.com> | 2019-10-18 00:31:54 +0200 |
|---|---|---|
| committer | Xavier ASUS <xavi92psx@gmail.com> | 2019-10-18 00:31:54 +0200 |
| commit | 268a53de823a6750d6256ee1fb1e7707b4b45740 (patch) | |
| tree | 42c1799a9a82b2f7d9790ee9fe181d72a7274751 /device/lib/stm8/sprintf.lst | |
| download | sdcc-gas-268a53de823a6750d6256ee1fb1e7707b4b45740.tar.gz | |
sdcc-3.9.0 fork implementing GNU assembler syntax
This fork aims to provide better support for stm8-binutils
Diffstat (limited to 'device/lib/stm8/sprintf.lst')
| -rw-r--r-- | device/lib/stm8/sprintf.lst | 125 |
1 files changed, 125 insertions, 0 deletions
diff --git a/device/lib/stm8/sprintf.lst b/device/lib/stm8/sprintf.lst new file mode 100644 index 0000000..f6916eb --- /dev/null +++ b/device/lib/stm8/sprintf.lst @@ -0,0 +1,125 @@ + 1 ;-------------------------------------------------------- + 2 ; File Created by SDCC : free open source ANSI-C Compiler + 3 ; Version 3.9.3 #11345 (Linux) + 4 ;-------------------------------------------------------- + 5 .module sprintf + 6 .optsdcc -mstm8 + 7 + 8 ;-------------------------------------------------------- + 9 ; Public variables in this module + 10 ;-------------------------------------------------------- + 11 .globl __print_format + 12 .globl _vsprintf + 13 .globl _sprintf + 14 ;-------------------------------------------------------- + 15 ; ram data + 16 ;-------------------------------------------------------- + 17 .area DATA + 18 ;-------------------------------------------------------- + 19 ; ram data + 20 ;-------------------------------------------------------- + 21 .area INITIALIZED + 22 ;-------------------------------------------------------- + 23 ; absolute external ram data + 24 ;-------------------------------------------------------- + 25 .area DABS (ABS) + 26 + 27 ; default segment ordering for linker + 28 .area HOME + 29 .area GSINIT + 30 .area GSFINAL + 31 .area CONST + 32 .area INITIALIZER + 33 .area CODE + 34 + 35 ;-------------------------------------------------------- + 36 ; global & static initialisations + 37 ;-------------------------------------------------------- + 38 .area HOME + 39 .area GSINIT + 40 .area GSFINAL + 41 .area GSINIT + 42 ;-------------------------------------------------------- + 43 ; Home + 44 ;-------------------------------------------------------- + 45 .area HOME + 46 .area HOME + 47 ;-------------------------------------------------------- + 48 ; code + 49 ;-------------------------------------------------------- + 50 .area CODE + 51 ; ../sprintf.c: 34: put_char_to_string (char c, void* p) _REENTRANT + 52 ; ----------------------------------------- + 53 ; function put_char_to_string + 54 ; ----------------------------------------- + 000000 55 _put_char_to_string: + 000000 52 02 [ 2] 56 sub sp, #2 + 57 ; ../sprintf.c: 36: char **buf = (char **)p; + 000002 16 06 [ 2] 58 ldw y, (0x06, sp) + 59 ; ../sprintf.c: 37: *(*buf)++ = c; + 000004 93 [ 1] 60 ldw x, y + 000005 FE [ 2] 61 ldw x, (x) + 000006 1F 01 [ 2] 62 ldw (0x01, sp), x + 000008 5C [ 1] 63 incw x + 000009 90 FF [ 2] 64 ldw (y), x + 00000B 1E 01 [ 2] 65 ldw x, (0x01, sp) + 00000D 7B 05 [ 1] 66 ld a, (0x05, sp) + 00000F F7 [ 1] 67 ld (x), a + 68 ; ../sprintf.c: 38: } + 000010 5B 02 [ 2] 69 addw sp, #2 + 000012 81 [ 4] 70 ret + 71 ; ../sprintf.c: 41: vsprintf (char *buf, const char *format, va_list ap) + 72 ; ----------------------------------------- + 73 ; function vsprintf + 74 ; ----------------------------------------- + 000013 75 _vsprintf: + 76 ; ../sprintf.c: 44: i = _print_format (put_char_to_string, &buf, format, ap); + 000013 96 [ 1] 77 ldw x, sp + 000014 1C 00 03 [ 2] 78 addw x, #3 + 000017 16 07 [ 2] 79 ldw y, (0x07, sp) + 000019 90 89 [ 2] 80 pushw y + 00001B 16 07 [ 2] 81 ldw y, (0x07, sp) + 00001D 90 89 [ 2] 82 pushw y + 00001F 89 [ 2] 83 pushw x + 000020 4Br00 [ 1] 84 push #<(_put_char_to_string + 0) + 000022 4Bs00 [ 1] 85 push #((_put_char_to_string + 0) >> 8) + 000024 CDr00r00 [ 4] 86 call __print_format + 000027 5B 08 [ 2] 87 addw sp, #8 + 88 ; ../sprintf.c: 45: *buf = 0; + 000029 16 03 [ 2] 89 ldw y, (0x03, sp) + 00002B 90 7F [ 1] 90 clr (y) + 91 ; ../sprintf.c: 46: return i; + 92 ; ../sprintf.c: 47: } + 00002D 81 [ 4] 93 ret + 94 ; ../sprintf.c: 50: sprintf (char *buf, const char *format, ...) + 95 ; ----------------------------------------- + 96 ; function sprintf + 97 ; ----------------------------------------- + 00002E 98 _sprintf: + 99 ; ../sprintf.c: 55: va_start (arg, format); + 00002E 96 [ 1] 100 ldw x, sp + 00002F 1C 00 05 [ 2] 101 addw x, #5 + 000032 5C [ 1] 102 incw x + 000033 5C [ 1] 103 incw x + 000034 51 [ 1] 104 exgw x, y + 105 ; ../sprintf.c: 56: i = _print_format (put_char_to_string, &buf, format, arg); + 000035 96 [ 1] 106 ldw x, sp + 000036 1C 00 03 [ 2] 107 addw x, #3 + 000039 90 89 [ 2] 108 pushw y + 00003B 16 07 [ 2] 109 ldw y, (0x07, sp) + 00003D 90 89 [ 2] 110 pushw y + 00003F 89 [ 2] 111 pushw x + 000040 4Br00 [ 1] 112 push #<(_put_char_to_string + 0) + 000042 4Bs00 [ 1] 113 push #((_put_char_to_string + 0) >> 8) + 000044 CDr00r00 [ 4] 114 call __print_format + 000047 5B 08 [ 2] 115 addw sp, #8 + 116 ; ../sprintf.c: 57: *buf = 0; + 000049 16 03 [ 2] 117 ldw y, (0x03, sp) + 00004B 90 7F [ 1] 118 clr (y) + 119 ; ../sprintf.c: 60: return i; + 120 ; ../sprintf.c: 61: } + 00004D 81 [ 4] 121 ret + 122 .area CODE + 123 .area CONST + 124 .area INITIALIZER + 125 .area CABS (ABS) |
