While trying to run the first.asm code, I was not able to compile it under x86_64 Linux. GCC will complain citing architecture incompatibility issues. After a little bit of search I found out that ones needs to add the -m32 option to for it to correctly compile (along with installing gcc-multilib and g++-multilib packages before-head)
Also, assembling the asm_io.asm was not mentioned in section 1.4.3, although it is necessary, and it has a caveat where one needs to add the inline macro -d ELF_TYPE, this would only be noticed when reading the comments of the asm_io.asm file. For a beginner, and for his/her very first code, this will hinder a bit, and distract the learner on a quest on the web trying to find a solution.
I have submitted a pull request with some some details on the comments to the asm_io.asm file.
Thanks for the Book Paul, very helpful.
While trying to run the
first.asm
code, I was not able to compile it under x86_64 Linux. GCC will complain citing architecture incompatibility issues. After a little bit of search I found out that ones needs to add the-m32
option to for it to correctly compile (along with installinggcc-multilib
andg++-multilib
packages before-head)Also, assembling the
asm_io.asm
was not mentioned in section 1.4.3, although it is necessary, and it has a caveat where one needs to add the inline macro-d ELF_TYPE
, this would only be noticed when reading the comments of theasm_io.asm
file. For a beginner, and for his/her very first code, this will hinder a bit, and distract the learner on a quest on the web trying to find a solution.I have submitted a pull request with some some details on the comments to the
asm_io.asm
file.