DOS 132x50 Text Mode problem. 
Author Message
 DOS 132x50 Text Mode problem.

Hello everyone,

First I'm not sure if this is the place to post this, I hope so :-).  I'm
using FreePascal (which is Ansi-ISO compliant to my belief.
http://www.*-*-*.com/

Really not just 132x50  and 132xXX mode seem to cause the same thing.  I'm
in a DOS IDE supplied by the.  I execute the code that follows Once, the
screen is initialized, but seems all messed up when writing things every is
offsetted and doesn't appear where it should on the screen.  I stop the
application, and simply Run it again and the screen fixes itself.  I've seen
programs written in Pascal that work great the first time even on my system
so I know it's nto a hardware issue per say.  I'm thinking there's something
missing in there, an initialization or something needs to be emptied, I just
dont know what.  Here's the code sample.

{$ASMMODE INTEL}
PROGRAM TestVideo;

USES Crt;

CONST
        Mode132by25 = $109;
        Mode132by43 = $10A;
        Mode132by50 = $10B;
        Mode132by60 = $10C;

PROCEDURE SetupMode(WhichMode: Word): Assembler;
ASM
        MOV AH,  04FH
        MOV AL, 002H
        MOV BX, WhichMode
        INT 010H
END;

PROCEDURE CloseMode(): Assembler;
ASM
        MOVE AX, 003H
        INT 010H
END;

BEGIN
        SetupMode(Mode132by50);
        ClrScr;
        GotoXY(1, 1);
        Write('This is a test');
        GotoXY(90,35);
        Write('This is another Test');
        ReadyKey;
        CloseMode();
END.

Any help would be greatly appreciated as this has been a headache of mine
for a couple weeks now.

Thank you very much,  in advance for any help.

Stephane Richard
Software Developer



Mon, 03 Oct 2005 20:41:41 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Problem with GotoXY in EGA/VGA text mode (43/50 line mode)

2. Problem with DOS Protected Mode Application in Windows 2000

3. Problem running DOS protected mode application in Windows 2000

4. Problems, Turbo Pascal 6 and Windows 95 (DOS mode)

5. Mouse-Problem in Protected Mode BP7 (DOS!)

6. Scrolling Text in Text Mode - PLEASE HELP!

7. Text mode - graphics mode conflict (Help!)

8. Text mode vs graphics mode conflict (Help!)

9. Convert UNIX text to DOS text

10. Unix Text File ---> DOS Text File

11. BP7/DOS in Win95 DOS Box - IOResult problems

12. Text mode font - help!

 

 
Powered by phpBB® Forum Software