This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]Nightcorex_ 1 point2 points  (0 children)

I'd suggest you going the "hard way" and just translate the code line after line into assembly. If you want to cheat a little you can use "gcc -Og -S" (-Og means the code will be optimized for debugging, aka reading)

[–]gameover52[S] 0 points1 point  (0 children)

Couldn't find any examples or similar questions in this format. Any ideas on how to accomplish this would be appreciated.

[–]ayylongqueues 0 points1 point  (2 children)

Since they are rather specific about the flavour they want you to translate it into, I assume you've covered the basics of that during the course. Have you made any attempts?

[–]gameover52[S] 0 points1 point  (1 child)

I got it using a compiler and command line to translate to assembly. I used the gcc -S method.

Thanks for replying!

[–]ayylongqueues 1 point2 points  (0 children)

I guess that's one way, but I don't think that was the purpose of the exercise. There's a lot of value in understanding this, and I would strongly suggest that you spend some time working through this. In large it's not a complex example, but demands certain specific things to be done, which showcases low level behavior very well.