beautypg.com

2 external, External – Avago Technologies LSI53C1010 User Manual

Page 143

background image

NASM Output File Examples

5-5

.

5.2.2 External

The External section contains the external variable records, if any were
declared. First, is the External Header Record which contains:

Table 5.1

Relationship Between Entry and PROC Statements and Output File

Source

Output File

typedef unsigned long ULONG;

Entry MAIN

#define ENT_MAIN 0x00000000L

Entry CLEAR_A

#define ENT_CLEAR_A 0x00000018L

Entry INC_A

#define ENT_INC_A 0x00000040L

PROC MAIN:

ULONG MAIN[] = {

call CLEAR_A

0x88080000L, 0x00000018L,

call INC_A

0x88080000L, 0x00000040L,

call INC_A

0x88080000L, 0x00000040L,

};

PROC CLEAR_A:

ULONG CLEAR_A[] = {

move SCRATCHA0 & 00 to SCRATCHA0

0x7C340000L, 0x00000000L,

move SCRATCHA1 & 00 to SCRATCHA1

0x7C350000L, 0x00000000L,

move SCRATCHA2 & 00 to SCRATCHA2

0x7C360000L, 0x00000000L,

move SCRATCHA3 & 00 to SCRATCHA3

0x7C370000L, 0x00000000L,

return;

0x90080000L, 0x00000000L

INC_A:

move SCRATCHA0 + 1 to SCRATCHA0

0x7E340100L, 0x00000000L,

return, if NOT Carry;

0x90200000L, 0x00000000L,

move SCRATCHA1 + 1 to SCRATCHA1

0x7E350100L, 0x00000000L,

return, if NOT Carry;

0x90200000L, 0x00000000L,

move SCRATCHA2 + 1 to SCRATCHA2

0x7E360100L, 0x00000000L,

return, if NOT Carry;

0x90200000L, 0x00000000L,

move SCRATCHA3 + 1 to SCRATCHA3

0x7E370100L, 0x00000000L,

return;

0x90080000L, 0x00000000L

};

This manual is related to the following products: