Skip to content

Commit bfd59a7

Browse files
Optimized and cleaned up some routines
1 parent aa57f72 commit bfd59a7

Some content is hidden

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

123 files changed

+559
-1154
lines changed

CEdev/lib/src/buildall.bat

Lines changed: 5 additions & 5 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 labs.c maptab.c modf.c qsort.c rand.c sabs.c srand.c strtod.c strtol.c strtoul.c ufltinfo.c ufltrnd.c ureverse.c strdup.c
21-
set RTL_ST_C_SRC=uitoa.c ultoa.c ustoa.c uuitoa.c uultoa.c uustoa.c vprintf.c vsprintf.c
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
21+
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 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
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
2525

2626
set HLP_C_SRC=
2727
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
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 isnan.c isinf.c finite.c udtoe.c
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
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
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
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

CEdev/lib/src/libraries/graphics_src/graphx/v2/graphics_lib.asm

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3438,22 +3438,22 @@ _FlipSpriteY:
34383438
ld (ix+1),a
34393439
ld (ix+0),c
34403440
lea de,ix+2
3441-
push ix
3442-
ld iyl,a
3441+
ex (sp),ix
34433442
_FlipHorizWidth_SMC =$+1
34443443
_: ld b,0
3445-
_: ld a,(hl)
3444+
ld c,a
3445+
_: dec hl
3446+
ld a,(hl)
34463447
ld (de),a
3447-
dec hl
34483448
inc de
34493449
djnz -_
3450+
ld a,c
34503451
_FlipHorizDelta_SMC =$+1
34513452
ld bc,0
34523453
add hl,bc
3453-
dec iyl
3454+
dec a
34543455
jr nz,--_
34553456
pop hl
3456-
pop ix
34573457
ret
34583458

34593459
;-------------------------------------------------------------------------------

CEdev/lib/src/std/fpcmp.asm

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@
2121
; OUTPUTS: FLAGS based on Op1 - Op2
2222
;
2323
;--------------------------------------------------------------
24-
segment CODE
24+
.def __fcmp
2525
.assume adl=1
26-
.def __fcmp
27-
.ref __lcmps
2826

2927
__fcmp equ 000274h
30-

CEdev/lib/src/std/frameset.asm

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1-
; Copyright 1992-2008 Zilog, Inc.
21
.assume adl=1
32
.def __frameset
43
5-
__frameset equ 00012Ch
4+
__frameset:
5+
pop de
6+
push ix
7+
ld ix,0
8+
add ix,sp
9+
add hl,sp
10+
ld sp,hl
11+
ex de,hl
12+
jp (hl)

CEdev/lib/src/std/frameset0.asm

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
; Copyright 1992-2008 Zilog, Inc.
21
.assume adl=1
32
.def __frameset0
43
5-
__frameset0 equ 000130h
4+
__frameset0:
5+
pop hl
6+
push ix
7+
ld ix,0
8+
add ix,sp
9+
jp (hl)

CEdev/lib/src/std/icmpzero.asm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
; Registers Used:
1111
; None
1212
;-------------------------------------------------------------------------
13-
1413
.def __icmpzero
1514
.assume adl=1
1615

17-
__icmpzero equ 000138h
16+
__icmpzero equ 000138h

CEdev/lib/src/std/idivs.asm

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
; Registers Used:
1515
; a, de
1616
;-------------------------------------------------------------------------
17+
.def __idivs
1718
.assume adl=1
18-
.def __idivs
19-
.ref __idivu
2019

21-
__idivs equ 00013Ch
20+
__idivs equ 00013Ch

CEdev/lib/src/std/idivu.asm

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,8 @@
1414
; Registers Used:
1515
; none
1616
;-------------------------------------------------------------------------
17+
.def __idivu,__idvrmu
1718
.assume adl=1
18-
.def __idivu,__idvrmu
19-
20-
__idivu equ 000140h
21-
22-
; Input:
23-
; uHL = dividend
24-
; uBC = divisor
25-
; Output:
26-
; uDE = quotient
27-
; uHL = remainder
28-
; Uses:
29-
; AF, BC
30-
__idvrmu equ 000144h
3119

20+
__idivu equ 000140h
21+
__idvrmu equ 000144h

CEdev/lib/src/std/ildix.asm

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
; Registers Used:
1212
;
1313
;-------------------------------------------------------------------------
14+
.def __ildix
1415
.assume adl=1
15-
.def __ildix
1616
17-
__ildix equ 000148h
18-
17+
__ildix equ 000148h

CEdev/lib/src/std/ildiy.asm

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
; Registers Used:
1212
;
1313
;-------------------------------------------------------------------------
14+
.def __ildiy
1415
.assume adl=1
15-
.def __ildiy
16-
17-
__ildiy equ 00014Ch
1816

17+
__ildiy equ 00014Ch

0 commit comments

Comments
 (0)