Re: Formatting in assembly



Betov wrote:
... but achieving in all cases into bad naming. If this
is "Ascii to EAX", then the Routine Name is "AsciiToEax",
and nothing else.

That's not such a great name either. ;-)

Let's pretend I'm a beginner. What's Ascii? What's Eax? Why are you
changing Ascii to Eax? You assumed that your readers know what Ascii
means, know what Eax means, and why such a conversion is desirable. I
assumed that my readers are familiar enough with programming to figure
out that atoi means ASCII-to-Integer by looking at the context and the
interface.

Your suggested name also implies an implementation. What if for some
reason I decide to change the return value to ebx? I would need to
change the name of the subroutine as well, or risk confusing readers.

That's not to say that my name is any better, but I'm not a fan of the
naming scheme that you (and Windows) advocate. I prefer separating
words with an underscore (ascii_to_integer), and I much prefer keeping
names short enough to type easily. This is a style issue, so I'll have
to disagree that the only "right" name is AsciiToEax and nothing else.

.



Relevant Pages

  • unsigned long -> ascii conversion
    ... into a hex value in ascii, ... but the same trick wont work if i want to convert an unsigned number in EAX ... mov eax,0x200000;the actual number we're going to convert ...
    (comp.lang.asm.x86)
  • Re: Formatting in assembly
    ... What's Eax? ... changing Ascii to Eax? ... You assumed that your readers know what Ascii ...
    (alt.lang.asm)
  • Re: Gawd! i hate computers... ( re: confusing biddles )
    ... There does exist something called ASCII, but it's very limited in what ... Where common characters are preempted with crazy strings...??? ... for readers which replacement for ASCII it's using or the reader in use ... developers to actually use those mechanisms. ...
    (comp.sys.mac.system)
  • RE: EDT: inserting special characters
    ... wanted is that it was just putting a CR (ASCII 13) character into the ... Winner of the 2007 OpenVMS.org Readers' Choice Award for System ...
    (comp.os.vms)