Mail Archives: djgpp/1996/10/07/16:48:10
From: | "Chris A. Triebel" <cat AT sun4 DOT iol DOT unh DOT edu>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: Assembly Question
|
Date: | Mon, 7 Oct 1996 15:47:51 -0400
|
Organization: | University of New Hampshire - Durham, NH
|
Lines: | 58
|
Message-ID: | <Pine.SUN.3.91.961007153943.4958D-100000@sun4.iol.unh.edu>
|
References: | <EmJc4JO00bk10tCco0 AT andrew DOT cmu DOT edu>
|
NNTP-Posting-Host: | sun4.iol.unh.edu
|
Mime-Version: | 1.0
|
In-Reply-To: | <EmJc4JO00bk10tCco0@andrew.cmu.edu>
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
On Sat, 5 Oct 1996, John David Doty wrote:
> Date: Sat, 5 OCT 1996 11:39:01 -0400
> From: John David Doty <doty+@andrew.cmu.edu>
> Newgroups: comp.os.msdos.djgpp
> Subject: Assembly Question
>
> This may be a really silly question, but...
>
> How do I get to the VGA memory in assembly? No C- straight assembly via
> as. All of the examples that I've seen involve using C for at least
> part of the setup.
>
> Thanks in advance,
> John
>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> John Doty |"We can fly- We have wings...
> Anime Fan, Programmer-at-large | We can touch floating dreams...."-Macross +
> doty AT andrew DOT cmu DOT edu |"The deepness of one's sorrow upon parting
> http://bifrost.res.cmu.edu/ | is the evidence of the deepness of one's
> | v @ | love, so... if one fears sadness, one
> ^_^ ^_^ ^_^ | wouldn't be able to love anything."
> Belldandy Urd Skuld | -Belldandy, "Don't fear sorrow"
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> ====================== --==(UDIC)==-- Keiichi Dragon =====================
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
>
>
mov ah,00h ; bios int 10h video mode select function
mov al,13h ; the mode number ( 320x200x256 )
int 10h
mov si,0A000h ; set the es:di ptr to 0A000:0000 <- the start of VGA memory
mov es,si
mov si,0
mov cx,64000 ; 320x200
mov al,0Fh ; set the color white
rep stosb ; store to every pixel on screen
mov ah,00h ; restore the video mode
mov al,03h
int 10h
NOTE: The important address to remember is 0A000:0000 the start of video
memory for page 0. This is really enough to program for video, but it is
a start. If you would like more information let me know.
cat
-------------------------------------------------------------------------------
"It's not the programming languages that will kill you, its the syntax."
"Digging a hole with a bulldozer is much more effective, unless you only know
how to use a shovel."
- Raw text -