EuroAssembler Index Manual Download Source Macros


Sitemap Links Forum Tests Projects

Test t7412: Compile LIBCOF import library linking DLL 32bit Win


Description
Test creates linkable 32bit LIBCOF file t7412.lib from linkable 32bit DLL module.
See also
LinkerCombinations  
Tested procedures
PflibcofCompile   PfdllLoadPgm  
Source & expected listing t7412.htm.lst
| | EUROASM DEBUG=OFF,PROFILE=OFF,AUTOSEGMENT=ON,LIST=ON, \ | | DUMP=ON,DUMPWIDTH=25,DUMPALL=OFF,CPU=386 | |;; | |t7412L PROGRAM FORMAT=DLL,MODEL=FLAT,WIDTH=32, \ | | ICONFILE=,LISTMAP=ON,LISTGLOBALS=ON | | EXPORT Write.W32, Beep.W32, Exit.W32 |[.text] ::::Section changed. |00000000: |Write.W32: PROC ; Write ASCIIZ string DS:ESI in 32bit Windows. | | IMPORT GetStdHandle:,WriteFile: ; Use imported Windows kernel functions. |00000000:6AF5 | PUSH -11 ; %1 Identifier of standard output STD_OUTPUT_HANDLE. |00000002:E8(00000000) | CALL GetStdHandle: ; Stdcall the imported Windows function with 1 argument. |00000007:89C3 | MOV EBX,EAX ; Save the returned StdOutput handle to EBX. |00000009:89F7 | MOV EDI,ESI ; Use EDI to find the end of input string. |0000000B:31C9 | XOR ECX,ECX ; Use ECX to keep the size of input string. |0000000D:31C0 | XOR EAX,EAX ; Zero AL, the searched character. |0000000F:F7D1 | NOT ECX ; Assume unlimited possible string size. |00000011:F2AE | REPNE SCASB ; Find the zero terminator. |00000013:F7D1 | NOT ECX ; Get string size to ECX. |00000015:52 | PUSH EDX ; Alloc temporary DWORD memory variable on stack. |00000016:89E2 | MOV EDX,ESP ; Get address of DWORD room to EDX. |00000018:50 | PUSH EAX ; %5 No overlap of WriteFile. |00000019:52 | PUSH EDX ; %4 Memory variable for number of bytes. |0000001A:51 | PUSH ECX ; %3 String size. |0000001B:56 | PUSH ESI ; %2 String address. |0000001C:53 | PUSH EBX ; %1 Standard output file handle. |0000001D:E8(00000000) | CALL WriteFile: ; Stdcall the imported function with 5 arguments. |00000022:5A | POP EDX ; Free and discard the temporary room on stack. |00000023:C3 | RET ; Return to caller. |00000024: | ENDPROC Write.W32: |00000024: |Beep.W32: PROC ; Play a sound in 32bit Windows. | | IMPORT Beep: ; Use imported Windows kernel function. |00000024:68C8000000 | PUSH 200 ; %2 Sound duration [ms]. |00000029:68B8010000 | PUSH 440 ; %1 Sound frequency [Hz]. |0000002E:E8(00000000) | CALL Beep: ; Stdcall the imported function with 2 arguments. |00000033:6890010000 | PUSH 400 ; %2 Sound duration [ms]. |00000038:684B020000 | PUSH 587 ; %1 Sound frequency [Hz]. |0000003D:E8(00000000) | CALL Beep: ; Stdcall the imported function with 2 arguments. |00000042:C3 | RET ; Return to caller. |00000043: | ENDPROC Beep.W32: |00000043: |Exit.W32: PROC ; Terminate program in 32bit Windows. | | IMPORT ExitProcess: ; Use imported Windows kernel function. |00000043:6A00 | PUSH 0 ; %1 Terminate with errorlevel 0. |00000045:E9(00000000) | JMP ExitProcess: ; Use imported function with 1 argument. |0000004A: | ENDPROC Exit.W32: | |ENDPROGRAM t7412L | **** ListMap "t7412L.dll",groups=0,segments=4,entry=,stack= | [.text],VA=10001000h,size=0000004Ah=74,width=32,align=1000h,purpose=CODE | [.idata],VA=10002000h,size=000000ABh=171,width=32,align=8,purpose=IMPORT+IAT | [.edata],VA=10003000h,size=0000006Dh=109,width=0,align=8,purpose=EXPORT | [.reloc],VA=10004000h,size=00000010h=16,width=32,align=4,purpose=BASERELOC | **** ListGlobals "t7412L.dll",Global=0,Public=0,Extern=0,eXport=3,Import=4 | Beep,[.idata]:0000009Dh,VA=1000209Dh,scope='I',lib="kernel32.dll" | Beep.W32,[.text]:00000024h,VA=10001024h,scope='X' | Exit.W32,[.text]:00000043h,VA=10001043h,scope='X' | ExitProcess,[.idata]:000000A4h,VA=100020A4h,scope='I',lib="kernel32.dll" | GetStdHandle,[.idata]:0000008Fh,VA=1000208Fh,scope='I',lib="kernel32.dll" | Write.W32,[.text]:00000000h,VA=10001000h,scope='X' | WriteFile,[.idata]:00000096h,VA=10002096h,scope='I',lib="kernel32.dll" | |;; | |t7412 PROGRAM FORMAT=LIBCOF,MODEL=FLAT,WIDTH=32, \ | | LISTMAP=OFF,LISTGLOBALS=OFF | | IMPORT Write.W32,Beep.W32,Exit.W32, LIB=t7412L.dll | |ENDPROGRAM t7412
Expected messages t7412.out
I0180 Assembling source file "t7412.htm". I0270 Assembling source "t7412". I0310 Assembling source pass 1. I0330 Assembling source pass 2 - final. I0470 Assembling program "t7412L". "t7412.htm"{62} I0510 Assembling program pass 1. "t7412.htm"{62} I0510 Assembling program pass 2. "t7412.htm"{62} I0530 Assembling program pass 3 - final. "t7412.htm"{62} I0660 32bit FLAT DLL file "t7412L.dll" created, size=2576. "t7412.htm"{103} I0650 Program "t7412L" assembled in 3 passes with errorlevel 0. "t7412.htm"{103} I0470 Assembling program "t7412". "t7412.htm"{118} I0510 Assembling program pass 1. "t7412.htm"{118} I0510 Assembling program pass 2. "t7412.htm"{118} I0530 Assembling program pass 3 - final. "t7412.htm"{118} I0660 32bit FLAT LIBCOF file "t7412.lib" created, size=590. "t7412.htm"{121} I0650 Program "t7412" assembled in 3 passes with errorlevel 0. "t7412.htm"{121} I0750 Source "t7412" (187 lines) assembled in 2 passes with errorlevel 0. I0860 Listing file "t7412.htm.lst" created, size=4843. I0990 EuroAssembler terminated with errorlevel 0.
Expected output file t7412. lib
0000: 21 3C 61 72 63 68 3E 0A 2F 20 20 20 20 20 20 20  !<arch>¬/¯¯¯¯¯¯¯
0010: 20 20 20 20 20 20 20 20 30 20 20 20 20 20 20 20  ¯¯¯¯¯¯¯¯0¯¯¯¯¯¯¯
0020: 20 20 20 20 30 20 20 20 20 20 30 20 20 20 20 20  ¯¯¯¯0¯¯¯¯¯0¯¯¯¯¯
0030: 31 30 30 36 36 36 20 20 34 34 20 20 20 20 20 20  100666¯¯44¯¯¯¯¯¯
0040: 20 20 60 0A 00 00 00 03 00 00 01 20 00 00 01 86  ¯¯`¬°°°·°°·¯°°·¤
0050: 00 00 01 EA 57 72 69 74 65 2E 57 33 32 00 42 65  °°·¤Write.W32°Be
0060: 65 70 2E 57 33 32 00 45 78 69 74 2E 57 33 32 00  ep.W32°Exit.W32°
0070: 2F 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  /¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
0080: 30 20 20 20 20 20 20 20 20 20 20 20 30 20 20 20  0¯¯¯¯¯¯¯¯¯¯¯0¯¯¯
0090: 20 20 30 20 20 20 20 20 31 30 30 36 36 36 20 20  ¯¯0¯¯¯¯¯100666¯¯
00A0: 35 34 20 20 20 20 20 20 20 20 60 0A 03 00 00 00  54¯¯¯¯¯¯¯¯`¬·°°°
00B0: 20 01 00 00 86 01 00 00 EA 01 00 00 03 00 00 00  ¯·°°¤·°°¤·°°·°°°
00C0: 02 00 03 00 01 00 42 65 65 70 2E 57 33 32 00 45  ·°·°·°Beep.W32°E
00D0: 78 69 74 2E 57 33 32 00 57 72 69 74 65 2E 57 33  xit.W32°Write.W3
00E0: 32 00 2F 2F 20 20 20 20 20 20 20 20 20 20 20 20  2°//¯¯¯¯¯¯¯¯¯¯¯¯
00F0: 20 20 30 20 20 20 20 20 20 20 20 20 20 20 30 20  ¯¯0¯¯¯¯¯¯¯¯¯¯¯0¯
0100: 20 20 20 20 30 20 20 20 20 20 31 30 30 36 36 36  ¯¯¯¯0¯¯¯¯¯100666
0110: 20 20 32 20 20 20 20 20 20 20 20 20 60 0A 00 0A  ¯¯2¯¯¯¯¯¯¯¯¯`¬°¬
0120: 57 72 69 74 65 2E 57 33 32 2F 20 20 20 20 20 20  Write.W32/¯¯¯¯¯¯
0130: 30 20 20 20 20 20 20 20 20 20 20 20 30 20 20 20  0¯¯¯¯¯¯¯¯¯¯¯0¯¯¯
0140: 20 20 30 20 20 20 20 20 31 30 30 36 36 36 20 20  ¯¯0¯¯¯¯¯100666¯¯
0150: 34 31 20 20 20 20 20 20 20 20 60 0A 00 00 FF FF  41¯¯¯¯¯¯¯¯`¬°°¤¤
0160: 01 00 4C 01 00 00 00 00 15 00 00 00 00 00 04 00  ·°L·°°°°·°°°°°·°
0170: 57 72 69 74 65 2E 57 33 32 00 74 37 34 31 32 4C  Write.W32°t7412L
0180: 2E 64 6C 6C 00 10 42 65 65 70 2E 57 33 32 2F 20  .dll°·Beep.W32/¯
0190: 20 20 20 20 20 20 30 20 20 20 20 20 20 20 20 20  ¯¯¯¯¯¯0¯¯¯¯¯¯¯¯¯
01A0: 20 20 30 20 20 20 20 20 30 20 20 20 20 20 31 30  ¯¯0¯¯¯¯¯0¯¯¯¯¯10
01B0: 30 36 36 36 20 20 34 30 20 20 20 20 20 20 20 20  0666¯¯40¯¯¯¯¯¯¯¯
01C0: 60 0A 00 00 FF FF 01 00 4C 01 00 00 00 00 14 00  `¬°°¤¤·°L·°°°°·°
01D0: 00 00 00 00 04 00 42 65 65 70 2E 57 33 32 00 74  °°°°·°Beep.W32°t
01E0: 37 34 31 32 4C 2E 64 6C 6C 00 45 78 69 74 2E 57  7412L.dll°Exit.W
01F0: 33 32 2F 20 20 20 20 20 20 20 30 20 20 20 20 20  32/¯¯¯¯¯¯¯0¯¯¯¯¯
0200: 20 20 20 20 20 20 30 20 20 20 20 20 30 20 20 20  ¯¯¯¯¯¯0¯¯¯¯¯0¯¯¯
0210: 20 20 31 30 30 36 36 36 20 20 34 30 20 20 20 20  ¯¯100666¯¯40¯¯¯¯
0220: 20 20 20 20 60 0A 00 00 FF FF 01 00 4C 01 00 00  ¯¯¯¯`¬°°¤¤·°L·°°
0230: 00 00 14 00 00 00 00 00 04 00 45 78 69 74 2E 57  °°·°°°°°·°Exit.W
0240: 33 32 00 74 37 34 31 32 4C 2E 64 6C 6C 00        32°t7412L.dll°

▲Back to the top▲