-
Notifications
You must be signed in to change notification settings - Fork 0
/
temp.asm
38 lines (22 loc) · 1018 Bytes
/
temp.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
bsf STATUS,RP0 ; bank 1
movwf LCDScratch0 ; store character
movf LCDBufferPtr,W
movwf FSR ; point to next buffer position
movf LCDScratch0,W ; retrieve character
movwf INDF ; store character in buffer
incf LCDBufferCnt,F ; count characters placed in the buffer
incf LCDBufferPtr,F ; point to next buffer position
bcf STATUS,RP0 ; bank 0
;wip mks - next is temporary, forces each character to print immediately, waiting until it is printed
; prepare the interrupt routine for printing
bsf STATUS,RP0 ; bank 1
movlw LCDBuffer0
movwf LCDBufferPtr
bsf LCDFlags,startBit
bsf LCDFlags,LCDBusy ; set this bit last to make sure everything set up before interrupt
loopWBL1: ; loop until interrupt routine finished writing character
btfsc LCDFlags,LCDBusy
goto loopWBL1
bcf STATUS,RP0 ; bank 0
;end of wip
return