|
|
You can place C-style comments in your code. Just place two forward slashes (//), and anything after that till the end of the line will be ignored. The tokenizer will remove comments and ends of lines from your code as it works, so this means that it will read past ends of lines until it completes an instruction. That is, it treats all white space the same, so you can be indiscriminate in using any kind of white space. This means that things like the following example are legal:
// a single line with a comment at the end mov r1, c[5+a0.x] // comment // can be written as... mov r1 , c [5 // five + // plus the a0 // address register's (can't break up) . x // x element ]
Any errors that are reported when you assemble lines like this might be reported on the line that begins the actual instruciton, not the line that contains the error.
All instructions and register names are case sensitive. This means that all instructions to be used in a DirectX shader have to be lowercase and that register names have to be mixed case exactly as they are described.
Note | You'll occasionally see in early examples the "asm" style comments—a semicolon followed by a comment. This is currently still accepted by the assembler but is not a supported comment type. |
|
|