address space overflow with getchar

I just added a getchar to a program compiling as an Xsmall memory model with Large Code size.

As soon as I add the getchar, I get an address space overflow in the BIT SPACE. I am not sure what this means and how to approach it's solution.

Can someone shed light on this?

Parents
  • If you try to fit a quart into a pint pot [1], it won't fit - it will overflow

    The same principle applies to processor memory:
    Any processor has only a finite memory capacity; if you try to put in more data than the available capacity, it will overflow

    Possible solutions are:
    1. Increase the capacity;
    2. Reduce the data.

    In the case of the BIT space, the capacity is fixed by the processor architecture, so 1 is not an option;
    You will therefore have to reduce your usage of BIT space.

    The Linker listing (or "map") file shows your memory usage.

    [1] 1 Quart = 2 Pints - about a litre.

Reply
  • If you try to fit a quart into a pint pot [1], it won't fit - it will overflow

    The same principle applies to processor memory:
    Any processor has only a finite memory capacity; if you try to put in more data than the available capacity, it will overflow

    Possible solutions are:
    1. Increase the capacity;
    2. Reduce the data.

    In the case of the BIT space, the capacity is fixed by the processor architecture, so 1 is not an option;
    You will therefore have to reduce your usage of BIT space.

    The Linker listing (or "map") file shows your memory usage.

    [1] 1 Quart = 2 Pints - about a litre.

Children
More questions in this forum