I have just started to read about intel 8086 and have a question concerning its memory.
I read that the address bus is 20-bit wide, which means the address space is 1MB, and this space is divided into segments.
the question is:
the four segment registers,
CS
,DS
,SS
andES
, are they read only or I can set their values, and which are their default values?I saw the following assembly tutorial:
ORG 100h MOV AX, 0B800h ; set AX = B800h (VGA memory). MOV DS, AX ; copy value of AX to DS. MOV CL, 'A' ; CL = 41h (ASCII code). MOV CH, 01011111b ; CL = color attribute. MOV BX, 15Eh ; BX = position on screen. MOV [BX], CX ; w.[0B800h:015Eh] = CX. RET
Concerning the first line, does that mean this code will exist in address 0x100
in code segment space or in the whole address space
and the line:
MOV [BX], CX
Does that mean every time I reference an address in the MOV
instruction, the address should be estimated from the start address of the data segment? (as he wrote that the destination is the value + the value in the data segment reg)