From 42dd6c4ebb16f1ad2f0acf0c831577db7e7c3c5c Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Fri, 22 Jun 2012 01:25:36 +0000 Subject: moved cmd flags to own byte git-svn-id: https://svn.spreadspace.org/mur.sat@549 7de4ea59-55d0-425e-a1af-a3118ea81d4c --- software/idm/idm.asm | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'software/idm/idm.asm') diff --git a/software/idm/idm.asm b/software/idm/idm.asm index 0bd6007..0782613 100644 --- a/software/idm/idm.asm +++ b/software/idm/idm.asm @@ -69,13 +69,16 @@ BUF_ENDL EQU H'00BF' CMD EQU H'0070' TMP EQU H'0071' +CMDS EQU H'007E' FLAGS EQU H'007F' ;; bits +;; CMDS +#define CMD_READ CMDS,0 + ;; FLAGS #define UNDERRUN FLAGS,0 #define OVERRUN FLAGS,1 -#define CMD_READ FLAGS,7 ;; ------------------------------------- ;; Macros @@ -171,7 +174,7 @@ int_spi btfsc STATUS,Z goto int_spi_r ;; other commands - bcf CMD_READ + clrf CMDS retfie int_spi_0 @@ -187,6 +190,7 @@ int_spi_r movf INDFR,w btfss UNDERRUN movwf SSP1BUF + clrf CMDS bsf CMD_READ retfie @@ -221,7 +225,6 @@ buf_init movwf FSRRL bcf OVERRUN bsf UNDERRUN - bcf CMD_READ movf BSR,w clrf BSR @@ -378,16 +381,14 @@ endif bcf FILTER_EN call buf_init - + clrf CMDS clrf TMP bsf INTCON,GIE - + ;; ------------------------------------- ;; MAINLOOP main - btfsc CS - bcf CMD_READ if DEBUG == 1 bcf SPEAKER btfss DBG0 @@ -401,6 +402,13 @@ enable_t1 btfss T1CON,TMR1ON bsf T1CON,TMR1ON endif + btfss CS + goto main + +powerdown: + clrf CMDS + ;; sleep + ;; nop goto main ;; ------------------------------------- -- cgit v1.2.3