In 8080 Assembler M
is the memory referenced to by HL
.
Depending on the assembler used this would be written as
ADD M
(Original Intel 8080 syntax) or
ADD A,M
(Later Intel syntax as used for example by CP/M's own ASM (*1))
The Z80 assembler equivalent would be
ADD A,(HL)
(Zilog notation)
Are you sure the source you're compiling made for the Z80 (and a Z80 assembler) at all?
CP/M is by default written in 8080 Assembly, not Z80 or any other substitute. It would make sense that the source you got is meant to be compiled with ASM, as this was the default assembler for CP/M. It would be unusual if it's formatted for any later (Z80) assembler.
Wiki got some condensed remarks about the changes Zilog made to the 8080 Assembly Syntax, like the usage of full register as you might have expected in this example. DR's ASM was an inbetween product, adhering (mostly) to Intel syntax while supporting the Z80 as well.
*1 - Later assemblers where often able to compile 8080 as well as Z80 but using 8080 notation.
(HL)
memory access or direct 8/16 bit constantN
orNN
... but my bet is the(HL)
. It also could be some MacroLD A,M
is actually 8080 syntax, not Z80.