More information about assembler blocks can be found in the Programmers' guide. The register list is used to indicate the registers that are modified by an assembler statement in your code. The compiler stores certain results in the registers. If you modify the registers in an assembler statement, the compiler should, sometimes, be told about it. The registers are denoted with their Intel names for the I386 processor, i.e., 'EAX', 'ESI' etc... As an example, consider the following assembler code:
Assembler statements
![]()
![]()
asm Movl $1,%ebx Movl $0,%eax addl %eax,%ebx end; ['EAX','EBX'];This will tell the compiler that it should save and restore the contents of the EAX and EBX registers when it encounters this asm statement.