Jump to content

I need some tutorial about graphics

- - - - -

  • Please log in to reply
9 replies to this topic

#1
H2010

H2010

    Newbie

  • Members
  • PipPip
  • 21 posts
HELLO
Can someone teach me or give us some graphics tutorial

#2
mebob

mebob

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 490 posts
Is this in Windows or DOS?
Latinamne loqueris?

#3
H2010

H2010

    Newbie

  • Members
  • PipPip
  • 21 posts
HELLO mebob
IN DOS 16BIT

#4
mebob

mebob

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 490 posts
The way I know how to do it is to switch to a video mode, then write to the video memory. I will give an example that uses mode 13h (320x200 resolution, 256 colors). It makes the screen white.


xor ah,ah		;Use function 0 of int 0x13

mov al,0x13		;Set video mode to mode 0x13

int 0x10


mov ax,0xa000		;Set the ES register to the segment

mov es,ax		;that the video memory resides in


xor bx,bx		;Set BX to 0, because we are using it

			;as a pointer, and we want to start at 0


mov ch,15		;Use color #15 in the palette,

			;which is white


fillscr_loop:		;The loop to make every pixel white


mov byte[es:bx],ch	;Make the pixel pointed to by ES:BX white

inc bx			;Increment BX


cmp bx,64000		;64,000 is the number of pixels

jne fillscr_loop	;If BX does not equal 64,000 continue

			;the loop


halt:			;Loop to halt the computer

hlt

jmp halt

There are more video modes, such as one for 640x480 with 16 colors, but I don't know how to use that one. If you want higher video modes, like 1280x1024, read about VESA video modes.
Latinamne loqueris?

#5
H2010

H2010

    Newbie

  • Members
  • PipPip
  • 21 posts
Thank you mebob for your help

i want some tutorials start from the beginning like how print color text .... Step by step because i didn't find like this tutorials on the web. Is there a person can give me some tutorials

#6
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,705 posts
  • Programming Language:C, Java, C++, PHP, Python, Perl, Assembly, Bash, Others
  • Learning:JavaScript
Check out my tutorial series, Intro to Intel Assembly Language

http://forum.codecal...e-part-1-a.html
http://forum.codecal...part-2-a-2.html
http://forum.codecal...e-part-3-a.html
http://forum.codecal...e-part-4-a.html
http://forum.codecal...e-part-5-a.html
http://forum.codecal...e-part-6-a.html
http://forum.codecal...e-part-7-a.html
http://forum.codecal...e-part-8-a.html
http://forum.codecal...ge-part-9a.html
http://forum.codecal...ge-part-9b.html

8-9B are the relevant parts, but you might want to read through a few others because I build on top of stuff that I taught before.
sudo rm -rf /

#7
H2010

H2010

    Newbie

  • Members
  • PipPip
  • 21 posts
THANK YOU dargueta for your Nice tutorials you explain some graphics tutorial in lesson 9 and i want you to give us more about graphics step by step

#8
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,705 posts
  • Programming Language:C, Java, C++, PHP, Python, Perl, Assembly, Bash, Others
  • Learning:JavaScript
I'm currently swamped with work right now, but I have every intention of continuing this series.
sudo rm -rf /

#9
H2010

H2010

    Newbie

  • Members
  • PipPip
  • 21 posts
thank you dargueta for these lessons, i'm waiting for your new lessons :thumbup:

#10
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,705 posts
  • Programming Language:C, Java, C++, PHP, Python, Perl, Assembly, Bash, Others
  • Learning:JavaScript
I am too. :D
sudo rm -rf /




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users