flat assembler
Message board for the users of flat assembler.
![]() |
How many minutes do you spend on the computer each day? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Total Votes : 14 |
Author |
|
Dex4u 01 Apr 2006, 14:55
For that you use
Code: mov ax,012h ;VGA mode int 10h ;640 x 480 16 colors. mov ax,0A000h mov es,ax ;ES points to the video memory. mov dx,03C4h ;dx = indexregister mov ax,0F02h ;INDEX = MASK MAP, out dx,ax ;write all the bitplanes. mov di,0 ;DI pointer in the video memory. mov cx,38400 ;(640 * 480)/8 = 38400 mov ax,0FFh ;write to every pixel. rep stosb ;fill the screen jmp $ Heres a none vesa one, for320*200*256 pcx picture: http://board.flatassembler.net/topic.php?t=2694 |
|||
![]() |
|
Adam Kachwalla 01 Apr 2006, 23:44
Where did you get the formula (640*480)/8 from (the /8 bit)?
Also, if I need to write the raw pixel data to video memory, is this code alright? Code: PIXELS DB 0x2F,0x33,0x95,0x98,... MOV EX,PIXELS Also, what are the possible colors and patterns (the numbers) |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.