git clone https://github.com/Wilfred/babyc.git
2. Please go into the folder of babyc and type make.
Back to the old commit
git reset --hard dffc393f3254468acfbb3539c2e0f8c464b40464
3. Start to test compiler which we made.
# Assemble the file. We explicitly assemble as 32-bit
# to avoid confusion on x86_64 machines.
$ as out.s -o out.o --32
# Link the file, again specifying 32-bit.
$ ld -m elf_i386 -s -o out out.o
# Run it!
$ ./out
# What was the return code?
$ echo $?
2
# Woohoo!
Reference:
0 意見:
張貼留言