meaning of the statement

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • srinpraveen
    New Member
    • Nov 2006
    • 19

    meaning of the statement

    I went to the site http://www.brackeen.com/home/vga/bitmaps.html and wanted to check out one of the c programs available there on my Turbo C++ compiler. But those files couldn't be opened by TC. It asked me to check the pif file. I don't know what is pif.
    Also I noticed the statement below.
    "Remember to compile in the LARGE memory model"
    What is the meaning of this statement? Are there some extra steps for me to take so that the file can be viewed by tc.exe?

    Also I need the asckey codes for right, top, left and right arrow keys please.
  • horace1
    Recognized Expert Top Contributor
    • Nov 2006
    • 1510

    #2
    Originally posted by srinpraveen
    I went to the site http://www.brackeen.com/home/vga/bitmaps.html and wanted to check out one of the c programs available there on my Turbo C++ compiler. But those files couldn't be opened by TC. It asked me to check the pif file. I don't know what is pif.
    Also I noticed the statement below.
    "Remember to compile in the LARGE memory model"
    What is the meaning of this statement? Are there some extra steps for me to take so that the file can be viewed by tc.exe?

    Also I need the asckey codes for right, top, left and right arrow keys please.
    The memory model determines how the Turbo C compiler generates code for the 16-bit Intel x86 processors. For a description see
    http://en.wikipedia.or g/wiki/Memory_model

    To compile the bitmap.c program under Turbo C open a Command Window, change to the directory where the code is and type (switch -ml specifies the large memory model)

    tcc -ml bitmap.c

    if you are using the TC IDE you select Options > Compiler > Code generation and select Large

    When you run the bitmap program the display will switch in Full Screen mode, Alt/Enter will switch back

    Comment

    • srinpraveen
      New Member
      • Nov 2006
      • 19

      #3
      Originally posted by horace1
      The memory model determines how the Turbo C compiler generates code for the 16-bit Intel x86 processors. For a description see
      http://en.wikipedia.or g/wiki/Memory_model

      To compile the bitmap.c program under Turbo C open a Command Window, change to the directory where the code is and type (switch -ml specifies the large memory model)

      tcc -ml bitmap.c

      if you are using the TC IDE you select Options > Compiler > Code generation and select Large

      When you run the bitmap program the display will switch in Full Screen mode, Alt/Enter will switch back

      Thanks Horace1...I will follow your directions and later give you feedback later.

      Comment

      • baburk
        New Member
        • Oct 2006
        • 111

        #4
        Hai srinpraveen

        convert this

        byte *VGA=(byte *)0xA0000000L;

        to

        char far *VGA=(char far *)0xA0000000L;

        outp( ); to outportb();

        The file size should be 64KB only. Because the size of char array is 65536 bytes only if we are working in TC in low memory. In dos we can able to work with 1Mb of RAM. To access more memory we have to use large memory model. Read the book IBM Pc and clones by GovindRajalu and Hardware trouble shoothing maintainig and repairing by JonhBeglow

        visit this for trouble shooting

        Comment

        Working...