assembly .set directive gives error invalid operands (.data and *UND* sections)
问题 I am learning to write a bootloader. As a part of experiment, I want to be able to print hexadecimal values as strings. I wrote following assembly code which doesn't entirely implement hex to string functionality. However, I expected following code to at least assemble correctly. $ cat print_bios.S .file "print_bios.S" .section .data .hex_str: .ascii "xxxxxxxxxxxxxxxx" .set hex_size, .-hex_str .section .text .global .hex_to_string hex_to_string: push %rbp mov %rsp, %rbp /* * leave speace for