Note that questions related to the exam can be found on a separate page via the exam page, or via this direct link.
IMADA's computer lab and with a very few exceptions I would think all your laptops run a 64 bit OS. However, there is backwards compatibility, so it should be unproblematic to run 32 bit assembler under a 64 bit OS.
Here's my solution: Your compiler itself should be
architecture neutral, i.e., you should not use any
-m32
or -m64
options when you
compile your compiler. In this way, even if your working
on a 32 bit machine, when you transfer to IMADA,
you can still compile, even though we're running 64 bit.
Your assembler code should be compiled using
the -m32
option.
This will work immediately should you be running a 32 bit OS,
and I've arranged that it also works on IMADA's terminal room machines.
If you run 64 bit, it'll likely also just work
— otherwise, install gcc-multilib
.
gcc
the flag -lfl
.
However, this does not seem to be necessary and may give
more problems than it solves.
Among other things, libfl.a
defines a main function.
So if you have defined a main function yourself, it won't compile.
Consider not using that flag.
It shouldn't be necessary when using "%option noyywrap".