Posted by wossname on 03:01:00 02-19-2002
WHEN I SHOUT, I WIN!
32 byte demo compo.. in assembly, unless you have the world's greatest c/pascal/etc compiler..
preferably graphics effect, any screen mode, doesn't have to clean up after itself (so long as it doesn't crash while it runs :))
oh yes, in dos of course :) com format.
hoorj... mooglefog out
Posted by KaGez on 12:48:00 02-19-2002
why the hell com format? isn't that M$ DOS only?
[addsig]
Posted by wossname on 21:17:00 02-19-2002
com format, because it has to fit in 32 bytes
even the smallest lunix program needs 42 bytes... and it's no fun..
Posted by wossname on 22:59:00 02-19-2002
first entry (crap, but... ;D)
Code:
; 32woss.asm - pd 2002 wossname
; 32 bytes demo. wheeee
; init. 8 bytes..
_init: mov al, 13 ; 2b
int 0x10 ; 2b
push word 0xA000 ; 3b
pop es ; 1b
; demo loop begins...
_loop: mov cx, 64000 ; 3b
push cx ; 1b
_rand: in ax, 0x41 ; 2b
mov di, ax ; 2b
in ax, 0x41 ; 2b
stosb ; 1b
loop _rand ; 2b
pop cx ; 1b
_effect: mov di, cx ; 2b
dec byte[es:di] ; 2b?
loop _effect ; 2b
jmp short _loop ; 2b
_tag: db 'w' ; 1b =)
odd bars effect.. next one will be better
edit: grrr formatting
[ This Message was edited by: wossname on 2002-02-19 23:02 ]
Posted by sacah on 05:06:00 02-20-2002
Um, how do I compile this code?
I wanted to do a 64byte Demo contest, but I an still learnin Asm, I wana do OpenGL in batch but I just could not figure it out.
So I settled for Asm, do you know where I could get tuts on makin demos, non opengl etc in Asm???
sorry this is non contest related
[ This Message was edited by: sacah on 2002-02-20 05:21 ]
Posted by sacah on 22:59:00 02-20-2002
Nasm was the one I tried, cause it looked like nasm code I use to write way back, but it would not compile for me, what I was meanin above was like a command line parameters that kinda stuff.
(-:
Posted by wossname on 01:57:00 02-21-2002
Ah...
nasm x.asm -o x.com should work with this.. it does for me. it might depend on the version.
Posted by robost86 on 06:30:00 02-21-2002
if it doesn't, add "-f bin":
nasm -f bin file.asm -o file.com
Posted by sacah on 02:32:00 02-22-2002
Thanks so very much for the help.
(-:
Posted by fsvara on 13:06:00 02-22-2002
er, if i may ask, what's a 0x20 demo?
Posted by sacah on 07:32:00 02-24-2002
isent that Hex for 32
and the contest is to write a 32byte demo???
I think thats what it is?
Ps
Im still learning all this low level stuff, when are ppl going to submit more????
[ This Message was edited by: sacah on 2002-02-24 07:33 ]
Posted by robost86 on 16:41:00 02-24-2002
Yes, this is a contest for 32 byte demos. And I'm writing my contribution now...
Posted by fsvara on 19:44:00 02-24-2002
and.. what's a "demo"?
Posted by robost86 on 22:46:00 02-24-2002
A small program that shows the world how leet you are.
Posted by fsvara on 13:37:00 02-25-2002
wow!
then like 90% of all progs i've ever writen are demos
Posted by robost86 on 11:10:00 03-03-2002
I've written my 0x20 demo now. It's a cascade effect (all chars on the screen rain down, until they lay on the bottom in a big stack).
Try to beat that!
http://ostling.no-ip.com/files/demos/32.asm
Posted by geqo on 19:42:00 03-04-2002
HAHA! Watch this nice effect!
Code:
org 0x100
mov al, 0x13
int 0x10
mov ax, 0xa000
mov es, ax
l:
add byte [es:di], bl
sub byte [es:si], bl
inc bl
inc di
dec si
mov ah, 1
int 0x16
jz l
ret
and [bx+si],ah
a32 gs
db 0x71
outsw
Posted by wossname on 20:51:00 03-04-2002
Grrr. A warm up. Next one will kick yer demos arse, mate.
Code:
; matrix.asm - 0x20 demo compo
; pd 2002 wossname
[org 0x100]
; 8b init code
_init: mov al, 0x13
int 0x10
push word 0xA000
pop es
; the matrix!
_loop: stosb
in ax, 0x41
and al, 10b
mov cx, di
and cl, 8
jnz _loop
inc di
inc di
jmp short _loop
; vanity.
_tag: db 'wossname'
[ This Message was edited by: wossname on 2002-03-04 20:58 ]
Posted by robost86 on 07:27:00 03-05-2002
I wrote a little nice thing at home, I'll post it after school
Posted by robost86 on 09:18:00 03-05-2002
geqo: your demo didn't work here at school
Hah!
(Can we disqualify him now, woss?)
Posted by robost86 on 09:24:00 03-05-2002
org 0x100
mov al,0x13
int 0x10
mov ah,0xa0
mov ds,ax
pal:
mov dx,0x3c8
out dx,al
inc dx
xchg ax,bx
out dx,al
out dx,al
xchg ax,bx
out dx,al
inc ax
loop pal
xor si,si
dec si
main:
adc byte[bx],bl
adc byte[si],bl
dec si
inc bx
jmp short main
That works here in school too (had to set si to -1)
Posted by fsvara on 15:05:00 03-05-2002
robert: what's the difference between your school computers and the ones at home?
Posted by robost86 on 15:30:00 03-05-2002
They run NT4
And since all small demos use non-standard stuff (like assuming start values of some register), that can cause errors.
Posted by nonama on 13:30:00 03-11-2002
mov al, 0x13
int 0x10
mov ah,0xa0
mov es,ax
mov di,0
mov al,0
fill:
add byte [es:di], al
inc di
loop fill
sub di,160
inc ax
mov cx,320
jmp short fill
enjoy....
Posted by inhahe on 01:49:00 09-21-2003
totally lost on how robost86's 30-line program makes a 32-byte com and my 22-line program makes a 39-byte com, but here it is. i don't qualify for the challenge but it's a great effect. would be better slowed down.
org 100h
push word 0xA000
pop es
mov al, 13h
int 10h
here:
mov al, bl
xor al, bh
add al, cl
stosb
add bl, 1
jnc here
add di, 320-256
inc bh
cmp bh, 200
jne here
xor bx, bx
xor di, di
inc cl
jmp short here
[ This Message was edited by: inhahe on 2003-09-21 01:50 ]