- Sample as follows: EbcTest.cod\r
-===============================================================================\r
-; -- Machine type EFI\r
-; mark_description "Intel(R) C Compiler for EFI Byte Code, Version 1.2 Build 20040123";\r
-; mark_description "XXX";\r
-;ident "Intel(R) C Compiler for EFI Byte Code, Version 1.2 Build 20040123"\r
-;ident "XXX"\r
- .686P\r
- .387\r
-_TEXT SEGMENT PARA PUBLIC USE32 'CODE'\r
-_TEXT ENDS\r
-_DATA SEGMENT PARA PUBLIC USE32 'DATA'\r
- ALIGN 010H\r
-_DATA ENDS\r
-_BSS SEGMENT PARA PUBLIC USE32 'BSS'\r
- ALIGN 010H\r
-_BSS ENDS\r
-_VARBSS SEGMENT PARA PUBLIC USE32 'BSS'\r
- ALIGN 010H\r
-_VARBSS ENDS\r
- ASSUME CS:FLAT,DS:FLAT,SS:FLAT\r
-_DATA SEGMENT PARA PUBLIC USE32 'DATA'\r
-TestVariable2 DD 000000003H,000000000H ; u64\r
-_DATA ENDS\r
-_DATA SEGMENT PARA PUBLIC USE32 'DATA'\r
-_DATA ENDS\r
-_TEXT SEGMENT PARA PUBLIC USE32 'CODE'\r
-; -- Begin EfiMain\r
-; mark_begin;\r
- PUBLIC EfiMain\r
-EfiMain PROC NEAR\r
-$B3$1:; 11a\r
-$LN45:\r
-\r
-;117 ; {\r
-\r
- 0011a 60 00 70 80 MOVqw R0, R0(+0,-112) ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:117\r
-$LN46:\r
-\r
-;118 ; UINT16 test = 0x1234;\r
-\r
- 0011e 77 58 58 00 34\r
- 12 MOVIww @R0(+0,+88), +4660 ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:118\r
-$LN47:\r
-\r
-;121 ; EFI_STATUS Status;\r
-;121 ;\r
-;121 ; SystemTable->ConOut->OutputString (\r
-\r
- 00124 72 87 01 12 MOVnw R7, @R0(+1,+128) ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:121\r
- 00128 72 f7 85 21 MOVnw R7, @R7(+5,+24) ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:121\r
-$LN48:\r
-\r
-;122 ; SystemTable->ConOut,\r
-\r
- 0012c 72 84 01 12 MOVnw R4, @R0(+1,+128) ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:122\r
- 00130 72 c8 85 21 MOVnw @R0, @R4(+5,+24) ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:122\r
- 00134 b9 34 00 00 00\r
- 00 MOVreld R4, __STRING$1 ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:122\r
- 0013a b2 48 01 10 MOVnw @R0(+1,+0), R4 ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:122\r
- 0013e 83 2f 01 00 00\r
- 10 CALLEX @R7(+1,+0) ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:122\r
-$B3$2:; 144\r
-$LN49:\r
-\r
-;125 ; L"Hello EBC Test!\n\r"\r
-;125 ; );\r
-;125 ; EFI_BREAKPOINT ();\r
-\r
- 00144 00 03 BREAK 3 ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:125\r
-$B3$3:; 146\r
-$LN50:\r
-\r
-;126 ; TestVariable1 = 6;\r
-\r
- 00146 b9 37 00 00 00\r
- 00 MOVreld R7, TestVariable1 ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:126\r
- 0014c 78 0f 06 00 MOVInw @R7, (0,6) ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:126\r
-$LN51:\r
-\r
-;127 ; TestSubRoutineSub (1, 5);\r
-\r
- 00150 78 08 01 00 MOVInw @R0, (0,1) ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:127\r
- 00154 78 48 01 10 05\r
- 00 MOVInw @R0(1,0), (0,5) ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:127\r
- 0015a 83 10 00 00 00\r
- 00 CALL TestSubRoutineSub ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:127\r
-$B3$4:; 160\r
-$LN52:\r
-\r
-;129 ;\r
-;129 ; SystemTable->ConOut->OutputString (\r
-\r
- 00160 72 87 01 12 MOVnw R7, @R0(+1,+128) ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:129\r
- 00164 72 f7 85 21 MOVnw R7, @R7(+5,+24) ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:129\r
-$LN53:\r
-\r
-;130 ; SystemTable->ConOut,\r
-\r
- 00168 72 84 01 12 MOVnw R4, @R0(+1,+128) ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:130\r
- 0016c 72 c8 85 21 MOVnw @R0, @R4(+5,+24) ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:130\r
-$LN54:\r
-\r
-;131 ; TestStr\r
-\r
- 00170 b9 34 00 00 00\r
- 00 MOVreld R4, TestStr ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:131\r
- 00176 b2 c8 01 10 MOVnw @R0(+1, +0), @R4 ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:131\r
- 0017a 83 2f 01 00 00\r
- 10 CALLEX @R7(+1,+0) ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:131\r
-$B3$5:; 180\r
-$LN55:\r
-\r
-;134 ; );\r
-;134 ;\r
-;134 ; test = test & 0xFF;\r
-\r
- 00180 de 88 58 00 58\r
- 00 MOVww @R0(+0,+88), @R0(+0,+88) ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:134\r
-$LN56:\r
-\r
-;139 ; if (test != 0x34) {\r
-;139 ; // EFI_BREAKPOINT ();\r
-;139 ; }\r
-;139 ;\r
-;139 ; Status = TestSubRoutine (1, 2, 3, 4, 5, 6, 7, 8, 9, 10);\r
-\r
- 00186 78 08 01 00 MOVInw @R0, (0,1) ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:139\r
- 0018a 78 48 01 10 02\r
- 00 MOVInw @R0(1,0), (0,2) ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:139\r
- 00190 78 48 02 10 03\r
- 00 MOVInw @R0(2,0), (0,3) ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:139\r
- 00196 78 48 03 10 04\r
- 00 MOVInw @R0(3,0), (0,4) ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:139\r
- 0019c 78 48 04 20 05\r
- 00 MOVInw @R0(4,0), (0,5) ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:139\r
- 001a2 78 48 05 20 06\r
- 00 MOVInw @R0(5,0), (0,6) ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:139\r
- 001a8 78 48 06 20 07\r
- 00 MOVInw @R0(6,0), (0,7) ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:139\r
- 001ae 78 48 07 20 08\r
- 00 MOVInw @R0(7,0), (0,8) ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:139\r
- 001b4 78 48 08 20 09\r
- 00 MOVInw @R0(8,0), (0,9) ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:139\r
- 001ba 78 48 09 20 0a\r
- 00 MOVInw @R0(9,0), (0,10) ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:139\r
- 001c0 83 10 00 00 00\r
- 00 CALL TestSubRoutine ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:139\r
-$B3$10:; 1c6\r
- 001c6 b2 78 60 00 MOVnw @R0(+0,+96), R7 ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:139\r
-$B3$6:; 1ca\r
-$LN57:\r
- 001ca f2 88 50 00 60\r
- 00 MOVnw @R0(+0,+80), @R0(+0,+96) ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:139\r
-$LN58:\r
-\r
-;141 ;\r
-;141 ; SystemTable->ConOut->OutputString (\r
-\r
- 001d0 72 87 01 12 MOVnw R7, @R0(+1,+128) ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:141\r
- 001d4 72 f7 85 21 MOVnw R7, @R7(+5,+24) ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:141\r
-$LN59:\r
-\r
-;142 ; SystemTable->ConOut,\r
-\r
- 001d8 72 84 01 12 MOVnw R4, @R0(+1,+128) ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:142\r
- 001dc 72 c8 85 21 MOVnw @R0, @R4(+5,+24) ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:142\r
- 001e0 b9 34 00 00 00\r
- 00 MOVreld R4, __STRING$2 ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:142\r
- 001e6 b2 48 01 10 MOVnw @R0(+1,+0), R4 ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:142\r
- 001ea 83 2f 01 00 00\r
- 10 CALLEX @R7(+1,+0) ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:142\r
-$B3$7:; 1f0\r
-$LN60:\r
-\r
-;146 ; L"Goodbye EBC Test!\n\r"\r
-;146 ; );\r
-;146 ;\r
-;146 ; return Status;\r
-\r
- 001f0 72 87 50 00 MOVnw R7, @R0(+0,+80) ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:146\r
- 001f4 60 00 70 00 MOVqw R0, R0(+0,+112) ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:146\r
- 001f8 04 00 RET ;C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest.c:146\r
-; mark_end;\r
-EfiMain ENDP\r
-_TEXT ENDS\r
-_DATA SEGMENT PARA PUBLIC USE32 'DATA'\r
- DB 3 DUP (0) ; pad\r
-__STRING$2 DW 71 ; u16\r
- DW 111 ; u16\r
- DW 111 ; u16\r
- DW 100 ; u16\r
- DW 98 ; u16\r
- DW 121 ; u16\r
- DW 101 ; u16\r
- DW 32 ; u16\r
- DW 69 ; u16\r
- DW 66 ; u16\r
- DW 67 ; u16\r
- DW 32 ; u16\r
- DW 84 ; u16\r
- DW 101 ; u16\r
- DW 115 ; u16\r
- DW 116 ; u16\r
- DW 33 ; u16\r
- DW 10 ; u16\r
- DW 13 ; u16\r
- DW 0 ; u16\r
-__STRING$1 DW 72 ; u16\r
- DW 101 ; u16\r
- DW 108 ; u16\r
- DW 108 ; u16\r
- DW 111 ; u16\r
- DW 32 ; u16\r
- DW 69 ; u16\r
- DW 66 ; u16\r
- DW 67 ; u16\r
- DW 32 ; u16\r
- DW 84 ; u16\r
- DW 101 ; u16\r
- DW 115 ; u16\r
- DW 116 ; u16\r
- DW 33 ; u16\r
- DW 10 ; u16\r
- DW 13 ; u16\r
- DW 0 ; u16\r
-_DATA ENDS\r
-_DATA SEGMENT PARA PUBLIC USE32 'DATA'\r
-_DATA ENDS\r
-; -- End EfiMain\r
-_DATA SEGMENT PARA PUBLIC USE32 'DATA'\r
-__STRING$0 DW 55 ; u16\r
- DW 56 ; u16\r
- DW 57 ; u16\r
- DW 52 ; u16\r
- DW 53 ; u16\r
- DW 54 ; u16\r
- DW 49 ; u16\r
- DW 50 ; u16\r
- DW 51 ; u16\r
- DW 13 ; u16\r
- DW 10 ; u16\r
- DW 0 ; u16\r
-_DATA ENDS\r
-_VARBSS SEGMENT PARA PUBLIC USE32 'BSS'\r
- PUBLIC TestStr\r
-TestStr DD 2 DUP (?) ; pad\r
- PUBLIC TestVariable1\r
-TestVariable1 DD 2 DUP (?) ; pad\r
-_VARBSS ENDS\r
-_VARBSS_INIT SEGMENT DWORD PUBLIC USE32 'CODE'\r
-; -- Begin varbss_init_C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest$c45b815d2\r
- PUBLIC varbss_init_C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest$c45b815d2\r
-varbss_init_C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest$c45b815d2 PROC NEAR\r
- 00000 b9 34 00 00 00\r
- 00 MOVreld R4, TestStr\r
- 00006 b9 35 00 00 00\r
- 00 MOVreld R5, __STRING$0\r
- 0000c 33 5c MOVnd @R4, R5\r
- 0000e b9 34 00 00 00\r
- 00 MOVreld R4, TestVariable1\r
- 00014 78 0c 04 00 MOVInw @R4, (0,4)\r
- 00018 04 00 RET\r
-; -- End varbss_init_C:\efi_src\TIANO\Edk\Sample\Universal\Ebc\Dxe\EbcTest\EbcTest$c45b815d2\r
-_VARBSS_INIT ENDS\r
-_DATA SEGMENT PARA PUBLIC USE32 'DATA'\r
-_DATA ENDS\r
-EXTRN TestSubRoutineSub:PROC\r
- END\r