flat assembler
Message board for the users of flat assembler.

Index > DOS > Basic graphical output in fasm -help needed-

Author
Thread Post new topic Reply to topic
sylwek32



Joined: 27 Apr 2006
Posts: 339
sylwek32 24 Oct 2006, 18:33
Hello
i wanted to ask you some questions about dos graphics programming.

1st question:
How to initialize to Screen 12 ?

2nd question:
How to put a pixel on the screen ?

3nd question:
How to make a blurry effect?

4th question:
How to make a starfield simulation?
Post 24 Oct 2006, 18:33
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 24 Oct 2006, 22:00
One ? why do you want to use mode 12h ?, this mode is a lot of work, you would be better off using mode 13h or vesa modes.
Post 24 Oct 2006, 22:00
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 24 Oct 2006, 22:36
or learn VGA programming Smile
Post 24 Oct 2006, 22:36
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
sylwek32



Joined: 27 Apr 2006
Posts: 339
sylwek32 24 Oct 2006, 23:26
and can you tell me how to do this in mode 13h or a vesa mode?
Post 24 Oct 2006, 23:26
View user's profile Send private message Reply with quote
rhyno_dagreat



Joined: 31 Jul 2006
Posts: 487
Location: Maryland, Unol Daleithiau
rhyno_dagreat 25 Oct 2006, 00:26
Here's what I can provide:

Code:
org 100h

mov ah, 00 ;Function for changing graphics modes
mov al, 13h ;screen 13
int 10h ;use int 10h with that function

mov bx, 0A000h ;move video memory location
mov es, bx ;into extra segment 

mov bx, 0 ; make offset 0
mov al, 1 

mov cx,64000

startloop:
mov [es:bx], al ;move al, which is the color the pixel is, into place in vidmem
inc bx ; increment place in video memory
loop startloop

mov bx, 0
add bx, 36000
mov al, 3
;mov dx, 64000

mov cx, 28000
taskbarloop:
mov [es:bx], al
inc bx
loop taskbarloop

done:
ret

mov ax, 0100h
int 21h
int 20h


    


Hope it helps!
Post 25 Oct 2006, 00:26
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 25 Oct 2006, 00:44
Or you do it like this
Code:
;31 byte fasm starfield        org 100h        use16 start:         mov     al,13h ;mode 13h         int     10h          mov     bx,0xa000 hidden_ret:         mov     es,bx genstar:         in      al,40h                   aaa scroll:         sbb     di,ax         stosb         loop    genstar         mov     ah,1                     int     16h         jnz     hidden_ret + 1         xor     ax,ax                     xchg    al,[es:di]         inc     cx         jmp     scroll              
Post 25 Oct 2006, 00:44
View user's profile Send private message Reply with quote
sylwek32



Joined: 27 Apr 2006
Posts: 339
sylwek32 25 Oct 2006, 00:59
thanks..
i programmed a 32 byte tv-simulator.. (noize)
Post 25 Oct 2006, 00:59
View user's profile Send private message Reply with quote
JapanLover



Joined: 17 Oct 2006
Posts: 8
JapanLover 25 Oct 2006, 01:13
here is a 20byte star field i found on some website thinger...

Code:
org 256
start:
mov al,13h
int 10h
pop sp
pop cx
pop ds
lp1:
pop ax
aaa
lp2:
xchg [di],al
add di,ax
loop lp1
inc di
cbw
inc cx
jmp lp2    


a little busy looking, but still a starfield...

(Dex, your's is prettier =) )
Post 25 Oct 2006, 01:13
View user's profile Send private message Reply with quote
sylwek32



Joined: 27 Apr 2006
Posts: 339
sylwek32 25 Oct 2006, 01:21
try changing mov al,13h to mov al,12h Very Happy
Post 25 Oct 2006, 01:21
View user's profile Send private message Reply with quote
JapanLover



Joined: 17 Oct 2006
Posts: 8
JapanLover 25 Oct 2006, 02:39
sylwek32 wrote:
try changing mov al,13h to mov al,12h Very Happy


ah, much more star like, heh...

i like =)

edit:

got that originally from http://www.df.lth.se/~john_e/fr_gems.html they have a lot of nice stuff that i haven't even looked at...

enjoy =)
Post 25 Oct 2006, 02:39
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.