0

I suppose to write a grammar file for assembly language program by using Java in ANTLR .. but I don't know from where should I start .. and what should I do.. I am lost..

any expert with this subject could help me :(

I have read a lot but actually there is no time for me to read more.. and I suppose to work now before the dead line.. I am afraid :(

it's 3 years ago since I left Uni.. and I just came back to study..

seems I need a lot of help from U ..

the code what should I write the copiler for is :

SUB R1,R1,0
LD R1,R1,1024
SUB R2,R2,0
LD R2,R2,1025
SUB R3,R3,0
LD R3,R3,1023
MUL R1,R2,0
DIV R1,R3,0
2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by halona
0

I do not think java can access registers directly , assembly compiler basically convert asembly code to machine instructions , not sure whether java can do it.

0

I do not think java can access registers directly , assembly compiler basically convert asembly code to machine instructions , not sure whether java can do it.

to make it simply I 've put the register in array and the memory also in array.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.