Article View: comp.lang.asm.x86
Article #98Re: Thick
From: black_phantom
Date: Sat, 13 Mar 1999 00:00
Date: Sat, 13 Mar 1999 00:00
97 lines
4320 bytes
4320 bytes
In article <7cbvvv$9oc$1@winter.news.rcn.net>,
Samir Wyszynski <samirw@connection.com> wrote:
> 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=E0 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 (MCG=
> A 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 seque=
> ncer.
> > 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 an=
> d later
>
> > That's all for standard VGA BIOS modes. I hope that you don't need to d=
> eal
> > 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? =
Bit planes can be grouped in bytes rather than bits. Memory can be mapped
in defferent ranged between A0000h and BFFFFh. Bit planes can be accessed in
couples (odd/even modes) - that's what happens in text modes in fact. That's
all only standerd VGA; non-standard adapters can have 8 and more bit planes.
All those and other possibilities can be checked via VGA registers but I'd
rather support only standard BIOS modes.
>
> 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.
>
-- Sclerosis cannot be healed but can be forgotten --
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Technical Details
Message-ID:
<7cckjs$fbq$9@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> <7cbvvv$9oc$1@winter.news.rcn.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10bb54,be6aba38dbcf8999 X-Google-Attributes: gid10bb54,public X-Google-Thread: f7d8d,be6aba38dbcf8999 X-Google-Attributes: gidf7d8d,public X-Google-Thread: feaef,be6aba38dbcf8999 X-Google-Attributes: gidfeaef,public X-Google-Thread: 114917,be6aba38dbcf8999 X-Google-Attributes: gid114917,public From: black_phantom@my-dejanews.com Subject: Re: Thick Date: 1999/03/13 Message-ID: <7cckjs$fbq$9@winter.news.rcn.net> X-Deja-AN: 454425599 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> <7cbvvv$9oc$1@winter.news.rcn.net> X-Http-User-Agent: Mozilla/4.01 [en] (WinNT; I) X-Complaints-To: abuse@rcn.com X-Trace: faAQaWPpfne3qnWJlRXt4TLnfdWFF6lKAmGowgWM4lY= X-Http-Proxy: 1.0 x4.dejanews.com:80 (Squid/1.1.22) for client 192.116.192.179 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Sat Mar 13 00:41:45 1999 GMT NNTP-Posting-Date: 13 Mar 1999 03:04:28 GMT Newsgroups: comp.lang.asm.x86,borland.public.tasm,alt.lang.asm,alt.2600