pouët.net

the f... assembler again

category: code [glöplog]
 
hi, i lost all my files on my harddrive. i can't get the harddrive to work anymore.
so, i lost tasm and all that crap.

its time to download a new assembler (for x86).

what is the most widely used assembler for dos programs. yes, its just to get back up on assembly programming again.
i know someone suggested fatasm? or something before. i can't remember.
also im considering downloading turbo debugger if i can find it.

pros and cons would be valuable for me to find the right assembler.

added on the 2011-12-09 10:53:26 by rudi rudi
Try YASM. Stable, works on any OS, emits all important debug info formats. Haven't tried it with DOS myself but it's an invaluable tool for everything else here :)
added on the 2011-12-09 11:13:28 by kb_ kb_
graty!
added on the 2011-12-09 11:21:26 by rudi rudi
kb: out of curiosity and given it's a x86/amd64 target only thing, what do you use such an assembler for these days?
added on the 2011-12-09 13:43:13 by superplek superplek
poor man's bin2obj, helper functions to get around libc for small exes, that kind of stuff. :)
added on the 2011-12-09 16:31:10 by kb_ kb_
What About Good ole NASM ?
target=l1om!
sniff.
added on the 2011-12-09 20:00:13 by ryg ryg
Hey! Children might be reading this! Could you use Buttembler instead of the A-word?
added on the 2011-12-09 22:12:48 by Joghurt Joghurt
Joghurt's got Butt-bergers ;P
added on the 2011-12-10 00:24:02 by ringofyre ringofyre
Oh & +1 for Kabel.
added on the 2011-12-10 00:25:07 by ringofyre ringofyre
dos is void, but still using asm for the runtime bypass is sure a pain. isn't there any smaller and better plat indie lib for that yet?
added on the 2011-12-10 01:22:58 by yumeji yumeji
Quote:
cons would be valuable for me

Thanks rudi!

--> Back to topic now ;)
added on the 2011-12-10 01:38:50 by CONS CONS
@ringo: Thanks. :) NASM'ers unite! hehe
am I the only one who likes/uses FASM here? :)
added on the 2011-12-10 04:16:14 by Skate Skate
masm ain't tasm but it *costs* less ;)
@Skate - nasm tends to be a bit easier overall for most architectures/os's, I'm interested to give yasm a go.
added on the 2011-12-10 05:00:21 by ringofyre ringofyre
skate: no :)
thanks for the feedback! i think im gonna try yasm first. but i downloaded tasm, masm and fasm from the cool phatcode site, just for the butt of it.

how about some tips about a good x86 assembler tutorial from good author(s). id like one which describes about arrays and dynamical arrays. id like to know more about the pipeline and memory-flow. for example i would like for example to know how to look up coords from a texture. i forgot but is dup the typical way to initialize a static memory chunk? or is there other ways. also, when i am in tiny mode are there only 64k space for me to use, will it wrap around if i try allocating memory outside the memory space? so theres no way for me to allocate a 256x256 texture in this mode for example? i probably allready know this i just want to be sure.
added on the 2011-12-10 08:53:32 by rudi rudi
For your memory needs under dos you can access directly for example 9000:0000 - 9000:FFFF or 8000:0000 - 8000:FFFF (for example http://pouet.net/prod.php?which=25309 does, see source). Theoretical you can go down to 1000:0000 - 1000:FFFF but most intros I've seen work with segments 8000 and 9000 - this also should be enough space for your 256x256 texture. dup is right. nasm/fasm come with some nifty manual as txt (I don't know about tasm/masm/yasm, never tried them) for the syntax. I can't mention good tutorials (not even bad ones) but maybe someone else can :)
sensenstahl: but in tiny mode are only in one address space, isnt that right? isnt it 0000:0000 to 0000:FFFF? or?
added on the 2011-12-10 10:18:51 by rudi rudi
Start experimenting instead of "where can I read this" and "where can I learn that" because to be brutally honest it's all shit trivial and then some.

Quote:
for example i would like for example to know how to look up coords from a texture.


You mean sampling it? Ever thought it might be (y*xres+x)*bytesperpixel (pitch/stride ignored)? That's two imuls (or the latter can be shift) and an add, or if you're just using power of 2 textures a shift, add and perhaps another shift. Or in case of oldschool 256*256 using 8bit partial registers and then seg:[ax].

Start playing with the COUNTLESS available sources from now and especially the past like I did more than 15 years ago. It's arguably gonna save you some time over countless Pouet posts reiterating the same trivial questions.

sensenstahl has some good info though, that I do admit.
added on the 2011-12-10 16:18:38 by superplek superplek
fakk me. i blew it. of course you use the offset to look up texture. i must have been to vague explaining. but it all comes back to remembering how to use the memory-addressing.
the situation: true. but originally my latter question had to do with the Tiny Model. nothing else. okay. thanks for the info though. now we can end this discussion :)
added on the 2011-12-10 17:51:55 by rudi rudi
rudi: You can access the memory at those segments the same way you write/read on the oh so famous 320*200 vga screen (A000). You don't need to init it and it is not part of your program. I must admit that I don't know the possible problems (overwriting some data of running programs) on a real dos machine from 1990 but if you work under some windows or under dosbox just try it and play around (and even if you work on a real dos machine ... who cares about a crash as long as you saved the source :D )

For asm-sources to look at just grab the lovely intro collection by Pirx at hardcode.untergrund.net :)
I'm not currently playing with these things, but when asked, I'd probably say fasm is the most modern and maintained assembler.
Thers no doubt it ***ing rules.
@rudi - this might be a bit egg-sucking.
added on the 2011-12-10 22:10:29 by ringofyre ringofyre

login