hi guys ,i am a newbie in asm language. I recently wrote a asm coding to run my 2 small dc motors through using PWM connected to my motor driver h bridge . But i had encountered some bugs when i run the program. The motor started to run before i press any button to start the motor and the buttons do not seems to respond well as at times they will only stop after a few presses , if not will keep running until i press the button again.I am trying it out on MPLAB ICD2. if some one know about this please let me know the reason. A million thanks .

If I understand right, your code acts on button-down, then continues on the next button-up. The unresponsive button would probably be improved by debouncing. I recently came across a good explanation and examples while working through the Pickit 2 User Guide and Lessons, found on Microchip's web site ( http://microchip.com/pickit2 ). That code would need to be converted to the 18F452 of course.