; FSR2 is used as outgoing message buffer pointer (reading),
; ie private to this file
;
-; FSR1 is used as pointer to where to add bytes of message
+; FSR1 is used as pointer to where to add bytes of message; it
+; points to previous byte whose top bit must be set before
+; adding another bit
max_messages equ 4
scand res 1
scane res 1
buf0 res 1
+ message_buffer res max_messages
udata
outgoing_buffer res max_messages+2
- message_buffer res max_messages
code
+
+slave_add_short_message
+; W message unchanged
+ bc_f INTCON*,GIEH fixme check this works
+ bs_f POSTINC1,7
+ mov_wf INDF1
+ bs_f INTCON*,GIEH
+ return
+
+
+init
+ set fsr2
+ set fsr1
+ ram locations see above
+
; 80 40 20 10 08 04 02 01
; 7 6 5 4 3 2 1 0