annotate src/isr.inc @ 250:20e3bad0b0f2

Graphical compass from kovacs
author heinrichsweikamp
date Wed, 18 Mar 2015 16:42:49 +0100
parents 11d4fc797f74
children ca4556fb60b9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
heinrichsweikamp
parents:
diff changeset
1 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
2 ;
heinrichsweikamp
parents:
diff changeset
3 ; File isr.inc
heinrichsweikamp
parents:
diff changeset
4 ;
heinrichsweikamp
parents:
diff changeset
5 ;
heinrichsweikamp
parents:
diff changeset
6 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved.
heinrichsweikamp
parents:
diff changeset
7 ;=============================================================================
heinrichsweikamp
parents:
diff changeset
8 ; HISTORY
heinrichsweikamp
parents:
diff changeset
9 ; 2011-08-06 : [mH] moving from OSTC code
heinrichsweikamp
parents:
diff changeset
10
heinrichsweikamp
parents:
diff changeset
11 SAFE_2BYTE_COPY MACRO from, to
heinrichsweikamp
parents:
diff changeset
12 local retry
heinrichsweikamp
parents:
diff changeset
13 retry:
heinrichsweikamp
parents:
diff changeset
14 movff from+1,WREG ; High byte in W.
heinrichsweikamp
parents:
diff changeset
15 movff WREG,to+1 ; and destination.
heinrichsweikamp
parents:
diff changeset
16 movff from+0,to+0 ; Copy low byte.
heinrichsweikamp
parents:
diff changeset
17 movff from+1,TABLAT ; another bank-safe read.
heinrichsweikamp
parents:
diff changeset
18 xorwf TABLAT,W ; High byte changed ?
heinrichsweikamp
parents:
diff changeset
19 bnz retry
heinrichsweikamp
parents:
diff changeset
20 ENDM