Referencing Fortran variables
Variables are referenced using the following scheme.
Local dynamic variables are addressed using EBP%.
Non-local dynamic variables are addressed using EBX%.
An argument can only be referenced by its address. For example, in order to load
the argument L into AX% use:
MOV EAX%,=L ;Get address of L
MOVH AX%,[EAX%] ;Load halfword
These rules mean that local variable references may
be indexed by one extra register, and common variables may have two indexing
registers if necessary. For example:
MOV L[EAX%],=0 ;This sets L(3) to 0
Variable references may be offset. For example:
MOVB FOO+3,=32 ;Sets FOO(4:4)=' '
Indices can also contain multipliers of 1 (default),
2, 4, or 8. For example:
ADD [EAX%+ECX%*4], =6