Skip to content

Commit

Permalink
Skip save on enter keypress
Browse files Browse the repository at this point in the history
  • Loading branch information
mateoconlechuga committed Dec 13, 2017
1 parent 1de7671 commit f4a3c26
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/include/defines.inc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#define isDisabled 04h
#define isNLDisabled 05h
#define isOnAppsScreen 06h
#define bootEnter 07h
#define cesiumFlags 21h

firstprog equ 0 ;flag in asm_Flag1
Expand Down
5 changes: 4 additions & 1 deletion src/routines/loader.asm
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
.assume adl = 1

CesiumLoader:
bit bootEnter,(iy+cesiumFlags)
jr nz,SkipSave
ld a,(AutoBackup)
or a,a
call nz,SaveRAMState ; Save ram state if option is set

SkipSave:
ld hl,HOMEHOOK_START
ld bc,HOMEHOOK_END-HOMEHOOK_START
ld de,HomeHookAddr
Expand Down
5 changes: 4 additions & 1 deletion src/routines/main.asm
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ _: ld hl,(numprograms)
sbc hl,de
jp z,GetKeysNoPrgms
GetKeys:
res bootEnter,(iy+cesiumFlags)
call DrawTime
call FullBufCpy
call _GetCSC
Expand All @@ -138,7 +139,7 @@ GetKeys:
cp a,sk2nd
jr z,BootPrgm
cp a,skEnter
jr z,BootPrgm
jr z,BootPrgmEnter
bit isOnAppsScreen,(iy+cesiumFlags)
jr nz,GetKeys
cp a,skGraph
Expand All @@ -150,6 +151,8 @@ GetKeys:
cp a,skMath-skAdd+1
jp nc,GetKeys
jp SearchAlpha
BootPrgmEnter:
set bootEnter,(iy+cesiumFlags)
BootPrgm:
ld a,(listApps)
or a,a
Expand Down

0 comments on commit f4a3c26

Please sign in to comment.