I started reading "Programming from the Ground Up", a free programming book that starts new programmers with assembly, and the first two example programs that I've tried so far didn't run correctly on FreeBSD (but worked on Fedora).
These simple programs store a calculation in an exit code which you can check after running the program. They were exit.s and maximum.s from this page https://github.com/foomur/programming-ground-up
The first program's exit code is supposed to be 0, and the second's 222.
On FreeBSD the first program exited with 64 (in /usr/include/sysexits.h this is defined as: #define EX_USAGE 64 /* command line usage error */ ) and the second with 13.
This is while simply running:
..and similar for maximum.s
Any hints about what I need to change for this book to work on BSD?
Edit: Ok now looking at chapter 11 of the handbook I see there could be some significant differences between Linux and BSD. Not like the first programming language I learned and have been using casually for a few years on both, the bourne shell! Silly me.
These simple programs store a calculation in an exit code which you can check after running the program. They were exit.s and maximum.s from this page https://github.com/foomur/programming-ground-up
The first program's exit code is supposed to be 0, and the second's 222.
On FreeBSD the first program exited with 64 (in /usr/include/sysexits.h this is defined as: #define EX_USAGE 64 /* command line usage error */ ) and the second with 13.
This is while simply running:
as exit.s -o exit.o
ld exit.o -o exit
./exit
echo $?
..and similar for maximum.s
Any hints about what I need to change for this book to work on BSD?
Edit: Ok now looking at chapter 11 of the handbook I see there could be some significant differences between Linux and BSD. Not like the first programming language I learned and have been using casually for a few years on both, the bourne shell! Silly me.