Skip to content

Commit 49f74f2

Browse files
Optimized some routines; cleaned up some code
1 parent bfd59a7 commit 49f74f2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+380
-559
lines changed

CEdev/lib/src/buildall.bat

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ set ASM=%BIN%\ez80asm.exe
1717
set CC=%BIN%\eZ80cc.exe
1818
set LIB=%BIN%\ez80lib.exe
1919

20-
set RTL_C_SRC=atoi.c atol.c atos.c bsearch.c calloc.c maptab.c modf.c qsort.c strtod.c strtol.c strtoul.c ufltinfo.c ufltrnd.c ureverse.c
20+
set RTL_C_SRC=bsearch.c maptab.c modf.c qsort.c strtod.c strtol.c strtoul.c ufltinfo.c ufltrnd.c ureverse.c
2121
set RTL_ST_C_SRC=uitoa.c ultoa.c ustoa.c uuitoa.c uultoa.c uustoa.c vsprintf.c
2222

2323
set RTL_NOKERNEL_C_SRC=free.c malloc.c realloc.c
24-
set RTL_ASM_SRC=abs.asm isalnum.asm isalpha.asm iscntrl.asm isdigit.asm isgraph.asm islower.asm isprint.asm ispunct.asm isspace.asm isupper.asm isxdigit.asm isascii.asm labs.asm sprintf.asm strtok.asm longjmp.asm memchr.asm memcmp.asm memcpy.asm memmove.asm memset.asm sbrk.asm setjmp.asm strcat.asm strchr.asm strcmp.asm strcpy.asm strcspn.asm strlen.asm strncat.asm strncmp.asm strncpy.asm strpbrk.asm strrchr.asm strspn.asm strstr.asm div.asm ldiv.asm tolower.asm toupper.asm strncasecmp.asm srand.asm rand.asm strdup.asm
24+
set RTL_ASM_SRC=atoi.asm atol.asm atos.asm abs.asm calloc.asm isalnum.asm isalpha.asm iscntrl.asm isdigit.asm isgraph.asm islower.asm isprint.asm ispunct.asm isspace.asm isupper.asm isxdigit.asm isascii.asm labs.asm sprintf.asm strtok.asm longjmp.asm memchr.asm memcmp.asm memcpy.asm memmove.asm memset.asm sbrk.asm setjmp.asm strcat.asm strchr.asm strcmp.asm strcpy.asm strcspn.asm strlen.asm strncat.asm strncmp.asm strncpy.asm strpbrk.asm strrchr.asm strspn.asm strstr.asm div.asm ldiv.asm tolower.asm toupper.asm strncasecmp.asm srand.asm rand.asm strdup.asm
2525

2626
set HLP_C_SRC=
27-
set HLP_ASM_SRC=bdivs.asm bdivu.asm bldix.asm bldiy.asm bmuls.asm brems.asm bremu.asm bshl.asm bshrs.asm bshru.asm bstix.asm bstiy.asm case.asm iand.asm idivs.asm idivu.asm ildix.asm ildiy.asm imulu.asm indcall.asm ineg.asm inot.asm ior.asm irems.asm iremu.asm ishl.asm ishrs.asm ishru.asm istix.asm istiy.asm itol.asm ixor.asm ladd.asm land.asm lcmpu.asm ldivs.asm ldivu.asm lldix.asm lldiy.asm lmulu.asm lneg.asm lnot.asm lor.asm lrems.asm lremu.asm lshl.asm lshrs.asm lshru.asm lstix.asm lstiy.asm lsub.asm lxor.asm sand.asm sdivs.asm sdivu.asm sldix.asm sldiy.asm smulu.asm sneg.asm snot.asm sor.asm srems.asm sremu.asm sshl.asm sshrs.asm sshru.asm sstix.asm sstiy.asm stoi.asm stoiu.asm sxor.asm frbmuls.asm frbtof.asm frftob.asm frftoi.asm frftos.asm frftoub.asm frftoui.asm frftous.asm frimuls.asm frimulu.asm fritof.asm frsmuls.asm frsmulu.asm frstof.asm frubtof.asm fruitof.asm frustof.asm frameset0.asm frameset.asm setflag.asm scmpzero.asm icmpzero.asm lcmpzero.asm seqcase.asm seqcaseD.asm case24.asm case24D.asm case16.asm case16D.asm case8.asm case8D.asm
27+
set HLP_ASM_SRC=bdivs.asm bdivu.asm bldix.asm bldiy.asm bmuls.asm brems.asm bremu.asm bshl.asm bshrs.asm bshru.asm bstix.asm bstiy.asm case.asm iand.asm idivs.asm idivu.asm ildix.asm ildiy.asm imulu.asm indcall.asm ineg.asm inot.asm ior.asm irems.asm iremu.asm ishl.asm ishrs.asm ishru.asm istix.asm istiy.asm itol.asm ixor.asm ladd.asm land.asm lcmpu.asm lcmps.asm ldivs.asm ldivu.asm lldix.asm lldiy.asm lmulu.asm lmuls.asm lneg.asm lnot.asm lor.asm lrems.asm lremu.asm lshl.asm lshrs.asm lshru.asm lstix.asm lstiy.asm lsub.asm lxor.asm sand.asm sdivs.asm sdivu.asm sldix.asm sldiy.asm smulu.asm sneg.asm snot.asm sor.asm srems.asm sremu.asm sshl.asm sshrs.asm sshru.asm sstix.asm sstiy.asm stoi.asm stoiu.asm sxor.asm frbmuls.asm frbtof.asm frftob.asm frftoi.asm frftos.asm frftoub.asm frftoui.asm frftous.asm frimuls.asm frimulu.asm fritof.asm frsmuls.asm frsmulu.asm frstof.asm frubtof.asm fruitof.asm frustof.asm frameset0.asm frameset.asm setflag.asm scmpzero.asm icmpzero.asm lcmpzero.asm seqcase.asm seqcaseD.asm case24.asm case24D.asm case16.asm case16D.asm case8.asm case8D.asm
2828

29-
set FP_C_SRC=acos.c asin.c atan.c atan2.c atof.c ceil.c cos.c exp.c fabs.c floor.c fmod.c fpdata.c frexp.c ldexp.c log.c log10.c modf.c pow.c sin.c sinh.c sqrt.c tan.c tanh.c gamma.c finite.c udtoe.c
29+
set FP_C_SRC=acos.c asin.c atan.c atan2.c exp.c floor.c fmod.c fpdata.c frexp.c ldexp.c log.c log10.c modf.c pow.c sin.c sinh.c sqrt.c tan.c tanh.c gamma.c udtoe.c
3030
set FP_ST_C_SRC=udtof.c udtog.c
31-
set FP_ASM_SRC=fpadd.asm fpcmp.asm fpdiv.asm fpftol.asm fpltof.asm fpmul.asm fpneg.asm fppack.asm fpsub.asm fpultof.asm fpupop1.asm fpupop2.asm sqrtf.asm isnan.asm isinf.asm
31+
set FP_ASM_SRC=atof.asm ceil.asm cos.asm fabs.asm finite.asm fpadd.asm fpcmp.asm fpdiv.asm fpftol.asm fpltof.asm fpmul.asm fpneg.asm fppack.asm fpsub.asm fpultof.asm fpupop1.asm fpupop2.asm sqrtf.asm isnan.asm isinf.asm
3232

3333
set DEBUG_C_SRC=
3434
set DEBUG_ASM_SRC=debugger.asm removeallbreakpoints.asm removeallwatchpoints.asm removebreakpoint.asm removewatchpoint.asm setbreakpoint.asm setreadwatchpoint.asm setwritewatchpoint.asm setreadwritewatchpoint.asm setwatchpoint.asm
@@ -39,18 +39,14 @@ set CPU=EZ80F91
3939
set STDINC=%INC%\lib\std
4040
set CEINC=%CEDEV%\include\lib\ce
4141
set ZLGINC=%SRC%\std_include
42-
set CFLG_DBG=-debug -reduceopt
43-
set CFLG_REL=-NOdebug -optsize
42+
set CFLG_REL=-NOdebug -optsize -NOkeeplst -promote -quiet -fplib
4443
set AFLG=-genobj -NOigcase -include:%STDINC% -include:%ZLGINC% -NOlist -NOlistmac -pagelen:56 -pagewidth:100 -quiet -sdiopt -warn -NOzmasm
4544

4645
REM ---make sure dir exists
4746
mkdir %LIBPATH%
4847
mkdir %LIBPATH%\std
4948
mkdir %LIBPATH%\std\ce
5049

51-
echo %SRC%\std\fpdumy.asm
52-
%ASM% -NOlist -quiet -debug -cpu=%CPU% %SRC%\std\fpdumy
53-
5450
REM --- CE Libraries
5551

5652
echo --Building CE Debugger library...

CEdev/lib/src/buildcelib.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if exist %1 del %1
66

77
set ALL_SRC=%C_SRC% %ASM_SRC%
88

9-
for %%i in (%C_SRC%) do %CC% %C_FLG% -NOkeeplst -promote -quiet -fplib -stdinc:"%STDINC%;%ZLGINC%" "%cd%\ce\%%i"
9+
for %%i in (%C_SRC%) do %CC% %C_FLG% -stdinc:"%STDINC%;%ZLGINC%" "%cd%\ce\%%i"
1010

1111
for %%i in (%ASM_SRC%) do %ASM% %ASM_FLG% ce\%%i
1212

CEdev/lib/src/buildstdlib.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if exist %1 del %1
66

77
set ALL_SRC=%C_SRC% %ASM_SRC%
88

9-
for %%i in (%C_SRC%) do %CC% %C_FLG% -NOkeeplst -promote -quiet -fplib -stdinc:"%STDINC%;%ZLGINC%" "%cd%\std\%%i"
9+
for %%i in (%C_SRC%) do %CC% %C_FLG% -stdinc:"%STDINC%;%ZLGINC%" "%cd%\std\%%i"
1010

1111
for %%i in (%ASM_SRC%) do %ASM% %ASM_FLG% std\%%i
1212

CEdev/lib/src/std/atof.asm

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.ref __frameset0
2+
.ref _strtod
3+
.def _atof
4+
.assume adl=1
5+
6+
; double atof(char *str);
7+
8+
_atof:
9+
pop hl
10+
pop bc
11+
push bc
12+
push hl
13+
or a,a
14+
sbc hl,hl
15+
push hl
16+
push bc
17+
call _strtod
18+
pop bc
19+
pop hl
20+
ret

CEdev/lib/src/std/atof.c

Lines changed: 0 additions & 21 deletions
This file was deleted.

CEdev/lib/src/std/atoi.asm

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.ref _strtol
2+
.def _atoi
3+
.assume adl=1
4+
5+
; int atos(char *cp);
6+
7+
_atoi:
8+
pop bc
9+
pop de
10+
push de
11+
push bc
12+
ld bc,10
13+
push bc
14+
ld c,0
15+
push bc
16+
push de
17+
call _strtol
18+
pop de
19+
pop bc
20+
pop bc
21+
ret

CEdev/lib/src/std/atoi.c

Lines changed: 0 additions & 20 deletions
This file was deleted.

CEdev/lib/src/std/atol.asm

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.ref _atoi
2+
.def _atol
3+
.assume adl=1
4+
5+
; long atos(char *cp);
6+
7+
_atol equ _atoi

CEdev/lib/src/std/atol.c

Lines changed: 0 additions & 20 deletions
This file was deleted.

CEdev/lib/src/std/atos.asm

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.ref _atoi
2+
.def _atos
3+
.assume adl=1
4+
5+
; short int atos(char *cp);
6+
7+
_atos equ _atoi

0 commit comments

Comments
 (0)