I need help in writing an assembly language program that reads a line of text from the console, and then parses it into tokens. There are two types of valid tokens: words and numbers. Other kinds of tokens are considered illegal. The output of the program must be a list of tokens, together with their types. Illegal tokens will be accompanied by the word ‘illegal’.
Space is used as separator. Valid words can only contain characters in the ranges a-z or A-Z. Valid numbers can contain the characters 0-9. No periods, no sign.
in the Motorola 68000 Microprocessor's assembly language
SAMPLE RUN
>go 400
Please enter a line of text:
cat dog#2 FLowER n^Yhsa 876 0A
cat : word
dog#2 : Illegal
FLowER : word
n^Yhsa : Illegal
876 : Number
0A : Illegal
Processor halted at: 000466
>
Space is used as separator. Valid words can only contain characters in the ranges a-z or A-Z. Valid numbers can contain the characters 0-9. No periods, no sign.
in the Motorola 68000 Microprocessor's assembly language
SAMPLE RUN
>go 400
Please enter a line of text:
cat dog#2 FLowER n^Yhsa 876 0A
cat : word
dog#2 : Illegal
FLowER : word
n^Yhsa : Illegal
876 : Number
0A : Illegal
Processor halted at: 000466
>