chiark / gitweb /
check message_buffer overflow; remove a bit of stale morse
authorian <ian>
Tue, 20 Dec 2005 16:35:58 +0000 (16:35 +0000)
committerian <ian>
Tue, 20 Dec 2005 16:35:58 +0000 (16:35 +0000)
detpic/detect.asm
detpic/morse.messages

index 9b28b1641e73d1a4f27c7124cbc4ab09fb8b81f4..0849908342e1692cc4eab2876cc47f3293f89347 100644 (file)
@@ -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
index 9a23460a3944ec8172e3ece1e904933ec8e9a5a7..c4926f0f933c55beac6ce46955f1ad6387a060fd 100644 (file)
@@ -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