I am writing a .s file in vim. When the string '8d' is written, it is coloured in yellow. Why? Does '8d' have any particular meaning in machine code?
That might depend on the assembler you use, but generally
'this is a string of text to be put into your program'
"This also will be stored as literal bytes."
but both most likely require some sort of directive, to be placed on the left side (before).
StringConstant: dc.b 'Literal string',0
... which is comparable to a "C" definition of a char pointer named "StringConstant" referencing 'Literal string'.