home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.asm.x86      Ahh, the lost art of x86 assembly      4,675 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 3,720 of 4,675   
   Alex McDonald to Rick C. Hodgin   
   Re: String literals in asm source code   
   31 Dec 18 10:51:49   
   
   From: alex@nospicedham.rivadpm.com   
      
   On 30-Dec-18 23:31, Rick C. Hodgin wrote:   
   > On 12/21/2018 2:49 PM, James Harris wrote:   
   >> What's the most readable way to include string literals in asm source   
   >> code?   
   >   
   > In assembly, it's important to have readability for maintenance, but you   
   > often use assembly code for a reason.   
   >   
   > If you intermix data and code you'll be polluting the instruction cache   
   > with unnecessary data that's not needed.   
      
   How so? The literals are assembled out of line of the code.   
      
   >   
   >> Of course, code layout is not a major issue but it is one of   
   >> convenience; and readability is important. So I wondered what other   
   >> people do to incorporate strings in code. What have you found to be   
   >> the most readable and easiest to work with?   
   >   
   > My advice is if you need true readability, create a tool that will   
   > allow you to write source code in a nice format, and then translate   
   > your source code to a form that is conducive to the needs of the CPU   
   > you're writing code for.   
   >   
   > Make it look the way you'd like to see it, but then have the tool   
   > translate it to the needs of the machine.   
   >   
      
   In other words, use an assembler or compiler with good programmer   
   facilities. Preprocessors are a nuisance, especially macro driven beasts   
   like m4. The idea is to simplify, the outcome is complexity.   
      
      
   --   
   Alex   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca