1 ;-------------------------------------------------------- 2 ; File Created by SDCC : free open source ANSI-C Compiler 3 ; Version 3.9.3 #11345 (Linux) 4 ;-------------------------------------------------------- 5 .module vprintf 6 .optsdcc -mstm8 7 8 ;-------------------------------------------------------- 9 ; Public variables in this module 10 ;-------------------------------------------------------- 11 .globl _putchar 12 .globl __print_format 13 .globl _vprintf 14 .globl _printf 15 ;-------------------------------------------------------- 16 ; ram data 17 ;-------------------------------------------------------- 18 .area DATA 19 ;-------------------------------------------------------- 20 ; ram data 21 ;-------------------------------------------------------- 22 .area INITIALIZED 23 ;-------------------------------------------------------- 24 ; absolute external ram data 25 ;-------------------------------------------------------- 26 .area DABS (ABS) 27 28 ; default segment ordering for linker 29 .area HOME 30 .area GSINIT 31 .area GSFINAL 32 .area CONST 33 .area INITIALIZER 34 .area CODE 35 36 ;-------------------------------------------------------- 37 ; global & static initialisations 38 ;-------------------------------------------------------- 39 .area HOME 40 .area GSINIT 41 .area GSFINAL 42 .area GSINIT 43 ;-------------------------------------------------------- 44 ; Home 45 ;-------------------------------------------------------- 46 .area HOME 47 .area HOME 48 ;-------------------------------------------------------- 49 ; code 50 ;-------------------------------------------------------- 51 .area CODE 52 ; ../vprintf.c: 34: put_char_to_stdout (char c, void* p) _REENTRANT 53 ; ----------------------------------------- 54 ; function put_char_to_stdout 55 ; ----------------------------------------- 000000 56 _put_char_to_stdout: 57 ; ../vprintf.c: 37: putchar (c); 000000 5F [ 1] 58 clrw x 000001 7B 04 [ 1] 59 ld a, (0x04, sp) 000003 97 [ 1] 60 ld xl, a 000004 89 [ 2] 61 pushw x 000005 8Ds00r00r00 [ 5] 62 callf _putchar 000009 5B 02 [ 2] 63 addw sp, #2 64 ; ../vprintf.c: 38: } 00000B 87 [ 5] 65 retf 66 ; ../vprintf.c: 41: vprintf (const char *format, va_list ap) 67 ; ----------------------------------------- 68 ; function vprintf 69 ; ----------------------------------------- 00000C 70 _vprintf: 71 ; ../vprintf.c: 43: return _print_format (put_char_to_stdout, NULL, format, ap); 00000C 1E 06 [ 2] 72 ldw x, (0x06, sp) 00000E 89 [ 2] 73 pushw x 00000F 1E 06 [ 2] 74 ldw x, (0x06, sp) 000011 89 [ 2] 75 pushw x 000012 5F [ 1] 76 clrw x 000013 89 [ 2] 77 pushw x 000014 4Br00 [ 1] 78 push #<(_put_char_to_stdout + 0) 000016 4Bs00 [ 1] 79 push #((_put_char_to_stdout + 0) >> 8) 000018 4Bs00 [ 1] 80 push #((_put_char_to_stdout + 0) >> 16) 00001A 8Ds00r00r00 [ 5] 81 callf __print_format 00001E 5B 09 [ 2] 82 addw sp, #9 83 ; ../vprintf.c: 44: } 000020 87 [ 5] 84 retf 85 ; ../vprintf.c: 47: printf (const char *format, ...) 86 ; ----------------------------------------- 87 ; function printf 88 ; ----------------------------------------- 000021 89 _printf: 90 ; ../vprintf.c: 52: va_start (arg, format); 000021 96 [ 1] 91 ldw x, sp 000022 1C 00 04 [ 2] 92 addw x, #4 000025 5C [ 1] 93 incw x 000026 5C [ 1] 94 incw x 95 ; ../vprintf.c: 53: i = _print_format (put_char_to_stdout, NULL, format, arg); 000027 89 [ 2] 96 pushw x 000028 1E 06 [ 2] 97 ldw x, (0x06, sp) 00002A 89 [ 2] 98 pushw x 00002B 5F [ 1] 99 clrw x 00002C 89 [ 2] 100 pushw x 00002D 4Br00 [ 1] 101 push #<(_put_char_to_stdout + 0) 00002F 4Bs00 [ 1] 102 push #((_put_char_to_stdout + 0) >> 8) 000031 4Bs00 [ 1] 103 push #((_put_char_to_stdout + 0) >> 16) 000033 8Ds00r00r00 [ 5] 104 callf __print_format 000037 5B 09 [ 2] 105 addw sp, #9 106 ; ../vprintf.c: 56: return i; 107 ; ../vprintf.c: 57: } 000039 87 [ 5] 108 retf 109 .area CODE 110 .area CONST 111 .area INITIALIZER 112 .area CABS (ABS)