summaryrefslogtreecommitdiff
path: root/device/lib/stm8/_strncmp.asm
diff options
context:
space:
mode:
authorXavier ASUS <xavi92psx@gmail.com>2019-10-23 03:38:32 +0200
committerXavier ASUS <xavi92psx@gmail.com>2019-10-23 03:38:32 +0200
commit2cece67cb5af0339e4ab1f18b0bce2f0b4e6ebdd (patch)
treeb2fbf4e99f194213527304c9189abe65c163ac0b /device/lib/stm8/_strncmp.asm
parented26eb00026800d1d2ff6289627216c7d1f0d459 (diff)
downloadsdcc-gas-2cece67cb5af0339e4ab1f18b0bce2f0b4e6ebdd.tar.gz
Removed intermediate files
Diffstat (limited to 'device/lib/stm8/_strncmp.asm')
-rw-r--r--device/lib/stm8/_strncmp.asm104
1 files changed, 0 insertions, 104 deletions
diff --git a/device/lib/stm8/_strncmp.asm b/device/lib/stm8/_strncmp.asm
deleted file mode 100644
index faebada..0000000
--- a/device/lib/stm8/_strncmp.asm
+++ /dev/null
@@ -1,104 +0,0 @@
-;--------------------------------------------------------
-; File Created by SDCC : free open source ANSI-C Compiler
-; Version 3.9.3 #11345 (Linux)
-;--------------------------------------------------------
- .module _strncmp
- .optsdcc -mstm8
-
-;--------------------------------------------------------
-; Public variables in this module
-;--------------------------------------------------------
- .globl _strncmp
-;--------------------------------------------------------
-; ram data
-;--------------------------------------------------------
- .area DATA
-;--------------------------------------------------------
-; ram data
-;--------------------------------------------------------
- .area INITIALIZED
-;--------------------------------------------------------
-; absolute external ram data
-;--------------------------------------------------------
- .area DABS (ABS)
-
-; default segment ordering for linker
- .area HOME
- .area GSINIT
- .area GSFINAL
- .area CONST
- .area INITIALIZER
- .area CODE
-
-;--------------------------------------------------------
-; global & static initialisations
-;--------------------------------------------------------
- .area HOME
- .area GSINIT
- .area GSFINAL
- .area GSINIT
-;--------------------------------------------------------
-; Home
-;--------------------------------------------------------
- .area HOME
- .area HOME
-;--------------------------------------------------------
-; code
-;--------------------------------------------------------
- .area CODE
-; ../_strncmp.c: 31: int strncmp ( const char * first, const char * last, size_t count )
-; -----------------------------------------
-; function strncmp
-; -----------------------------------------
-_strncmp:
- sub sp, #5
-; ../_strncmp.c: 33: if (!count)
-; ../_strncmp.c: 34: return(0);
- ldw x, (0x0c, sp)
-; ../_strncmp.c: 36: while (--count && *first && *first == *last) {
- jreq 00108$
- ldw y, (0x08, sp)
- ldw (0x02, sp), y
- ldw y, (0x0a, sp)
- ldw (0x04, sp), y
- ldw y, (0x0c, sp)
-00105$:
- decw y
- ldw x, (0x02, sp)
- ld a, (x)
- ldw x, (0x04, sp)
- push a
- ld a, (x)
- ld (0x02, sp), a
- pop a
- tnzw y
- jreq 00107$
- tnz a
- jreq 00107$
- cp a, (0x01, sp)
- jrne 00107$
-; ../_strncmp.c: 37: first++;
- ldw x, (0x02, sp)
- incw x
- ldw (0x02, sp), x
-; ../_strncmp.c: 38: last++;
- ldw x, (0x04, sp)
- incw x
- ldw (0x04, sp), x
- jra 00105$
-00107$:
-; ../_strncmp.c: 41: return( *first - *last );
- clrw x
- ld xl, a
- ld a, (0x01, sp)
- ld (0x05, sp), a
- clr (0x04, sp)
- subw x, (0x04, sp)
-00108$:
-; ../_strncmp.c: 42: }
- addw sp, #5
- ret
- .area CODE
- .area CONST
- .area INITIALIZER
- .area CABS (ABS)