Article View: comp.lang.asm.x86
Article #97Re: Thick
From: Samir Wyszynski
Date: Fri, 12 Mar 1999 00:00
Date: Fri, 12 Mar 1999 00:00
81 lines
3304 bytes
3304 bytes
black_phantom@my-dejanews.com wrote:
>
> "TK - TBD" <PISS_OFF_SPAMMERS_Thomas_Kjoernes@phoenix.com> wrote:
> > tunney <bigmacmeal@hotmail.com> wrote in article
> > <7c6u0d$cue$1@winter.news.rcn.net>...
> > > I know that this is a thick question, but could someone explain to me
> > > how to clear the screen in text and video mode, can't for the life of me
> > > figure out how. Please help me I have an exam in this soon.
> > > Also could someone explain int 21h service 0Ah
> > >
> > > Thanks a million.
> >
> > Clearing the screen (TEXTMODE) is easy:
> >
> > mov ax, 3 ; set mode 3, voilà screen is cleared.
> > int 10h ;
> >
> > For less flickering... you could clear it by filling video mem
> > directly, like this:
> >
> > push 0B800h
> > pop es
> > xor ax, ax
> > xor di, di
> > mov cx, 16384
> > rep stosw
> >
> > For video mode, ask someone else.
>
> I think it should be "graphics" mode, not "video" mode. It's not a lot harder.
> For CGA graphics modes the above will also work. For chained modes (MCGA 13h)
> you clear 64k starting at 0A0000h:
>
> clear_a0000:
> mov ax, 0A000h
> mov es, ax
> sub ax, ax
> sub di, di
> mov cx, 32768
> cld
> rep stosw
>
> For non-chained modes the above clears only bit plane selected in sequencer.
> To clear screen you need to allow write to all 4 bit planes:
>
> mov dx, 3c4h
> mov ax, 0F02h
> out dx, ax
>
> Of course, it's a good idea to save previous bit plane write bitmask and later
> That's all for standard VGA BIOS modes. I hope that you don't need to deal
> with non-standard modes ('X' or how is it called now?) - it's no harder just
> more dirty work.
>
What do you mean nonstandard - the 32K 64K and true color where each
pixel is described by 2 or 3 consecutive bytes?
I was exited about planar video memory on Amigas when they first came
out, and all I had was 4 color Commodore 64 but soon after I realized
that it is very awkward to handle.
Personaly I thing the new modes are much more elegant way of handling
the display. There is no need to access 4 different locations while
switching banks. Most high res VGAs have vesa BIOS or it is available as
a TSR.
Piece of cake.
Technical Details
Message-ID:
<7cbvvv$9oc$1@winter.news.rcn.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7c6u0d$cue$1@winter.news.rcn.net> <7c9dr6$as4$1@winter.news.rcn.net> <7cb974$13p$1@winter.news.rcn.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10bb54,be6aba38dbcf8999 X-Google-Attributes: gid10bb54,public X-Google-Thread: 114917,be6aba38dbcf8999 X-Google-Attributes: gid114917,public X-Google-Thread: f7d8d,be6aba38dbcf8999 X-Google-Attributes: gidf7d8d,public X-Google-Thread: feaef,be6aba38dbcf8999 X-Google-Attributes: gidfeaef,public From: Samir Wyszynski <samirw@connection.com> Subject: Re: Thick Date: 1999/03/12 Message-ID: <7cbvvv$9oc$1@winter.news.rcn.net> X-Deja-AN: 454334127 Content-Transfer-Encoding: quoted-printable Approved: <johnfine@erols.com> References: <7c6u0d$cue$1@winter.news.rcn.net> <7c9dr6$as4$1@winter.news.rcn.net> <7cb974$13p$1@winter.news.rcn.net> Content-Type: text/plain; charset="iso-8859-1" X-Mozilla-Status: 0801 X-Complaints-To: abuse@rcn.com X-Trace: NC19wo/cSpiCwn9ZgGLerXnCZV0L01DXhQg/wujW0FM= Organization: none Mime-Version: 1.0 NNTP-Posting-Date: 12 Mar 1999 21:12:31 GMT Newsgroups: comp.lang.asm.x86,borland.public.tasm,alt.lang.asm,alt.2600