Hey all, I'm new to assembley and this forum, I'm currently doing a module on low level programming in my college course. We were given task to make a simple program and I'm trying to make one that does the following:

Loads '50' into the C register and the accumalator, subtract '1' from the accumalator and output the result, then decrement 1 from the C register until '0', if it isnt 0 then loop back to 'subtract '1'' and continue untill C=0. Then halt.

So far I have:

MVI C,$36
LDA A,$36
NXT: MOV A,M
SUI A,$01
DCR C
OUT $FF
JMP NXT
HLT

When I try to assemble this I get rc=5 undefined label on line 3 (NXT: MOV A,M)

I'm really stuck, any help would be greatly appreciated, thanks (I'm sure that alot of this is wrong but its my first attempt and just need pointing in the right direction please, thanks)