Seriously stuck here
I have to build an assembler and I'm getting stuck on the first bit :-(
I need to read each line of the input file. i.e
CHECKCode:loop: add $1,$1,$1 b loop
Then discard comments any comments and removing leading or whitespace: CHECK
Tokenise the line into instruction mnemonics, operands, labels and so on. - This is where I'm stuck. What does this even mean?
Recognise invalid instructions, invalid operands and so on. - I reckon I can do this, but after the previous stage.
Maybe I'm being a bit vague here but I would really appreciate a push in the right direction if anyone could give me one. I don't necessarily need any code... just some way of doing it.
Many thanks.