Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - donvito

Pages: [1]
1
hey all, this is what an hour of tinkering got me...

ps, actually its 30bytes :D



Code: [Select]
org 100h
init:
     les si,[bx]   ;0a000h
     mov al,13h    ;video mode 13h
     int 10h

main:
     mov dx,100
     mov cx,100
     mov al,0
l:
     stosd
     add di,100
     inc al
     loop l

exit:
     in al,60h    ;check keys
     dec al       ;put to 0
     jnz main     ;if not 0, rtn to main
     ret          ;goodbye blue sky

please modify if you'd like, but please comment the code, so i can learn!!!

2
ASM / "not cl/cx" causing lockup
« on: February 23, 2010 »
hey guys, im having a problem with the following bit of code...

this is hacked together from many of the posts and work of others on this site. (im learning :D forgive my sins)

it generates a colored-starry effect, but causes the escape check to fail, any ideas? 

thanks

Code: [Select]
org  100h     ; com file
les si,[bx]   ; ES = 0A000h [video buffer]
mov  dx,03DAh ; DX = v-sync port address
mov al,13h    ; call video mode 13
int 10h

main:in al,dx     ; wait for vertical
     test al,8    ; retrace
     jz   main

draw:and al,ah
     xchg ah,al

     not cl
     xor ax,cx
     and al,ah
     xchg ax,di
     add al,bl
     stosb
     loop draw

exit:in al,60h      ; Escape Pressed? (get keyboard state)
     dec al         ; try to set value to 0
     jnz main       ; If not, go back to main.
     ret            ; if so, exit

3
Hey all,

I have just started to learn C/C++ and I was wondering if one of you kind/elite souls here on the forums could give me some basic Demo-Specific C/C++ tutorials.

I am interested in learning opengl and/or directx.  It would be really neat if anyone could write some really basic tutorials on scrollers or cool oldschool demo/intro stuff.

Thanks a lot guys,
donvito

P.S. I could/have used google of course, but I think it would be cool if I could be in communication with you guys on the forums here, to show progress/ask for help :D


4
Freebasic / EXTREMELY n00b question...
« on: February 29, 2008 »
Hey guys!

First off, GREAT SITE, I've been looking into learning to code old-school style demos for a long long time, and this site is a great resource.

Basically, I'm sure that my question is going to be ridiculously noobish, but I have to ask.

Essentially, I am trying to modify the "line-drawing" code from the second FB tutorial to make a crosshair in the center of the window. 

So far, I've got it centered, and the "left" and "right" of the crosshair, but I cannot get the vertical lines for some reason, I figured it would involve just using Y in place of X and some tweaking, but I can't figure it out.

I know that it writes from left to right, and I think this is my problem.  I feel like such a n00b, but I've never really done any graphics programming before.

heres the code... 

Quote
WHILE(1)
X = 320
Y = 240

FOR A = 0 TO 49
    BUFFER (X + A +(Y*XRES)) = &HFFFFFF
NEXT

FOR A = 0 TO 49
    BUFFER (X - A +(Y*XRES)) = &HFFFFFF
NEXT

FOR A = 0 TO 49
    BUFFER (Y + A +(X*YRES)) = &HFFFFFF
NEXT


I know that the framework can do this for me, but I like to learn the dirty, long way to do things purely because then I fully understand it.

Thanks for your help guys, I'm happy to be a new member to this community. :D


Pages: [1]