Section Exercises
True or False
The following assembly code shows a correct usage of scanf
:
.text
.input: .asciz "%d"
main:
# prolog
subq $8, %rsp
# ...
leaq input(%rip), %rsi
leaq -8(%rbp), %rdi
movb $0, %al
call scanf
Multiple Choice
Which directive tells the assembler that a string should be placed in a text section as ASCII-encoded characters?
Which format specifiers indicate a signed long, a zero-terminated string and hexadecimal integer?
Last updated