Dark Bit Factory & Gravity

GENERAL => Projects => Topic started by: derpat on July 22, 2013

Title: 3x gfx stuff from me
Post by: derpat on July 22, 2013
hi,
i just started asm some day ago and want hear your opinion.



i tried to paint some letters in asm, but its very difficult and it needs alot of math, someone know a easier way?
heres the file:

http://www.speedshare.org/download.php?id=4CAEDDDE1 (http://www.speedshare.org/download.php?id=4CAEDDDE1)



my first project, pixels with changing colors:

http://www.speedshare.org/download.php?id=49EFEE2E1 (http://www.speedshare.org/download.php?id=49EFEE2E1)



and my last, just changing colors go from left to right:

http://www.speedshare.org/download.php?id=5F1FD32E1 (http://www.speedshare.org/download.php?id=5F1FD32E1)



edit: my newewst addition: different colors:

http://speedshare.org/download.php?id=AFFC9DA41 (http://speedshare.org/download.php?id=AFFC9DA41)

how do you like it? if you want i can upload the source too...
you need dosbox to run the files.
Title: Re: 3x gfx stuff from me
Post by: Rbz on July 22, 2013
hi,
i just started asm some day ago and want hear your opinion.



i tried to paint some letters in asm, but its very difficult and it needs alot of math, someone know a easier way?
heres the file:


Hi,
Wellcome on board!

Try using int21 (http://stanislavs.org/helppc/int_21-9.html):

Eg.:
Code: [Select]

 mov ah,9
 mov dx,text
 int 0x21

text db 'http://www.dbfinteractive.com/',0x24


Title: Re: 3x gfx stuff from me
Post by: derpat on July 23, 2013
Quote

Hi,
Wellcome on board!

Try using int21 (http://stanislavs.org/helppc/int_21-9.html):

Eg.:
Code: [Select]

 mov ah,9
 mov dx,text
 int 0x21

text db 'http://www.dbfinteractive.com/',0x24


when i try this in my sourcecode, the program just crashes.
heres my sourcecode:
Code: [Select]
org 0x100
mov ax,13h
int 10h
  mov ah,0Ch
  mov al,0
  mov cx,1
  mov dx,0
int 10h
jmp go
go:
inc dx
inc cx
int 10h
cmp dx,+50
jne go
je go2
go2:
inc al
mov ah,9
mov dx,text
int 21h
jmp go
text db 'http://www.dbfinteractive.com/',0x24

any idea why?
Title: Re: 3x gfx stuff from me
Post by: Rbz on July 24, 2013
I don't really understand your code, anyway here one example for you to test.
I'm supposing you are using fasm (http://flatassembler.net/index.php).

Code: [Select]
org 0x100

;----------------VGA mode X - 320x200x256k
mov al,0x13
int 0x10

;----------------write our text
 mov     ah,0x02      ;
 mov     bh,0         ;
 mov     dx,0x0105    ;
 int     0x10         ; cursor position
 mov     ah,9            ;
 mov     dx,text         ;
 int     0x21            ; draw text


;--------------------------------------------------


;----------------Main program loop
Main:

; your code here


;----------------Loop (While not Escape key)
key:
 in   al,0x60
 cbw
 dec  ax
 jnz  Main

;----------------Return to text mode
mov   al,0x03
int   0x10
ret

text db 'http://www.dbfinteractive.com/',0x24
Title: Re: 3x gfx stuff from me
Post by: derpat on August 24, 2013
sorry for the late answer, but that works great  ;D
but slowly im running out of ideas for demo coding...
Title: Re: 3x gfx stuff from me
Post by: derpat on August 24, 2013
i just done that with the text routine:


http://www.youtube.com/watch?v=QbkcrKSrxqk (http://www.youtube.com/watch?v=QbkcrKSrxqk)