From: "Bret Johnson" <bretj...@juno.com> > I double-checked, latest NDISASM still decodes as two separate instructions.
A disassembler would not report two separate instructions unless the actual compiled code had two separate instructions. Every assembler/compiler I know of does little "tricks" to make the programmer's job a little easier (basically, changes subtle/minor things behind your back). They also all seem to do different "tricks" (even in different versions of the same assembler/compiler), so even in ASM you're not really 100% in control of the resulting code. In ASM you're much more in control than you are in any high-level language, though. > The simple answer is that code size is rarely as important as programmer convenience. There are really several different major things that you must balance: program size, memory footprint, speed, and maintainability. "Programmer convenience" is just a subset of maintainability, which also includes things like program structure, language/compiler/assembler/libraries chosen, documentation, and code commenting. Which of the items has the highest precedence depends on circumstances and goals at the time. TSR's and device drivers, e.g., are very different than foreground programs -- memory footprint really matters (a lot) in TSR's and device drivers, though not necessarily so much in foreground programs (at least not in all foreground programs). It also depends on your intended target audience/hardware. Modern CPU's also do all kinds of "tricks" to increase speed (caching, pipelining, branch prediction, virtual machines/CPU's/memory, memory alignment issues, etc.), so code that is faster on a real 8086/8088 CPU may actually be (relatively) slower in a different environment. Looking up clock-cycles-per-CPU-instruction is a guideline, but not the final answer as to how fast something really is. Smaller size tends to equate to faster speed, though that's not absolute. It is true that a smaller memory footprint is more likely to remain in the CPU cache(s) (at least on CPU's that have caches and have them enabled), so a smaller memory footprint always increases speed (or at least the likelihood of speed) in that sense. -- Bret Johnson There is only one place in the universe where 0+0=1. That is in the mind of an evolutionist. ____________________________________________________________ 'Erin' From Happy Days Looks Like Now Is Insane trend-chaser.com http://thirdpartyoffers.juno.com/TGL3141/58ee56e68d39656e6565bst03vuc ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user --- Internet Rex 2.29 * Origin: capcity2.synchro.net - 502/875-8938 (276:10/901) --- Synchronet 3.15a-Linux ListGate 1.3 * Capitol City Online - Frankfort, KY - telnet://capitolcityonline.net ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user