chiark / gitweb /
i2c-test formatting to match corrected tblrd_test
authorceb <ceb>
Mon, 7 Feb 2005 00:04:54 +0000 (00:04 +0000)
committerceb <ceb>
Mon, 7 Feb 2005 00:04:54 +0000 (00:04 +0000)
cebpic/i2c-test.asm

index 28df43be7a9de4ee1608f95df993bcb7879907c4..1b7f7cec7c63a20a484686b3508d95b6d352ea65 100644 (file)
@@ -139,12 +139,14 @@ initialise
        tblrd   *+              ; read then increment pointer 
                                ; (now points to i2c control byte)
 
-       movlb   I2C_BUFF_PAGE   ; ser BSR=i2c BSR (4)
-       movff   TABLAT, PIC_NO  ; move pic number into normal memory
+        movlb   I2C_BUFF_PAGE   ; ser BSR=i2c BSR (4)
+        movf    TABLAT,0,0      ; move pic number into normal memory
+        movwf   PIC_NO,1
 
-       tblrd   *               ; read i2c 
+        tblrd   *               ; read i2c
 
-       movff   TABLAT, I2C_CTRL        ; move i2c_ctrl byte into normal memory
+        movf    TABLAT,0,0      ; move i2c_ctrl byte into normal memory
+        movwf   I2C_CTRL,1
 
 ; now have: PIC number in 400h, i2c control byte in 401h