Always stayed away from Intel assembly, but thought I'd have a go at running this. First issue was this is I think, Intel format, whereas I was using GNU as, so I had to make a few changes:
Mainly because the assembler I knew I had on my computer was the GNU assembler and it uses that syntax. I did quickly try the .intel_syntax directive but it was just easier to change it around as the code was so short.
Most of my assembler experience is with 6502 or ARM.
A couple online places to try this and where you can play around with this code. The "%" after msg on the last line seems to cause an error, at least for when I tried it with my version of nasm, so I removed it in the below links.
A small website with a few dozen compilers/assemblers, just press F8 or click "Run it" to try the sample above:
section .text
_start:
section .rodata