From: Frank K. <fbk...@at...> - 2002-11-23 14:18:10
|
Hi Ben! I've been good. If I were any lazier, I wouldn't have ambition enough to breath, but enjoying it :) > bits_32 > > This should have returned syntax error or something, right? Well, maybe. We saw another "bug-report" recently - same thing, but with "bits32". If you said "bits 33", Nasm would complain, but it thinks anything "one word" that it doesn't recognize as "one of its own" must be a label. Nasm doesn't require a colon after a label - can be set to warn about "label alone on a line without a colon" ("-w+orphan-labels" on the command-line, or "[warning +orphan-labels]" in the code), but the warning is off by default. The unix-folk, in particular, like it to "shut up and assemble". I've been caught by it myself. Typed "sct" or something, when I meant "stc". The carry-flag was set anyway if I got to that part of the code (I was "just making sure"), so I didn't notice anything until someone asked me what "sct" was. More recently, someone posted code with "------..." as a "separator". I use ";---------" often, so didn't notice no semicolon. Nasm took it as a label - no problem, but it was outside of any named section, so Nasm made up a default - 16-bit - section for it. The 32-bit linker didn't like it "1-bit"!!! I went absolutely apeshit over that one - modified Nasm to get rid of it, and everything! I didn't notice the problem until I was in the middle of posting a response to it - I think I posted it anyway, even tho I made an ass of myself (mov ax, ax :). So I think it probably would have been smarter to do it differently - either require a colon, or at least have the warning "on" by default. It would be easy enough to change, but would probably require changes to a lot of existing code - or at least to makefiles - to get Nasm to "shut up", so it may not be a desireable change at this point. In the case of "bits...", which seems to be a particular problem ("use32" *doesn't* want a space, so it can be confusing), it would be possible to make "bits32", and maybe "bits_32", an alias for "bits 32" (and the same for 16, I suppose). I guess I'll cc this to the list (Hi, List!) to see if anyone thinks this would be a good (or bad) idea. Thanks for the feedback on that. I confess I haven't kept up with your recent progress with NBASM, so I can't return the favor. Hope it's going well. Starting to snow here, so I'd better go and get some wood in. Always good to hear from you! Best, Frank |