This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Small assembly program

I would like to use UV2 to Debug the following assembly language program on a Phytec C508 target board using the Keil Monitor-51 driver.

org 0000h
main: mov R0, #00h
mov p1, #0ffh
mov p2, #0ffh
end

However, when I Debug and single step into the program the code is not executed. When I Run, the code is not executed.

Are there settings in UV2 that need to be set?

Is there a minimum amount of additional code that needs to be added to test this simple assembly program?

Thanks

Parents
  • You don't have any thing hooked up to the external data bus do you? Like a PROM or SRAM? Port 2 is used for addressing so this may be a problem.

    However, now that I think about it, I seem to remember that Port 2 will take on the 0xFF value in between external data bus transactions so this code should be fine. The move to R0 is useless of course.

    Are you sure your code is assembling correctly? If there is a monitor then you are probably not able to org to 0x0000 since the monitor needs to be there. How about calling an assembler routing from C's main() function?

    - Mark

Reply
  • You don't have any thing hooked up to the external data bus do you? Like a PROM or SRAM? Port 2 is used for addressing so this may be a problem.

    However, now that I think about it, I seem to remember that Port 2 will take on the 0xFF value in between external data bus transactions so this code should be fine. The move to R0 is useless of course.

    Are you sure your code is assembling correctly? If there is a monitor then you are probably not able to org to 0x0000 since the monitor needs to be there. How about calling an assembler routing from C's main() function?

    - Mark

Children