textmode demos - Programmers Heaven

Howdy, Stranger!

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

Categories

textmode demos

ok i want to do demos in textmode because i think they

look a lot more interesting than stuff in smooth nice

looking graphics. . . is there a more direct way to do

the graphics or do i have to print lines of "text"

(blocks of color) to the screen?


Comments

  • : ok i want to do demos in textmode because i think they

    : look a lot more interesting than stuff in smooth nice

    : looking graphics. . . is there a more direct way to do

    : the graphics or do i have to print lines of "text"

    : (blocks of color) to the screen?


    Well, I don't know if I fully understand your question, but if I do:


    Send your stuff to the address $b800:$0000. A character on screen is to bytes in memory: the first one is the character itself, and the other one the color.

    The low nibble is foreground and the high is background).


    example:


    Turbo Pascal:



    Mem[$b800:$0] := 65; { A }

    Mem[$b800:$1] := $21; { Green background, blue textcolor }


    Assembly:



    mov ax, 0b800h

    mov es, ax

    xor di, di

    mov al, 65d ; A

    mov es:[di], al

    inc di

    mov al, 21h ; Green background, blue textcolor

    mov es:[di], al


  • that's exactly it. . . question, though, does it

    make any difference whether I draw pictures

    onscreen (a la really HUGE pixels) by changing the

    background color for each cell and having the

    character be a space or is there a specific character

    that I can use as a block of color?


  • : that's exactly it. . . question, though, does it

    : make any difference whether I draw pictures

    : onscreen (a la really HUGE pixels) by changing the

    : background color for each cell and having the

    : character be a space or is there a specific character

    : that I can use as a block of color?


    You can use ASCII character 219. It's a filled block. Characters 176 to 178 can be used to mix the background color whith the foreground color. There are more useful characters so I recommend that you either get or create a program that can view ASCII characters. For example helppc.




  • : that's exactly it. . . question, though, does it

    : make any difference whether I draw pictures

    : onscreen (a la really HUGE pixels) by changing the

    : background color for each cell and having the

    : character be a space or is there a specific character

    : that I can use as a block of color?


    you can also use char 221 (I think it was), wich is a half filled cell. Then you can use the left half for foreground color, and the right half for background color. This way you can upgrade a 80x50 display to 160x50 (16 colors). If you adjust the char height, you can even have a 160x100, or 160x200 mode :)


    heck, I even made a 640x200x2 mode in textmode once:)


    /inopia


  • : : that's exactly it. . . question, though, does it
    : : make any difference whether I draw pictures
    : : onscreen (a la really HUGE pixels) by changing the
    : : background color for each cell and having the
    : : character be a space or is there a specific character
    : : that I can use as a block of color?



    : you can also use char 221 (I think it was), wich is a half filled cell. Then you can use the left half for foreground color, and the right half for background color. This way you can upgrade a 80x50 display to 160x50 (16 colors). If you adjust the char height, you can even have a 160x100, or 160x200 mode :)


    : heck, I even made a 640x200x2 mode in textmode once:)


    : /inopia



    I did a textmode intro about a year ago which used char 220 (half filled cell with upper and lower half) so I got a 80x100
    resolution in 16 colors. Another interesting thing to try is to
    code a plasma in textmode using all the 'raster' characters (178 etc.). It looks like it has 256 colors if done properly :o)


Sign In or Register to comment.