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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
| void ht1621_setNum(uchar value, uchar num) {
// Write on LCD the digit VALUE at position NUM
// VALUE should be a digit [0-9] or a bitmask (corresponding to A,b,C,c,...)
if (value<=9) {
romchar=ht1621_charTable[value];
} else {
romchar=value;
}
//ptr=ht1621_data+ht1621_addrNumBC[num];
//*ptr&=~3;
//*ptr|=(romchar&3);
#asm
clr __bp
mov a,ht1621_setNum1; num
add a,OFFSET _ht1621_addrNumBC
call OFFSET _ht1621_addrNumBC-1
add a,OFFSET _ht1621_data
mov __mp0,a
mov a,__iar0
and a,0ch
mov __iar0,a
mov a,_romchar
and a,3
orm a,__iar0
#endasm
_rr(&romchar);
_rr(&romchar);
//ptr=ht1621_data+ht1621_addrNumADG[num];
//*ptr&=~7;
//*ptr|=romchar&7;
#asm
mov a,ht1621_setNum1; num
add a,OFFSET _ht1621_addrNumADG
call OFFSET _ht1621_addrNumADG-1
add a,OFFSET _ht1621_data
mov __mp0,a
mov a,__iar0
and a,8
mov __iar0,a
mov a,_romchar
and a,7
orm a,__iar0
#endasm
_rr(&romchar);
_rr(&romchar);
_rr(&romchar);
//ptr=ht1621_data+ht1621_addrNumEF[num];
//*ptr&=~3;
//*ptr|=(romchar&3);
#asm
mov a,ht1621_setNum1; num
add a,OFFSET _ht1621_addrNumEF
call OFFSET _ht1621_addrNumEF-1
add a,OFFSET _ht1621_data
mov __mp0,a
mov a,__iar0
and a,0ch
mov __iar0,a
mov a,_romchar
and a,3
orm a,__iar0
#endasm
} |