Help: Assembly Language Segment Address Offset Address Physical address problem

Updated on technology 2024-07-24
9 answers
  1. Anonymous users2024-02-13

    We often have the experience of taking an address to find a room, such as 302, then, we know that this room is on the third floor, the second room from the east, and this address is actually composed of two addresses.

    Bringing this example to this problem, you can think of it this way: the segment address is equivalent to the floor address, the offset address is equivalent to the room number, and finally the physical address is synthesized.

    8086 address line 20, data line 16, the number of bits of the physical address depends on the number of 8086 address lines, 16 bits of data line determines that the register of 8086 can only have 16 bits, so that both the segment register and the general register are 16 bits, so the segment address and offset are also 16 bits. When you want to synthesize a 20-bit physical address, first shift the segment address 4 bits to the left (which is the reason for *16) to become a 20-bit one, and then add a 16-bit offset address to get the last 20-bit physical address.

  2. Anonymous users2024-02-12

    In this way, a 20-bit physical address in memory is composed of a segment address (16 bits) and an intra-segment offset address (16 bits), and the method of synthesizing the physical address is to shift the 16-bit value of the segment address 4 bits to the left (equivalent to multiplying the decimal number 16).

  3. Anonymous users2024-02-11

    Because the words of the machine are 16 bits, you can't make other ones, you can only convert them.

    Therefore, you can only use to shift the segment address 4 bits to the left, plus the offset address. That's it, like the one upstairs said. The example is good.

  4. Anonymous users2024-02-10

    A real physical address is derived from a segment address + offset address.

    This is because the address bus is only 16 bits, but the physical address is 20 bits.

    Therefore, a segment (the segment address does not change, the offset address changes) can represent 64kb (the offset address changes from 0 to ffff), and the segment address changes when the segment address changes.

    So how is the physical address calculated?

    That is, the segment address is shifted 4 bits to the left (that is, multiplied by 2 4 times), and the empty 0 becomes 20 bits, plus the offset address is the physical address.

    For example, an address is 00100h (a 16-bit is 4 binary bits, and 5 is 20 bits).

    Besides, a 1 decimal left shift is 4 bits left shift in 2 (algebra try it yourself).

    You can express it as (16 bits), 0010:0000(0010*16+0000=00100).

    0000:0100 (0000*16+0100=00100), the result is not unique.

  5. Anonymous users2024-02-09

    The book says that with the 8086 processor, the offset address is represented by 16 bits, making a segment 64kb in size.

    Right. But 2 16b = 2 13b = 2 3kb = 8kb, why is it 64kb 2 16 = 65536 = 64k

    And then Shurang goes on to say that each segment is called a section, and that there are 64k segments in 1m of memory and each section has 16 bytes.

    1M of memory with a total of 64k sections.

    1m of memory with a total of 16 disjoint 64ks.

  6. Anonymous users2024-02-08

    Segment address * 16 (decimal system);

    Segment address * 10 (hexadecimal);

    Segment address shifted four bits to the left;

    Segment address followed by four zeros (binary);

    These statements are all the same.

    The maximum written by formula? However, the part of the address with a value of 10ffef (not 20 bits) cannot be used in the era of 20-bit addresses.

    Later, I used it.

  7. Anonymous users2024-02-07

    For example, if you were to tell someone where you buried something in the woods, you would say something like this

    From here, the fifth tree moves forward another 2 meters.

    Here, the "5th tree" is a thick frame, and the "forward 2 meters" is an offset based on the frame within this frame.

    The segment address is the frame in the example above, and the offset address is a local offset within the frame relative to the frame base.

    8086 The reason why the logical address is used in 8088 is because the length of the physical address (20 bits) exceeds the word length of the processor (16 bits), and it cannot be fully represented at one time, so it has to be divided into two parts. At the same time, this processing also brings the benefit of facilitating the dynamic memory positioning of the program.

  8. Anonymous users2024-02-06

    In 80x86, the offset address of the operand is called a valid address or "EA".

    The expression is: ea = base address + (address * scale factor) + displacement.

    For example, 8 can be written directly as 8

    It is also possible to write 5+3

    Here 3 is the offset of 8 relative to 5.

  9. Anonymous users2024-02-05

    A 4GB piece of RAM. In order to access the contents, it is physically addressed. 0,1,2,3,。。

    This makes it possible to access data, such as the content at address 0.

    That's enough.

    But! I only have a total of 4GB on a computer, and I give you a program to use, what about other people?

    So, use the segment mechanism to split the 4GB. This 4GB address can be regarded as a segment of 0, 1, and 2,。。 0,1,2.。。That's the segment address.

    In this way, each segment is equivalent to a 4GB (a segment can be up to 4GB).

    For example, if I want to take out the actual physical address position 3, then I need to take out the position 3 of the first segment.

    For example, if I want to take out the position of the actual physical address 100, this may be in the 5th position of the third paragraph.

    Then you need a segment address of 3 and an offset address of 5 to find it.

    Originally, a memory card, after encoding a physical address, Duang, became a memory card with an address, 4GB size.

    It's all true, it's true! Segment addresses, offset addresses, all fake! The fake is also modeled on the real one, and the fake, after the transformation, the real one is found.

    Is it clearer?

    If not, then I'm sorry to delay you.

Related questions
10 answers2024-07-24

Assembly language can be said to be machine language, and what deals directly with hardware is to transform computer language into 1001 that machines can recognize. It's not going to go out of style, at least not for this decade. It's mostly about the hardware side though. >>>More

5 answers2024-07-24

The general idea is to create two storage areas, one for the source string and one for the modified string. Create two loops, one for whitespace and one for string end symbols, both of which are compared with ASCII codes.

8 answers2024-07-24

First, the register position is different:

1. CS: ** segment register; >>>More

5 answers2024-07-24

People want to compile, you write a c

12 answers2024-07-24

Again, it's 1101000000

CPU It doesn't matter if you're a memory unit or a register. >>>More