Dear Sirs,
We have an interrupt routine that apparently uses dtemp0 and dtemp1. As far as we understand the compiler used storage, these are mem-variables, and not registers.
In the listing below, you can see the
Code:
mov a,reg[dtemp0]
push a
mov a,reg[dtemp1]
push a
Since dtemp0 is 0x00 and dtemp1 is 0x01, this reads PRT0DR and PRT0IE.
At exit (and restore) it WRITES them, and this changes the value, since the read is the input status, and the write influences the pull-up's.
Please fix this urgently and let me know when and where it is available.
The entry of the IRQ looks like:
Code:
21816 6FFA _IsrMouseSPI:
21817 psect vectors
21818 0038 org 0x38
21819 0038 7D 6FFA ljmp _IsrMouseSPI
21820 psect intrtext
21821 6FFA 08 push a
21822 6FFB 10 push x
21823 6FFC 5D 00 mov a,reg[dtemp0]
21824 6FFE 08 push a
21825 6FFF 5D 01 mov a,reg[dtemp1]
21826 7001 08 push a
21827 7002 5D 6C mov a,reg[TMP_DR0]
21828 7004 08 push a
21829 7005 5D 6D mov a,reg[TMP_DR1]
21830 7007 08 push a
21831 7008 5D 6E mov a,reg[TMP_DR2]
21832 700A 08 push a
21833 700B 5D 6F mov a,reg[TMP_DR3]
21834 700D 08 push a
21835 700E 5D D0 mov a,reg[CUR_PP]
21836 7010 08 push a
21837 7011 5D D3 mov a,reg[IDX_PP]
21838 7013 08 push a
21839 7014 5D D4 mov a,reg[MVR_PP]
21840 7016 08 push a
21841 7017 5D D5 mov a,reg[MVW_PP]
21842 7019 08 push a
and the exit
Code:
21922 706D 18 pop a
21923 706E 60 D5 mov reg[MVW_PP],a
21924 7070 18 pop a
21925 7071 60 D4 mov reg[MVR_PP],a
21926 7073 18 pop a
21927 7074 60 D3 mov reg[IDX_PP],a
21928 7076 18 pop a
21929 7077 60 D0 mov reg[CUR_PP],a
21930 7079 18 pop a
21931 707A 60 6F mov reg[TMP_DR3],a
21932 707C 18 pop a
21933 707D 60 6E mov reg[TMP_DR2],a
21934 707F 18 pop a
21935 7080 60 6D mov reg[TMP_DR1],a
21936 7082 18 pop a
21937 7083 60 6C mov reg[TMP_DR0],a
21938 7085 18 pop a
21939 7086 60 01 mov reg[dtemp1],a
21940 7088 18 pop a
21941 7089 60 00 mov reg[dtemp0],a
21942 708B 20 pop x
21943 708C 18 pop a
21944 708D 7E reti
.......
27932 psect bss0,class=RAM,space=1
27933 0000 dtemp0: blk 1
27934 0001 dtemp1: blk 1