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

challenging Questions...

here are few questions which are troubling me.. kindly help...

1) Why should we always start 8051 program with the following piece of code?
(starting code)
org 0h
ljmp 8000h
org 8000h

2) since the address location 0000h is eprom.. we cant save data on that address.. then where is the starting code(above said code) saved??

3)what happens if we remove starting code and end statement in the end of program??

4) why only direct addressing is alllowed for push and pop instruction....

waiting for answers....

Parents

  • "2) since the address location 0000h is eprom."

    Says who? Somebody just made that up. 0000h is an equally valid external RAM memory address

    To clarify: there is more than one address 0 in the 8051 architecture. It is a "Harvard" architecture, so it has separate code and data address spaces. The CPU core always begins execution at code address 0. External memory address 0 may well be RAM, and is not necessarily the same physical location as code address 0. There's also internal data address 0, which is still another byte of memory.

    Many 8051 designs have hardware to decode the code address space into some location in external data address space, so that the code memory can be written to. This is often useful for field-upgradable systems. This layout with shared code and data memory is often called a "von Neumann" architecture. Even with this layout, though, it is not necessarily the case that code address 0 is the same physical location as external data address 0. The designer might choose to locate the start of the program memory at a high location in external data space.

Reply

  • "2) since the address location 0000h is eprom."

    Says who? Somebody just made that up. 0000h is an equally valid external RAM memory address

    To clarify: there is more than one address 0 in the 8051 architecture. It is a "Harvard" architecture, so it has separate code and data address spaces. The CPU core always begins execution at code address 0. External memory address 0 may well be RAM, and is not necessarily the same physical location as code address 0. There's also internal data address 0, which is still another byte of memory.

    Many 8051 designs have hardware to decode the code address space into some location in external data address space, so that the code memory can be written to. This is often useful for field-upgradable systems. This layout with shared code and data memory is often called a "von Neumann" architecture. Even with this layout, though, it is not necessarily the case that code address 0 is the same physical location as external data address 0. The designer might choose to locate the start of the program memory at a high location in external data space.

Children
No data