A20 line - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

A20 line

Dose the A20 line remains disabled when entering pmode or it's enabled when entering protected mode?

10x

Comments

  • jeffleydajeffleyda Posts: 390Member
    : Dose the A20 line remains disabled when entering pmode or it's enabled when entering protected mode?
    :
    : 10x
    :
    The A20 line is controlled independantly of the CPU mode.
    You control it via I/O port 60h and 64h. (keyboard ports)

    There are also other methods of controlling A20, but the keyboard port is the most common.

    -jeff!
  • bogdanul2003bogdanul2003 Posts: 153Member
    : : Dose the A20 line remains disabled when entering pmode or it's enabled when entering protected mode?
    : :
    : : 10x
    : :
    : The A20 line is controlled independantly of the CPU mode.
    : You control it via I/O port 60h and 64h. (keyboard ports)
    :
    : There are also other methods of controlling A20, but the keyboard port is the most common.
    :
    : -jeff!
    :

    And even if I'm in pmode I can't address more then 1MB if the A20 line is disabled ?
  • blipblip Posts: 756Member
    : And even if I'm in pmode I can't address more then 1MB if the A20 line is disabled ?

    You can access the even-numbered megabytes with A20 off (0-1MB, 2-3MB, 4-5MB, etc.) and the odd megabytes will mirror the data in the megabyte before it (1-2MB will contain the same data as 0-1MB and any writes to either will be immediately reflected into the other).

    So you can only access up to half of the computer's memory in pmode with A20 off.
  • bogdanul2003bogdanul2003 Posts: 153Member
    : : And even if I'm in pmode I can't address more then 1MB if the A20 line is disabled ?
    :
    : You can access the even-numbered megabytes with A20 off (0-1MB, 2-3MB, 4-5MB, etc.) and the odd megabytes will mirror the data in the megabyte before it (1-2MB will contain the same data as 0-1MB and any writes to either will be immediately reflected into the other).
    :
    : So you can only access up to half of the computer's memory in pmode with A20 off.
    :


    10x for your answers.
    One more question.In pmode if you do not reinitialize the PIC to point at other interupts numbers what will happen when the timer sends interupt signals and the interupts are enabled?
  • blipblip Posts: 756Member
    : One more question.In pmode if you do not reinitialize the PIC to point at other interupts numbers what will happen when the timer sends interupt signals and the interupts are enabled?

    Intel reserved interrupt table entries 0-31 for exceptions but IBM used much of that range for their first x86-based computer. Leaving the PIC's mapped how they were programmed by the BIOS would have the PIT fire an IRQ and cause the CPU to execute the handler corresponding to entry 8, which is also an exception (double fault). So how are you going to tell if your routine was called as an exception or IRQ handler? I know there is a way by asking the PIC, and EMM386 uses it, but the simplest way is to avoid the situation and remap your IRQ handlers out of the way of the exception handlers.
  • mandla82mandla82 Posts: 7Member
    : : : Dose the A20 line remains disabled when entering pmode or it's enabled when entering protected mode?
    : : :
    : : : 10x
    : : :
    : : The A20 line is controlled independantly of the CPU mode.
    : : You control it via I/O port 60h and 64h. (keyboard ports)
    : :
    : : There are also other methods of controlling A20, but the keyboard port is the most common.
    : :
    : : -jeff!
    : :
    :
    : And even if I'm in pmode I can't address more then 1MB if the A20 line is disabled ?
    :
    in order to use the tull amount of ram plugged in your computer we have to enable the address line.. as mentioned earlier enabling a line of the floppy controller can do this. setting the appropriate bit can change hte state of this line. this bit the second bit of at keyboard controller output setting this second bit
Sign In or Register to comment.