News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

difference between chr$ and SADD

Started by Posit, May 11, 2005, 06:45:19 PM

Previous topic - Next topic

Posit

Greetings all. I am a CS grad student, and have decided that learning masm will a good summer project (among others, of course). These forums certainly look like the place for discussion of all things masm, and I'm sure to have a limitless supply of questions, although a lot of them have been answered by the great resource pages that Hutch and others here have put together.

My first question is this: What is the difference between chr$ and SADD when using the print macro? Playing around with the 'hello world' console examples, I can see no difference.


Nilrem

I'm not too sure but just by looking at the name wouldn't SADD only do string address (i.e. variables)? chr$ been able to do text outside of a variable.

hutch--

Posit,

It is close to a duplication. The SADD (string address) macro was written first but later I did a lot more work on string macros and tried to ensure that the naming was consistent across the string macros and rather than modify an existing one that was already in use, I near duplicated the new one instead so there was no conflict.

Ypou can have a look at both macros in the macros.asm file in the macros directory of MASM32. This is the virtue of providing the source code so everyone knows how it works.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php