Board index » delphi » Re - Fill whole screen

Re - Fill whole screen

scott earnest -

Quote
>Look back in the posts to see where I explained why this >problem happens, and how
>to fix it.  Summary:  Write your own procedure to send >messages to the screen via
>direct video writing.

yeah, really helpful Scott - how about someone tell the poor
bastards who don't know just HOW to do what you suggest for
once?

not everyone knows every byte of memory by heart, ya know.
This is a major problem with this newsgroup, by the way - you
lot always assume that everyone else knows just what you do.

const
     textscreen = $B800;

procedure fillscreen;
var
   x,y,q,c:byte;
   {q is char, c is colour}

begin
     for y := 0 to 25 do
        for x := 0 to 80 do
        begin
             mem[textscreen:(y * 80 + x) * 2 + 1] := c;
             mem[textscreen:(y * 80 + x) * 2] := q;
        end;
end;  

$B800 is the start of text screen memory for colour monitors -
if you want to use a monochrome monitor (yes, they're still
here!), uses $B000;

The memory structure is 4000 words - one byte for the
character, then 1 byte for its colour value. (or it may be the
other way around - if this doesn't work, swap the two MEM lines
above) ;)

squigger hops again

 

Re:Re - Fill whole screen


Quote
squigger wrote:

> scott earnest -

> >Look back in the posts to see where I explained why this >problem happens, and how
> >to fix it.  Summary:  Write your own procedure to send >messages to the screen via
> >direct video writing.

> yeah, really helpful Scott - how about someone tell the poor
> bastards who don't know just HOW to do what you suggest for
> once?

What, I'm supposed to explain to people HOW to use their newsreaders to look up a
previously posted message?  Puhhleeze.  I had already written a followup article on
the topic in the past 24-48 hours; why should I rehash something that I already wrote
the details to and which should be readily available to anyone who has the initiative
to go look?  And if you were to go back and look at that article, you'd see that in
regards to, "Write your own procedure to send messages to the screen via direct video
writing", I even did the job so that you wouldn't have to.

This group has had a long legacy of being relatively flame-free, and personally I
have always tried to be helpful and constructive.  Let me just suggest that if you
feel the need to post holier-than-thou sarcastic messages, please either check it at
the door or take it elsewhere where that sort of juvenile attitude is more the norm.
And if you really have a bone to pick with someone (including myself), please take
issue in e-mail so that it doesn't clutter up the group any more than necessary.

Quote
> not everyone knows every byte of memory by heart, ya know.

No, but there's no excuse for anyone in this group or any to know how to use their
news software.  Most software has a way to recall previous messages posted that are
still on the server.  And if that's a real problem, point your web browser to
www.dejanews.com and go digging.  Either way, you'll be able to find my article,
which even included a reusable function for quickly writing strings to directly to
the screen.

Quote
> This is a major problem with this newsgroup, by the way - you
> lot always assume that everyone else knows just what you do.

What a load.  My message was perfectly polite and well within the bounds of
netiquette.  And if you ask a question nicely, just about any regular to the group,
and even those passing through will be glad to either a.) provide a sufficient answer
to the problem, b.) suggest ways to go about solving the problem, or c.) offer
pointers to places where the solution to the problem can be found.  My initial
message in this thread fell under category A.  My second message in this thread
(which you were replying to) happens to fall under category C, being a pointer to my
category A reply.  If you feel the need to get your undies in a bundle over that,
then that's your problem.

Quote
> const
>      textscreen = $B800;

> procedure fillscreen;
> var
>    x,y,q,c:byte;
>    {q is char, c is colour}

Then why not make q and c parameters to the procedure?

Quote
> begin
>      for y := 0 to 25 do
>         for x := 0 to 80 do

By this example, y would go from 0 to 24, and x would go from 0 to 79.

Quote
>         begin
>              mem[textscreen:(y * 80 + x) * 2 + 1] := c;
>              mem[textscreen:(y * 80 + x) * 2] := q;
>         end;
> end;

> $B800 is the start of text screen memory for colour monitors -
> if you want to use a monochrome monitor (yes, they're still
> here!), uses $B000;

> The memory structure is 4000 words - one byte for the
> character, then 1 byte for its colour value. (or it may be the
> other way around - if this doesn't work, swap the two MEM lines
> above) ;)

Even values are the ASCII values, odd are the attributes (what I happen to refer to
as the CACA rule -- makes it easy to remember).  Switch what you assign to each mem[]
reference.

And, BTW, on an 80x25 screen, it's 2000 words, not 4000.

Also, if you really need to know, each 80x25 text page begins at 4096-byte
increments.  Page 0 is 0, page 1 is 4096, page 2 is 8192 . . . up to page 7 is 28762.

Quote
> squigger hops again

--
Scott Earnest                      | _,-""-_,-""-_,-""-_,-""-_,-""-_,-" |
set...@ix.netcom.com (primary)     | We now return you to our regularly |
siny...@{*word*104}space.org (alternate) | scheduled chaos and mayhem. . . .  |

Re:Re - Fill whole screen


Hello,

I just want to improve the speed of the fillscreen procedure.

You should try this procedure :

(before verify the syntax of absolute and fillchar )

procedure fillscreen;

type T_screen = array[0..2000] of word;
     P_T_screen = ^T_screen;

var  my_screen : P_T_screen absolute $B800:0000 ;
     val : word;
     q, c : char;

begin
        val := c * 256 + q ;
        fillchar (my_screen, val, 2000);
end ;

Explanations :

- I create an array of word because a word is two bytes
  the screen is an array of bytes (4000) but an array of
  world (2000). The first 8 bits represent the first byte
  (here the color) and the 8 others bits the 2nd (the character)

- The array address is $B800:000 as the screen (colour one !) so
  as we write in this array we write on the screen.

- I said we write : fillchar does it for us : fillchar
  fill the array with the value you give ...)

It's done.

(Note : I'm not sure on the procedure usage. But the idea is here!)

Bruno Tignac
tig...@labri.u-bordeaux.fr

Re:Re - Fill whole screen


scotty wrote

Quote
>What a load.  My message was perfectly polite and well within >the bounds of
>netiquette.  And if you ask a question nicely, just about any >regular to the group,
>and even those passing through will be glad to either a.) >provide a sufficient answer
>to the problem, b.) suggest ways to go about solving the >problem, or c.) offer
>pointers to places where the solution to the problem can be >found.  My initial
>message in this thread fell under category A.  My second >message in this thread
>(which you were replying to) happens to fall under category C, >being a pointer to my
>category A reply.  If you feel the need to get your undies in >a bundle over that,
>then that's your problem.

I rather think you're the one with the holier-than-thou
attitude, matey.  What's the good of a pointer to a weeks or
months old post then, hmm?  And anyway, it got you to post a
good example, didn't it.  

What's the matter, don't like criticism?

squigger the irritating hops again

Re:Re - Fill whole screen


[replying both in e-mail and news]

Quote
squigger wrote:
> scotty wrote

I rather dislike being called "[S]cotty".  If you think you need to resort not
nomenclatural diminutives, you're being juvenile.  Sorry if you have to pull out your
dictionary to understand what I might be saying.

Quote
> >What a load.  My message was perfectly polite and well within >the bounds of
> >netiquette.  And if you ask a question nicely, just about any >regular to the group,
> >and even those passing through will be glad to either a.) >provide a sufficient answer
> >to the problem, b.) suggest ways to go about solving the >problem, or c.) offer
> >pointers to places where the solution to the problem can be >found.  My initial
> >message in this thread fell under category A.  My second >message in this thread
> >(which you were replying to) happens to fall under category C, >being a pointer to my
> >category A reply.  If you feel the need to get your undies in >a bundle over that,
> >then that's your problem.

> I rather think you're the one with the holier-than-thou
> attitude, matey.

Look, I've been helping out in this group since '94, and I'm no stranger to USENET.  If
you think I have a holier-than-thou attitude, it's because I've been around long enough to
know what's right and what isn't accepted.  If you have a problem with what I write (which
I try to keep within the bounds of proper context), then you really should go back to
news.newusers.announce to find out what's right and what isn't.

Already on this server, Kim Forwood (who is also a regular in this group) has spoken on
behalf of my defense, and you'll probably find more people here in my favor rather than
yours.

If you want to gripe about a holier-than-thou attitude, then why did I follow up to your
message about finding the address of fonts in memory?  I know a lot about text processing,
and I offered the tip of the iceberg regarding what I know.  I didn't have to tell you a
damn thing, but I decided I would.  And I also offered to give more information if you
still have questions -- which I will still provide if you decide to be polite for once.

If you want to bite the hand that feeds you, go right ahead, but I guarantee that you will
quickly wear out your welcome.

Quote
> What's the good of a pointer to a weeks or months old post then, hmm?

Try hours or days old.  Quit your whining.  And if were days old, it would already be
available on DejaNews or AltaVista.  I believe I posted the URLs in this thread, and if
they happened to be incorrect, they're easy to find.

Quote
> And anyway, it got you to post a good example, didn't it.

By posting corrections to your erroneous information, yes.  I already posted complete
information, no need to reiterate because I posted another message indicating where to
find it.

Quote
> What's the matter, don't like criticism?

Sure, but I have a problem with criticism that is unjustified and juvenile.  Your
criticism can be categorized as both.  If you want to pick a fight with me, go ahead --
but I guarantee you're not going to win.  To be perfectly honest, *I* am not looking for a
fight, and am not interested in one.  I'd like to maintain the programmer-friendly status
quo that is the legacy here in this group.

And for criticism, if I have posted incorrect information, I not only request correction
-- I expect it.  I'm not perfect, and I've made mistakes in my posts.  I've even followed
up my own messages with corrections, and also shut my mouth when I knew I was wrong (like
when I incorrectly quoted clockrates for code twice in the same thread).  But I happen to
think that I provide a healthy signal-to-noise ratio to this group, and I don't intend to
change that.

Quote
> squigger the irritating hops again

You can say that again.  :-P  Now, do you have anything else to say, or are you going to
continue embarassing yourself in public?

--
Scott Earnest                      | _,-""-_,-""-_,-""-_,-""-_,-""-_,-" |
set...@ix.netcom.com (primary)     | We now return you to our regularly |
siny...@{*word*104}space.org (alternate) | scheduled chaos and mayhem. . . .  |

Re:Re - Fill whole screen


[replying both in e-mail and news]

Quote
squigger wrote:
> scotty wrote

I rather dislike being called "[S]cotty".  If you think you need to resort not
nomenclatural diminutives, you're being juvenile.  Sorry if you have to pull out your
dictionary to understand what I might be saying.

Quote
> >What a load.  My message was perfectly polite and well within >the bounds of
> >netiquette.  And if you ask a question nicely, just about any >regular to the group,
> >and even those passing through will be glad to either a.) >provide a sufficient answer
> >to the problem, b.) suggest ways to go about solving the >problem, or c.) offer
> >pointers to places where the solution to the problem can be >found.  My initial
> >message in this thread fell under category A.  My second >message in this thread
> >(which you were replying to) happens to fall under category C, >being a pointer to my
> >category A reply.  If you feel the need to get your undies in >a bundle over that,
> >then that's your problem.

> I rather think you're the one with the holier-than-thou
> attitude, matey.

Look, I've been helping out in this group since '94, and I'm no stranger to USENET.  If
you think I have a holier-than-thou attitude, it's because I've been around long enough to
know what's right and what isn't accepted.  If you have a problem with what I write (which
I try to keep within the bounds of proper context), then you really should go back to
news.newusers.announce to find out what's right and what isn't.

Already on this server, Kim Forwood (who is also a regular in this group) has spoken on
behalf of my defense, and you'll probably find more people here in my favor rather than
yours.

If you want to gripe about a holier-than-thou attitude, then why did I follow up to your
message about finding the address of fonts in memory?  I know a lot about text processing,
and I offered the tip of the iceberg regarding what I know.  I didn't have to tell you a
damn thing, but I decided I would.  And I also offered to give more information if you
still have questions -- which I will still provide if you decide to be polite for once.

If you want to bite the hand that feeds you, go right ahead, but I guarantee that you will
quickly wear out your welcome.

Quote
> What's the good of a pointer to a weeks or months old post then, hmm?

Try hours or days old.  Quit your whining.  And if were days old, it would already be
available on DejaNews or AltaVista.  I believe I posted the URLs in this thread, and if
they happened to be incorrect, they're easy to find.

Quote
> And anyway, it got you to post a good example, didn't it.

By posting corrections to your erroneous information, yes.  I already posted complete
information, no need to reiterate because I posted another message indicating where to
find it.

Quote
> What's the matter, don't like criticism?

Sure, but I have a problem with criticism that is unjustified and juvenile.  Your
criticism can be categorized as both.  If you want to pick a fight with me, go ahead --
but I guarantee you're not going to win.  To be perfectly honest, *I* am not looking for a
fight, and am not interested in one.  I'd like to maintain the programmer-friendly status
quo that is the legacy here in this group.

And for criticism, if I have posted incorrect information, I not only request correction
-- I expect it.  I'm not perfect, and I've made mistakes in my posts.  I've even followed
up my own messages with corrections, and also shut my mouth when I knew I was wrong (like
when I incorrectly quoted clockrates for code twice in the same thread).  But I happen to
think that I provide a healthy signal-to-noise ratio to this group, and I don't intend to
change that.

Quote
> squigger the irritating hops again

You can say that again.  :-P  Now, do you have anything else to say, or are you going to
continue embarassing yourself in public?

--
Scott Earnest                      | _,-""-_,-""-_,-""-_,-""-_,-""-_,-" |
set...@ix.netcom.com (primary)     | We now return you to our regularly |
siny...@{*word*104}space.org (alternate) | scheduled chaos and mayhem. . . .  |

Re:Re - Fill whole screen


In article <539mgf$...@klf.netconnect.com.au> of Mon, 7 Oct 1996
01:30:55 in comp.lang.pascal.borland, squigger <jason...@nexus.edu.au>
wrote:

Quote

>$B800 is the start of text screen memory for colour monitors -
>if you want to use a monochrome monitor (yes, they're still
>here!), uses $B000;

It is not the monitor that matters, but the display mode.  I imagine
that it is usual to use mono mode if you have a mono monitor, and colour
with colour; but I have certainly used colour mode on a mono screen and
vice versa, in each case for sufficient reasons.  I assume, however,
that with a monochrome ADAPTER you may not be able to use a colour mode.

--
John Stockton, Surrey, UK.  J...@merlyn.demon.co.uk  Turnpike v1.12  MIME
    http://www.merlyn.demon.co.uk/

Other Threads