Dark Bit Factory & Gravity
PROGRAMMING => Other languages => ASM => Topic started by: Rbz on May 07, 2006
-
I found a webpage with some good tutorials about asm:
http://www.dd.chalmers.se/~f99laan/3d/download.html (http://www.dd.chalmers.se/~f99laan/3d/download.html)
Take a look at "General graphics tutorials..." section.
The tutorial by Adam's is very good, one of the best.
http://www.dd.chalmers.se/~f99laan/3d/www-download/asmtuts.zip (http://www.dd.chalmers.se/~f99laan/3d/www-download/asmtuts.zip)
Enjoy :)
[Edited: Attached asmtuts.zip to this post]
-
Thanks for the links!
What assembler do you use for your tiny stuff?
I wouldn't mind having a go at making something.
-
@Shockie: You might be able to do some of them with the inline ASM in FreeBasic dude.
Cheers for the links Rbraz buddy :D
-
For 1K tentacle I have used T0A - The 0ok Assembler by Null OK (http://www.pouet.net/prod.php?which=18796), its nice and simple assembler capable to compress the final executable.
But now I'm using Flat Assembler (http://flatassembler.net/) much better and friendly, FASM have a simple IDE that help alot when you need to find errors in your code.
And they are free!
-
Thanks mate, I'll use the flat assembler I think.
-
Thanks for the links Rbraz, I'm giving FASM a shot right now, following the tutorial. ASM is pretty tricky but I'm starting to get the hang of it :)
-
No problem dude :)
I found another tutorial that will help with fasm.
http://sulaiman.netadvant.com/sulaiman.zip
The autor (http://sulaiman.netadvant.com/) have translated some of the Iczelion's Assembly Tutorial (http://win32assembly.online.fr/files/icz-tuts.zip) into fasm.
Enjoy!
[Edited: Attached sulaiman.zip to this post]
-
rbraz, what do you think of MASM32?
-
Isn't Masm the assembler that imitates C style instructions?
I don't know anything about it, except that if you were looking to write some 1kb style stuff, that T0A is probably the one to go for, I think that's what Rbraz used to write Tentacle.
Then again, it is possible to write some very small stuff using C.
http://www.intro-inferno.com/production.php?id=1688
Shows a 256byte C program, although it is said that the same program is possible in 128b with asm. But it does go to show that you don't necessarily need to use asm to get a small file.
-
Yes MASM has some C style instructions that are the equivalent of jmp and cmp etc (so no loss in speed).
I'm looking to have a go at assembly for speed, compactness and because it's something I haven't done before! I'm not too bothered about fitting everything into 1K - I was just impressed by the 1K demo.
[Edit]
After a quick test FASM seems easier to use.
-
Any questions you get, please feel free to post them, there are at least half a dozen people here who will be able to help with most stuff.
-
Cool. I'm coding in Cobra mainly - but I'm definitely looking to try and get something running in asm.
-
rbraz, what do you think of MASM32?
Hello Steve, welcome aboard!
I use MASM32 too, it's really good choice, you can emulate "High Level Syntax" (.if .else .while .repeat etc..) that make your code more readable.
You can try FASM, I just love it, very simple IDE to use that help a lot, you can make Windows or DOS (16 / 32 / 64 bits) programs.
All my others 1kb are coded in FASM.
:cheers:
-
Thanks rbraz - have you written any tutorials here? I think the basics of assembly are ok - but the graphics and sound need a few tutorials to help a noob.
Have you seen the San Angeles Observation 4K demo? That's a really inspiring demo which uses Opengl and asm like your 1K demo.
-
have you written any tutorials here?
No, sorry, I'm bad writing tutorials, but I can help if you got stuck with something
Have you seen the San Angeles Observation 4K demo?
Yeah, really good
Here's one that use directx -> http://www.pouet.net/prod.php?which=29823
-
That demo doesn't work rbraz - it gives an error as you click on the program.
-
Shame, hitch's demo works on here.
Maybe you need to update your directx?
Anyway, there are lots of examples of small intros if you can't get this to work so I wouldn't worry.
-
By the way Steve, I was thinking about sound in assembler, you could use ufmod, it's really small and it has the capability to work with Masm and fasm.
ufmod (http://ufmod.sourceforge.net/Win32/en.htm)
If you are going to try and make sound in a 1kb or a 4kb, you'll have to write some kind of synth.
Saida posted a 1kb softsynth in masm here;
Saida's Synth. (http://dbfinteractive.com/index.php?topic=643.0)
Also, this may be of interest to you as well.
Speech in 1kb (http://dbfinteractive.com/index.php?topic=645.0)
Again by Saida.
Sorry I didn't think of these last night, I was brain dead from too much celebrity tv.
-
Thanks Shockwave - just need some spare time to get my head around it all now.
-
:P
-
This has proven invaluable to me its an interrupt list
http://www.ctyme.com/intr/int.htm
check it out it has em all (I think) its easy to navigate and has links to similar interrupts
-
Rbraz,
I'm going through one of the tutorials you suggested step by step and its very good so firstly, thankyou. Now obviously the next thing is to code something in anger, I'm not a proud man (in this way) so I am happy to work from existing code and adapt. My question therefore is would I find most examles in MASM or in FASM.
Also when you say OOk asm can compress - are we talking compressing 4ks or 256b intros - which I thought nobody compresses (am I wrong)? Can you clarify a bit here please?
Thanks,
Taj
-
Watch this!!
http://oopweb.com/Assembly/Documents/asm/Volume/asm.htm
http://www.tuts4you.com/forum/index.php?showtopic=10603
Cheers energy
-
...
My question therefore is would I find most examles in MASM or in FASM.
...
If I remember correctly those examples are coded in TASM, but it's easy to recode to FASM or MASM, in fact it's a good exercise to recode those examples.
Also when you say OOk asm can compress - are we talking compressing 4ks or 256b intros - which I thought nobody compresses (am I wrong)? Can you clarify a bit here please?
T0A is a really good assembler for democoding, too bad there's not much material to learn from or manual. And yes, you can compress your win32 bits exe or 16 bits com file, check this out:
.CPU 386
.BITS 16
.ENTRYPOINT
mov al,13h
int 10h
push 0a000h ; Vga memory
pop es
;-------------Write text
mov ah,02h
mov bh,00h
mov dx,0A0Dh
int 10h
mov ah,9
mov dx,text
int 21h
Main:
;-------------Loop (While not key hit)
mov ah,01
int 16h
jz Main
;-------------Return to text mode
mov al,03h
int 10h
;-------------Exit to DOS
mov ax,4c00h
int 21h
text:
db 'A','S','M',' ','R','u','l','e','z',' ',':',')',24hCompile with:
t0a test1.asm +com
Now if you add some more data, in the end of you prog, for example:
db 'A','S','M',' ','R','u','l','e','z',' ',':',')',24hRepeat it for 50 times and compile with:
t0a test1.asm +comCheck file size, and now compile it with:
t0a test1.asm +com +compress
As you can see your com file will be compressed, but if I remember correctly this isn't allowed in 256 bytes democoding, you know, the demoscene purists :)
-
Haha , Dos Rulez :D :)
Rasters bars for the next ? :D
It's goodtime ! ;D :P