Hi,
SpyderTL wrote:Using ASM was my original plan. But I assumed that the "tools" that were available nowadays were more, um, mature than they were 20 years ago. That turned out to be wrong. Basically I would be developing in NotePad.
That's when I decided to go my own route.
Existing assemblers are part of the reason I first started looking into developing my own tools too; but not because of things like tooltips, etc. One thing I've learnt from using existing assemblers is that, because there's no optimisation done by the assembler, programmers are forced to compromise between code maintainability and performance. I want an optimising assembler (e.g. something that will do constant folding, peephole optimisations and then re-order instructions) so that assembly can be easier to maintain without sacrificing as much performance. Of course once you start looking into things you find lots of additional improvements can be made in the way tools work, and in the way languages are mixed (e.g. C and assembly).
SpyderTL wrote:Brendan wrote:Do you honestly think that (e.g.) auto-complete or tool-tips are helpful for something like "lodsb" for any assembly language programmer that isn't a complete beginner?
Not for the "core" instructions, like MOV and LODSB, but there are a lot more instructions out there that could use some tooltips to help explain what it does and how it is used. Let's try an example... without google or intel manuals, can you tell me how to use the XLATB instruction? Or which instruction to use if I want to convert a short (16-bit) to an int (32-bit)? Or what happens if you set SP to 1 and then PUSHF?
For XLATB, I think it's equivalent to "mov al,[offset+al]" but I'd have to look it up to be sure. For the remaining questions I don't need any manual - to convert (signed) 16-bit integers into (signed) 32-bit integers you'd use "movsx" (for 32-bit code) or "cwd" (for 16-bit code); and setting SP to 1 then doing PUSHF causes a general protection fault (SS segment limit violation) even if you're in real mode.
SpyderTL wrote:Or how about writing ASM for an ARM9 without looking at the documentation? I can do that, and I have autocomplete, intellisense and tooltip documentation, and I didn't have to write my own IDE.
I've never really looked at ARM assembly language - I'd have to start by figuring out what the registers are (how many, what size/s and type/s, etc) and how they're used, and reading an instruction reference to find out which instructions exist and their names. For your assembler I'd have to do the same - when staring at a blank page tooltips do nothing, and autocomplete is worthless if you don't know what you want. Of course even for 80x86 assembly your tooltips and autocomplete would be useless to me because you've changed instruction names and I'd have to re-learn them all.
SpyderTL wrote:Brendan wrote:Seriously; why not post an example of your "XML assembly" code somewhere (like the #asm IRC channel on freenode, or alt.lang.asm newsgroup, or the FASM forums), and ask actual assembly language programmers to comment on the syntax? I'm sure that you'll get important feedback.
(I thought that's what this whole thread was about...
)
The same reason that I don't post ASM code and ask C# developers what they think. Bias.
A language will seem familiar to the person that invented/implemented it because that person spent ages getting used to the language while it was being invented/implemented; even if the language is a hideously unusable nightmare (from everyone else's perspective). This is a trap. It means that the worst person to judge a language is the person that invented/implemented it.
SpyderTL wrote:Brendan wrote:The reverse actually - when there's severe limits on RAM and CPU speed you want to do everything you can to avoid wasting RAM and wasting CPU time.
Yeah, like loading an IDE into memory. Writing keystrokes to a file takes a lot less memory than a program that converts text to bytecodes in real time.
I was referring to usable systems with limited resources (e.g. from the 1980's) rather than primordial ooze from the beginning of time (systems incapable of supporting anything resembling an IDE).
Are you suggesting we should run a massively bloated XML mess on a system with 8 KiB of RAM?
SpyderTL wrote:Brendan wrote:SpyderTL wrote:Who cares if builds take 500 ms longer?
Um, what? You realise 500 ms is half a second?
For my current project; a script builds my own "build utility", then it checks everything and regenerates my any web pages that changed (docs, etc), builds any utilities that changed, uses those utilities to compile anything that needs to be recompiled, and generates a full backup (and manages my backup directory); and this typically takes less than 10 ms. Absolute worst case (everything fully rebuilt entirely from scratch) currently takes 820 ms.
And how many times, per second, do you build?
You're missing the point. Building should be fast enough that it a human can't notice the delay (e.g. less than about 100 ms).
More correctly; it should be possible to run the first few stages of a compiler (all the sanity checking, but none of the optimisation and code generation) extremely quickly. While using an IDE this sanity checking should be run continuously in the background, where the IDE uses the compiler's error messages to highlight errors in your code in real-time (while you type).
You shouldn't have to build things just to get all the compiler's error messages; but this is exactly what I do now - often I build everything several times in a minute just to update a list of error messages, with no intention of using any of the resulting executable code. Sadly, with existing tools I don't have much choice, partly because they're too slow, and partly because some of the errors aren't from the compiler at all (e.g. from linker).
Cheers,
Brendan