SE250:lab-9:sbha077

From Marks Wiki
Jump to navigation Jump to search

Lab 9 Report

So far I can't quite figure out how to get pretty much anything done. Conflicting ideas running through my head <-- don't help

update (after nearly 1.5 hours?) --> @.@ still lost

Alright, an update several hours later:

After quite a bit of asking around, I kind of discovered that we were getting a tree passed out from OPTION II.

TASK 1

1. Collect all identifiers that appear within the program, and for each one emit code of the form

.globl _ident
_ident:
       .long 0

I output the given parsetree.c as assembly (gcc -S parsetree.c)

.long	_TOK_MUL
	.long	4
	.long	0
	.long	_TOK_DIV
	.long	4
	.long	0

I can't really figure out where to go from here to be honest but I'm guessing we need to do some fiddling around with the code. Not sure if that's going to help but hey, that's just what I think!

TASK 2

TASK 3

TASK 4

Requests and Conclusion

  • A little commenting would help so that we know what's going on...took me the entire lab time to figure out what was going (but I'm still quite lost)
  • A more depth and clarity in the task instructions would be really handy.

I think I've completely failed this lab. I just hoped that given some assembly code in this option, I could maybe (just maybe) manage to learn and understand a bit of Compsys as we're covering similar stuff in that course. However, C'EST UNE CATASTROPHE!! :O.