chiark / gitweb /
some notes about surrounding things
authorian <ian>
Mon, 28 Nov 2005 04:05:42 +0000 (04:05 +0000)
committerian <ian>
Mon, 28 Nov 2005 04:05:42 +0000 (04:05 +0000)
detpic/detect.asm

index 31698edda38c0bab8088b699a0d591e5ce2a5644..f4c4ddc73d99fa38582432c547033a2c3a2207e3 100644 (file)
@@ -3,7 +3,9 @@
 ; 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
 
@@ -14,12 +16,27 @@ 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