Author Topic: 3x gfx stuff from me  (Read 4340 times)

0 Members and 1 Guest are viewing this topic.

Offline derpat

  • ZX 81
  • *
  • Posts: 9
  • Karma: 0
    • View Profile
3x gfx stuff from me
« 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



my first project, pixels with changing colors:

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



edit: my newewst addition: different colors:

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.
« Last Edit: July 22, 2013 by derpat »

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2757
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
Re: 3x gfx stuff from me
« Reply #1 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:

Eg.:
Code: [Select]

 mov ah,9
 mov dx,text
 int 0x21

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


Challenge Trophies Won:

Offline derpat

  • ZX 81
  • *
  • Posts: 9
  • Karma: 0
    • View Profile
Re: 3x gfx stuff from me
« Reply #2 on: July 23, 2013 »
Quote

Hi,
Wellcome on board!

Try using int21:

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?

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2757
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
Re: 3x gfx stuff from me
« Reply #3 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.

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
Challenge Trophies Won:

Offline derpat

  • ZX 81
  • *
  • Posts: 9
  • Karma: 0
    • View Profile
Re: 3x gfx stuff from me
« Reply #4 on: August 24, 2013 »
sorry for the late answer, but that works great  ;D
but slowly im running out of ideas for demo coding...

Offline derpat

  • ZX 81
  • *
  • Posts: 9
  • Karma: 0
    • View Profile
Re: 3x gfx stuff from me
« Reply #5 on: August 24, 2013 »
i just done that with the text routine:


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