Start address at 4203?

Asked by BlackCow

Consider this simple program,

jmp start
data: db 2ah
start: lxi h, data
hlt

This loads the HL register with the address location of the data (2a).

The address is at 4203. Perhaps I'm not understanding something here but I was expecting it to start at 0001h, with the jmp command stored at 0000h. Why does it start at 4203 (which I believe is really 342h because its stored in reverse correct?).

Question information

Language:
English Edit question
Status:
Solved
For:
gnusim8085 Edit question
Assignee:
No assignee Edit question
Solved by:
aniceberg
Solved:
Last query:
Last reply:
Revision history for this message
Best aniceberg (aniceberg) said :
#1

Hi there,

If you have not specified anything at the space labelled "Load me at", the program will be loaded at 4200H by default.
If this is clear... the "jmp start" is a 3-byte instruction and hence the "lxi h, data" instruction is found at 4203H.

To have the program at 0000H (which would lead the "lxi h, data" to be placed at 0003H), specify the "Load me at" as "0000" (quotes for clarity).

HTH

Revision history for this message
BlackCow (blackcow99) said :
#2

It's funny, I never saw "Load me at" right in front of my face until you mentioned it. Thank you!

One more question, when I build the real thing and first apply power to the 8085, will it start at address 0x0000? That's where I plan to place the ROM.

Revision history for this message
aniceberg (aniceberg) said :
#3

I will consider a system compatible with an Intel Processor (Eg: IA32 or Intel-64). On reset, the CS register contents are set to a specific value, from which the execution kicks off. This I guess is 0xFFFFFFFF0. This in a computer, with a compatible mother board be the ROM which will "ignite" the boot process by jumping to the BIOS entry point.

With this, I would lead you to http://duartes.org/gustavo/blog/post/motherboard-chipsets-memory-map and its subsequent posts. Its a nice read.

Revision history for this message
BlackCow (blackcow99) said :
#4

Thanks aniceberg, that solved my question.