From: ian Date: Tue, 20 Dec 2005 16:35:58 +0000 (+0000) Subject: check message_buffer overflow; remove a bit of stale morse X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=72b3914bee8a20079b6c0fd951e45be85626104f;p=trains.git check message_buffer overflow; remove a bit of stale morse --- diff --git a/detpic/detect.asm b/detpic/detect.asm index 9b28b16..0849908 100644 --- a/detpic/detect.asm +++ b/detpic/detect.asm @@ -151,8 +151,13 @@ slave_add_short_message bs_f INDF1,7 mov_wf PREINC1 intrh_unmask + + mov_lw message_buffer_end-1 + cmp_fw_ifle FSR1L return + panic morse_DB + ;---------- backgroundloop_again macro backgroundloop_whatever local branchposition diff --git a/detpic/morse.messages b/detpic/morse.messages index 9a23460..c4926f0 100644 --- a/detpic/morse.messages +++ b/detpic/morse.messages @@ -29,19 +29,15 @@ IP INTCON ; Interrupt of priority supposedly disabled # Temporary entries for testing and development TM PIE1,SSPSTAT,SSPCON1,SSPCON2 ; Master got I2C interrupt -TS PIE1,SSPSTAT,SSPCON1,SSPCON2 ; Slave got I2C interrupt TI1 ; for iwj TI2 ; for iwj TI3 ; for iwj TI4 ; for iwj TI5 ; for iwj ZM i2clib:st,:sspstat,:sspcon1,:sspcon2 ; for testing -ZS i2clib:st,:sspstat,:sspcon1,:st_orig ; for testing X test-sofar:ch ; bad character received from host # Unimplemented things -UP -UC UL UM UE @@ -58,10 +54,10 @@ SA i2clib:st ; improper i2cm_read_another SD i2clib:st ; impr. i2cm_read_done/i2cs_read_data # Messages for slave detection/i2c -DW ; slave write (nyi) DQ FSR2L,::outmsg_end ; previous slave read incomplete DR FSR2L,::outmsg_end ; slave read overrun DX ::t ; slave received wrong message byte +DB detect:message_buffer ; slave_add_short_message overrun # Messages for specific peripherals RS FSR0L ; POLARITY message too short