Abstract
A variadic function is a function that takes a variable number of arguments. A good example is printf. Remember, in Linux assembly, when we use printf with xmm registers, the convention is that rax contains the number of xmm registers that printf has to use. This number can also be retrieved from the printf format instruction, so often you can get away without using rax. For example, the following format indicates that we want to print four floating-point values, each with nine decimals:
fmt db "%.f",9,"%.f",9, "%.f",9,"%.f",10,0
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2019 Jo Van Hoey
About this chapter
Cite this chapter
Van Hoey, J. (2019). Variadic Functions. In: Beginning x64 Assembly Programming. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-5076-1_42
Download citation
DOI: https://doi.org/10.1007/978-1-4842-5076-1_42
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-5075-4
Online ISBN: 978-1-4842-5076-1
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books