diff options
Diffstat (limited to 'device/lib/stm8/rand.lst')
| -rw-r--r-- | device/lib/stm8/rand.lst | 156 |
1 files changed, 0 insertions, 156 deletions
diff --git a/device/lib/stm8/rand.lst b/device/lib/stm8/rand.lst deleted file mode 100644 index 391f6f2..0000000 --- a/device/lib/stm8/rand.lst +++ /dev/null @@ -1,156 +0,0 @@ - 1 ;-------------------------------------------------------- - 2 ; File Created by SDCC : free open source ANSI-C Compiler - 3 ; Version 3.9.3 #11345 (Linux) - 4 ;-------------------------------------------------------- - 5 .module rand - 6 .optsdcc -mstm8 - 7 - 8 ;-------------------------------------------------------- - 9 ; Public variables in this module - 10 ;-------------------------------------------------------- - 11 .globl _rand - 12 .globl _srand - 13 ;-------------------------------------------------------- - 14 ; ram data - 15 ;-------------------------------------------------------- - 16 .area DATA - 17 ;-------------------------------------------------------- - 18 ; ram data - 19 ;-------------------------------------------------------- - 20 .area INITIALIZED - 000000 21 _s: - 000000 22 .ds 4 - 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 ; ../rand.c: 40: int rand(void) - 53 ; ----------------------------------------- - 54 ; function rand - 55 ; ----------------------------------------- - 000000 56 _rand: - 000000 52 08 [ 2] 57 sub sp, #8 - 58 ; ../rand.c: 42: register unsigned long t = s; - 000002 CEu00u02 [ 2] 59 ldw x, _s+2 - 000005 1F 03 [ 2] 60 ldw (0x03, sp), x - 000007 CEu00u00 [ 2] 61 ldw x, _s+0 - 00000A 1F 01 [ 2] 62 ldw (0x01, sp), x - 63 ; ../rand.c: 44: t ^= t >> 10; - 00000C 16 02 [ 2] 64 ldw y, (0x02, sp) - 00000E 17 07 [ 2] 65 ldw (0x07, sp), y - 000010 7B 01 [ 1] 66 ld a, (0x01, sp) - 000012 6B 06 [ 1] 67 ld (0x06, sp), a - 000014 0F 05 [ 1] 68 clr (0x05, sp) - 000016 04 06 [ 1] 69 srl (0x06, sp) - 000018 06 07 [ 1] 70 rrc (0x07, sp) - 00001A 06 08 [ 1] 71 rrc (0x08, sp) - 00001C 04 06 [ 1] 72 srl (0x06, sp) - 00001E 06 07 [ 1] 73 rrc (0x07, sp) - 000020 06 08 [ 1] 74 rrc (0x08, sp) - 000022 7B 04 [ 1] 75 ld a, (0x04, sp) - 000024 18 08 [ 1] 76 xor a, (0x08, sp) - 000026 97 [ 1] 77 ld xl, a - 000027 7B 03 [ 1] 78 ld a, (0x03, sp) - 000029 18 07 [ 1] 79 xor a, (0x07, sp) - 00002B 95 [ 1] 80 ld xh, a - 00002C 7B 02 [ 1] 81 ld a, (0x02, sp) - 00002E 18 06 [ 1] 82 xor a, (0x06, sp) - 000030 88 [ 1] 83 push a - 000031 7B 02 [ 1] 84 ld a, (0x02, sp) - 000033 18 06 [ 1] 85 xor a, (0x06, sp) - 000035 90 95 [ 1] 86 ld yh, a - 000037 84 [ 1] 87 pop a - 88 ; ../rand.c: 45: t ^= t << 9; - 000038 1F 06 [ 2] 89 ldw (0x06, sp), x - 00003A 6B 05 [ 1] 90 ld (0x05, sp), a - 00003C 0F 08 [ 1] 91 clr (0x08, sp) - 00003E 08 08 [ 1] 92 sll (0x08, sp) - 000040 09 07 [ 1] 93 rlc (0x07, sp) - 000042 09 06 [ 1] 94 rlc (0x06, sp) - 000044 09 05 [ 1] 95 rlc (0x05, sp) - 000046 18 06 [ 1] 96 xor a, (0x06, sp) - 000048 90 97 [ 1] 97 ld yl, a - 00004A 9F [ 1] 98 ld a, xl - 00004B 18 08 [ 1] 99 xor a, (0x08, sp) - 00004D 02 [ 1] 100 rlwa x - 00004E 18 07 [ 1] 101 xor a, (0x07, sp) - 000050 95 [ 1] 102 ld xh, a - 000051 90 9E [ 1] 103 ld a, yh - 000053 18 05 [ 1] 104 xor a, (0x05, sp) - 000055 90 95 [ 1] 105 ld yh, a - 000057 1F 03 [ 2] 106 ldw (0x03, sp), x - 000059 17 01 [ 2] 107 ldw (0x01, sp), y - 108 ; ../rand.c: 46: t ^= t >> 25; - 00005B 7B 01 [ 1] 109 ld a, (0x01, sp) - 00005D 6B 08 [ 1] 110 ld (0x08, sp), a - 00005F 0F 07 [ 1] 111 clr (0x07, sp) - 000061 0F 06 [ 1] 112 clr (0x06, sp) - 000063 0F 05 [ 1] 113 clr (0x05, sp) - 000065 04 08 [ 1] 114 srl (0x08, sp) - 000067 7B 04 [ 1] 115 ld a, (0x04, sp) - 000069 18 08 [ 1] 116 xor a, (0x08, sp) - 00006B 97 [ 1] 117 ld xl, a - 00006C 7B 03 [ 1] 118 ld a, (0x03, sp) - 00006E 18 07 [ 1] 119 xor a, (0x07, sp) - 000070 95 [ 1] 120 ld xh, a - 000071 7B 02 [ 1] 121 ld a, (0x02, sp) - 000073 18 06 [ 1] 122 xor a, (0x06, sp) - 000075 90 97 [ 1] 123 ld yl, a - 000077 7B 01 [ 1] 124 ld a, (0x01, sp) - 000079 18 05 [ 1] 125 xor a, (0x05, sp) - 00007B 90 95 [ 1] 126 ld yh, a - 127 ; ../rand.c: 48: s = t; - 00007D CFu00u02 [ 2] 128 ldw _s+2, x - 000080 90 CFu00u00 [ 2] 129 ldw _s+0, y - 130 ; ../rand.c: 50: return(t & RAND_MAX); - 000084 58 [ 2] 131 sllw x - 000085 54 [ 2] 132 srlw x - 133 ; ../rand.c: 51: } - 000086 5B 08 [ 2] 134 addw sp, #8 - 000088 81 [ 4] 135 ret - 136 ; ../rand.c: 53: void srand(unsigned int seed) - 137 ; ----------------------------------------- - 138 ; function srand - 139 ; ----------------------------------------- - 000089 140 _srand: - 141 ; ../rand.c: 55: s = seed | 0x80000000; /* s shall not become 0 */ - 000089 16 03 [ 2] 142 ldw y, (0x03, sp) - 00008B 5F [ 1] 143 clrw x - 00008C 58 [ 2] 144 sllw x - 00008D 99 [ 1] 145 scf - 00008E 56 [ 2] 146 rrcw x - 00008F 90 CFu00u02 [ 2] 147 ldw _s+2, y - 000093 CFu00u00 [ 2] 148 ldw _s+0, x - 149 ; ../rand.c: 56: } - 000096 81 [ 4] 150 ret - 151 .area CODE - 152 .area CONST - 153 .area INITIALIZER - 000000 154 __xinit__s: - 000000 80 00 00 01 155 .byte #0x80, #0x00, #0x00, #0x01 ; 2147483649 - 156 .area CABS (ABS) |
