Hi,
I encountered an Error during running of the following Assembly Code
#cpuid using C library Functions
.section .data
output:
.asciz "The Processor Vendor ID is '%s'\n"
.section .bss
.lcomm buffer, 12
.section .text
.globl main
main:
movq $0, %rax
cpuid
movq $buffer, %rdi
movq %rbx, (%rdi)
movq %rdx, (%rdi)
movq %rcx, (%rdi)
pushq $buffer
pushq $output
call printf
addq $8, %rsp
pushq $0
call exit
It encountered segmentation fault at the part of C library Calling:call printf It is running in x86_64 mode. Anything I missed out during compiling of x64 code with regards to the c library? Or is there something wrong with the code
Thanks