Board index » delphi » using the last character of the screen ?

using the last character of the screen ?

Do you know if it possible to use the last character of the screen (on
the down-left of the screen) ?

If I use write, all the line goes up.

Pascal
--
Pascal PEtit
Pascal.Pe...@litp.ibp.fr

 

Re:using the last character of the screen ?


In article 95Jun16025...@litp.ibp.fr, pe...@litp.ibp.fr (Pascal PETIT) writes:

Quote
> Do you know if it possible to use the last character of the screen (on
> the down-left of the screen) ?

> If I use write, all the line goes up.

> Pascal
> --
> Pascal PEtit
> Pascal.Pe...@litp.ibp.fr

C'est possible, mais pas avec write.

Il faut crire directement dans la mmoire vido :

Sur un cran couleur en mode texte, la mmoire vido commence l'adresse
$B800:0000

On y trouve, pour chaque caractre, le code ASCII suivi du code attribut (couleur).
Le dernier caractre se trouve (80*25 - 1) * 2 = 3998 octets plus loin,
c'est--dire l'adresse $B800:3998 et son attribut l'adresse suivante.

It's possible, but not using write.

You will have to write directly in video memory :

On a color screen in text mode, the video memory begins at address $B800:0000

You can find there, for each character, the ASCII code followed by its attribute
(color). The last character is located (80*25 - 1) * 2 = 3998 bytes forward,
id est at address $B800:3998 and its attribute at next address.

Hope this will help

Christophe

Re:using the last character of the screen ?


        To use the bottom row, access the screen memory directly.
        Use mem[ $B800 : (x*2)+(screen_width*2)*y ] := the ascii char
            mem[ $B800 : (x*2)+(screen_width*2)*y +1] := the color

        This will bypass the scrolling as well as speed up the text put onto
the screen.
        -tarot.

Re:using the last character of the screen ?


In article <PETIT.95Jun16025...@litp.ibp.fr>,

Quote
Pascal PEtit <pe...@litp.ibp.fr> wrote:
>Do you know if it possible to use the last character of the screen (on
>the down-left of the screen) ?

>If I use write, all the line goes up.

Try this:

procedure putchar(x,y:word;c:char); assembler;
asm
        mov     ax,0b800h
        mov     es,ax
        mov     ax,160
        mul     y
        mov     di,x
        shl     di,33   ; fast version of shl reg,1
        add     di,ax
        mov     al,c
        mov     es:[di],al
end;    

That will place a character on a color screen without moving it or changing
the WhereX or WhereY (ie, cursor position).

Quote
>Pascal
>Pascal PEtit
>Pascal.Pe...@litp.ibp.fr

--TCA of NewOrder
newor...@carina.unm.edu

Re:using the last character of the screen ?


In article <PETIT.95Jun16025...@litp.ibp.fr>,
Quote
Pascal PEtit <pe...@litp.ibp.fr> wrote:

:Do you know if it possible to use the last character of the screen (on
:the down-left of the screen) ?
:If I use write, all the line goes up.

This problem is covered in

 80222 Jun 16 09:13 ftp://garbo.uwasa.fi/pc/ts/tsfaqp24.zip
 tsfaqp24.zip Common Turbo Pascal Questions and Timo's answers

"If you do not know how to go about getting this material, users are
welcome to email me for the prerecorded garbo.uwasa.fi instructions
(long, circa 29Kb). If you do not receive my reply within five days,
please ask your own site's system manager to construct a returnable
mail path for you".

   All the best, Timo

....................................................................
Professor Timo Salmi    Co-moderator of comp.archives.msdos.announce
Moderating at garbo.uwasa.fi archives (ftp:// http://) 193.166.120.5
Department of Accounting and Business Finance  ; University of Vaasa
t...@uwasa.fi http://uwasa.fi/~ts BBS 961-3170972; FIN-65101,  Finland

Other Threads