Next: 8. Using functions and
Up: 7. Statements
Previous: 7.2 Structured statements
An assembler statement allows you to insert assembler code right in your
pascal code.
Assembler statements
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:
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.
root
1999-06-10