Task: Carry Flag - Overflow Flag
You will solve these exercises starting from the of.asm, cf.asm and cf_of.asm files located in the tasks/cf-of directory.
Using the add instruction on the al register:
-
Set the
OFflag -
Set the
CFflag -
Set both flags simultaneously.
To test the implementation, enter the tests/ directory and run:
make check
In case of a correct solution, you will get an output such as:
./run_all_tests.sh
test_overflow_flag ........................ passed ... 25
test_carry_flag ........................ passed ... 25
test_carry_and_overflow_flag ........................ passed ... 50
========================================================================
Total: 100/100
If you’re having difficulties solving this exercise, go through this reading material.