From 0283d5e3da503b4500de4bc074ddbff56365612a Mon Sep 17 00:00:00 2001 From: Christophe Parent Date: Mon, 8 Jul 2024 17:54:59 -0700 Subject: [PATCH] Optimize CMP instruction using a constant --- src/main.asm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main.asm b/src/main.asm index 6a6ba4f..7762c74 100644 --- a/src/main.asm +++ b/src/main.asm @@ -639,8 +639,7 @@ Down_Dir = %00000100 Left_Dir = %00000010 Right_Dir = %00000001 -TitleScreenModeValue = 0 -GameModeValue = 1 +GameModeValue = 1 ; TitleScreenModeValue = 0 is not needed VictoryModeValue = 2 GameOverModeValue = 3 @@ -2700,8 +2699,7 @@ ExitOutputN: DigitsMathRoutine: lda OperMode ; check mode of operation - cmp #TitleScreenModeValue - beq EraseDMods ; if in title screen mode, branch to lock score + beq EraseDMods ; if in title screen mode, branch to lock score (cmp optimization) ldx #$05 AddModLoop: lda DigitModifier,x ; load digit amount to increment