Skip to content

Commit ba21115

Browse files
Remove prgm_CleanUp
1 parent 1d665cd commit ba21115

File tree

4 files changed

+27
-30
lines changed

4 files changed

+27
-30
lines changed

src/asm/cstartup.asm

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,22 @@ __errsp:
6363
pop af
6464
pop hl
6565
ld (hl),a ; restore flash wait states
66-
pop iy ; restore iy for OS
6766
push de
6867
call 0004F0h ; usb_ResetTimers
68+
69+
ifdef PRGM_CLEANUP
70+
ld iy,%D00080
71+
res 4,(iy+9) ; onInterrupt,(iy+onFlags)
72+
call %0020E5C ; _DelRes
73+
call %0020818 ; _ClrTxtShd
74+
call %0020814 ; _ClrScrn
75+
call %0020828 ; _HomeUp
76+
set 0,(iy+3) ; graphDraw,(iy+graphFlags)
77+
call %0021A3C ; _DrawStatusBar
78+
endif
79+
6980
pop hl ; program return value in hl
81+
pop iy ; restore previous iy
7082
ret
7183
_exit:
7284
pop de
@@ -80,3 +92,4 @@ _exit:
8092

8193
endif
8294
end
95+

src/ce/prgmcleanup.src

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

src/ce/tice.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,6 @@ typedef struct { uint16_t size; uint8_t data[1]; } var_t;
186186
*/
187187
#define matrix_element(matrix, row, col) ((matrix)->items[(row)+(col)*(matrix)->rows])
188188

189-
/**
190-
* Cleans up everything and gets ready to enter back to the OS when you are ready to exit your program
191-
*/
192-
void prgm_CleanUp(void);
193-
194189
/**
195190
* A faster implementation of memset
196191
*
@@ -1892,6 +1887,8 @@ typedef enum {
18921887
#define sk_Power 0x0E
18931888

18941889
/* Compatibility defines */
1895-
#define pgrm_CleanUp prgm_CleanUp
1890+
#define prgm_CleanUp()
1891+
#define pgrm_CleanUp()
18961892

18971893
#endif
1894+

src/example_makefile

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
# Makefile
33
# Startup modules and LibLoad library setup
44
#----------------------------
5-
CSTARTUP_ASM := cstartup.asm
6-
LIBHEADER_ASM := libheader.asm
5+
CSTARTUP_ASM ?= cstartup.asm
6+
LIBHEADER_ASM ?= libheader.asm
7+
CLEANUP ?= YES
78
#----------------------------
89

9-
VERSION := 7.0
10+
VERSION := 7.2
1011

1112
#----------------------------
1213
# Try not to edit anything below these lines unless you know what you are doing
@@ -85,6 +86,9 @@ endif
8586
ifeq ($(COMPRESSED),YES)
8687
CVFLAGS += -x
8788
endif
89+
ifeq ($(CLEANUP),YES)
90+
PRGM_CLEANUP := 1
91+
endif
8892

8993
#Find all of the available C and ASM files (Remember, you can create C <-> assembly routines easily this way)
9094
SOURCES := $(call NATIVEPATH,$(foreach dir,$(ALLDIRS),$(wildcard $(dir)*.c)))
@@ -135,7 +139,7 @@ endif
135139

136140
#Define the assembler flags used by the Zilog assembler
137141
ASM_FLAGS := \
138-
-define:_EZ80 -define:$(DEBUGMODE) -define:$(ICONC) -NOlist -NOlistmac \
142+
-define:_EZ80 -define:$(DEBUGMODE) -define:$(PRGM_CLEANUP) -define:$(ICONC) -NOlist -NOlistmac \
139143
-pagelen:250 -pagewidth:130 -quiet -sdiopt -warn -NOdebug -NOigcase -cpu:EZ80F91
140144

141145
#Define the C flags used by the Zilog compiler
@@ -235,8 +239,8 @@ all: add_dirs $(BINDIR)/$(TARGET8XP)
235239
@echo Finished.
236240

237241
add_dirs:
238-
$(WINCHKBINDIR) $(MKDIR) $(BINDIR)
239-
$(WINCHKOBJDIR) $(MKDIR) $(OBJDIR)
242+
@$(WINCHKBINDIR) $(MKDIR) $(BINDIR)
243+
@$(WINCHKOBJDIR) $(MKDIR) $(OBJDIR)
240244
@echo C CE SDK Version $(VERSION)
241245
@echo Looking for changes...
242246

0 commit comments

Comments
 (0)