Error in Calculating Section Size with .set Directive in x86_64 Assembly

I am learning to write a bootloader. In the process of converting hexadecimal values to strings in x86 64 assembly on a linux system with an Intel Core i7 processor ,
when I try to assemble this code using as, I encounter the following error:
$ as -o print_bios.o print_bios.S 
print_bios.S: Assembler messages:
print_bios.S: Error: invalid operands (.data and *UND* sections) for `-' when setting `hex_size'

I'm not sure why this error is occurring.
From my source code the .set directive is intended to calculate the size of the .hex_str section. Could you please help me understand the issue and provide a solution?
file0.jpg
Solution
Thanks , been able to fix this :salute:
Was this page helpful?