??? 06/26/05 06:09 Read: times |
#95940 - Problem lies with SDCC and PSW handling. Responding to: ???'s previous message |
Hello Adam,
Your program doesn't work because SDCC wipes out the PSW register which removes your flag to indicate the up/down delay. Choose a different memory bit for your flag and the program will work OK. _Timer0: ar2 = 0x02 ar3 = 0x03 ar4 = 0x04 ar5 = 0x05 ar6 = 0x06 ar7 = 0x07 ar0 = 0x00 ar1 = 0x01 push acc push b push dpl push dph push psw mov psw,#0x00 <=== SDCC destroys your flag info here Regards, Charles Bannister |