Skip to content

Commit 0afad4f

Browse files
Added os_ClrHome
1 parent e4bbb04 commit 0afad4f

File tree

4 files changed

+31
-11
lines changed

4 files changed

+31
-11
lines changed

src/asm/cstartup.asm

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,9 @@ __errsp:
6969
ifdef PRGM_CLEANUP
7070
ld iy,%D00080
7171
res 4,(iy+9) ; onInterrupt,(iy+onFlags)
72-
call %0020E5C ; _DelRes
73-
call %0020818 ; _ClrTxtShd
74-
call %0020814 ; _ClrScrn
75-
call %0020828 ; _HomeUp
7672
set 0,(iy+3) ; graphDraw,(iy+graphFlags)
73+
call %002080C ; _ClrLCD
74+
call %0020828 ; _HomeUp
7775
call %0021A3C ; _DrawStatusBar
7876
endif
7977

src/ce/tice.h

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,11 @@ 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+
* Resets the OS homescreen
191+
*/
192+
#define os_ClrHome() do { _OS(asm_ClrLCD); _OS(asm_HomeUp); _OS(asm_DrawStatusBar); } while (0)
193+
189194
/**
190195
* A faster implementation of memset
191196
*
@@ -737,13 +742,24 @@ void asm_DisableAPD(void);
737742
void asm_EnableAPD(void);
738743

739744
/**
740-
* Assembly routine check the amount of free archive
745+
* Assembly routine checks the amount of free archive
741746
*/
742747
void asm_ArcChk(void);
743748

749+
/**
750+
* Assembly routine to clear the homescreen lcd.
751+
* Accounts for split screen
752+
*/
753+
void asm_ClrLCD(void);
754+
755+
/**
756+
* Assembly routine to redraw the status bar
757+
*/
758+
void asm_DrawStatusBar(void);
759+
744760
/**
745761
* Colors used by the OS
746-
*/
762+
*/
747763
typedef enum {
748764
OS_COLOR_BLUE = 10,
749765
OS_COLOR_RED,
@@ -773,7 +789,7 @@ typedef enum {
773789
#define os_KbdPSC (*(uint8_t*)0xD00589)
774790
#define os_KbdWUR (*(uint8_t*)0xD0058A)
775791
#define os_KbdDebncCnt (*(uint8_t*)0xD0058B)
776-
#define os_KbdKey (*(uint8_t*)0xD0058C)
792+
#define os_KbdKey (*(uint8_t*)0xD0058C)
777793
#define os_KbdGetKy (*(uint8_t*)0xD0058D)
778794
#define os_KeyExtend (*(uint8_t*)0xD0058E)
779795
#define os_Brightness (*(uint8_t*)0xD0058F)
@@ -948,7 +964,7 @@ typedef enum {
948964
#define os_SilentLinkHookPtr (*(uint24_t*)0xD02614)
949965
#define os_ActiveUSBHookPtr (*(uint24_t*)0xD0261A)
950966

951-
#define os_TempFreeArc (*(uint24_t*)0xD02655) /* Set after asm_ArcChk call */
967+
#define os_TempFreeArc (*(uint24_t*)0xD02655) /**< Set after asm_ArcChk call */
952968

953969
#define os_TextBGcolor (*(uint16_t*)0xD02688)
954970
#define os_TextFGcolor (*(uint16_t*)0xD0268A)
@@ -971,8 +987,9 @@ typedef enum {
971987
#define os_TmpMinutes (*(real_t*)0xD02B25)
972988

973989
/*
974-
* ---- TI-OS Token definitions ----
990+
* TI-OS Token definitions
975991
*/
992+
976993
#define tToDMS 0x01
977994
#define tToDEC 0x02
978995
#define tToAbc 0x03

src/ce/tice.src

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,16 @@
101101
.def _os_RealToFloat
102102
.def _os_FontDrawTransText
103103
.def _os_CreateAppVar
104+
104105
.def _asm_MoveDown
105106
.def _asm_MoveUp
107+
.def _asm_ClrLCD
106108
.def _asm_HomeUp
107109
.def _asm_RunIndicOn
108110
.def _asm_RunIndicOff
109111
.def _asm_DisableAPD
110112
.def _asm_EnableAPD
113+
.def _asm_DrawStatusBar
111114
.def _asm_ArcChk
112115
; --------------------------------------------
113116

@@ -216,11 +219,13 @@ _os_CreateAppVar equ 022184h
216219

217220
_asm_MoveDown equ 0207F4h
218221
_asm_MoveUp equ 020800h
222+
_asm_ClrLCD equ 02080Ch
219223
_asm_HomeUp equ 020828h
220224
_asm_RunIndicOn equ 020844h
221225
_asm_RunIndicOff equ 020848h
222226
_asm_DisableAPD equ 021134h
223227
_asm_EnableAPD equ 021138h
228+
_asm_DrawStatusBar equ 021A3Ch
224229
_asm_ArcChk equ 022040h
225230
; --------------------------------------------
226231

src/example_makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ ifeq ($(COMPRESSED),YES)
8787
CVFLAGS += -x
8888
endif
8989
ifeq ($(CLEANUP),YES)
90-
PRGM_CLEANUP := 1
90+
SET_CLEANUP := PRGM_CLEANUP
9191
endif
9292

9393
#Find all of the available C and ASM files (Remember, you can create C <-> assembly routines easily this way)
@@ -139,7 +139,7 @@ endif
139139

140140
#Define the assembler flags used by the Zilog assembler
141141
ASM_FLAGS := \
142-
-define:_EZ80 -define:$(DEBUGMODE) -define:$(PRGM_CLEANUP) -define:$(ICONC) -NOlist -NOlistmac \
142+
-define:_EZ80 -define:$(DEBUGMODE) -define:$(SET_CLEANUP) -define:$(ICONC) -NOlist -NOlistmac \
143143
-pagelen:250 -pagewidth:130 -quiet -sdiopt -warn -NOdebug -NOigcase -cpu:EZ80F91
144144

145145
#Define the C flags used by the Zilog compiler

0 commit comments

Comments
 (0)