EuroAssembler Index Manual Download Source Macros


Sitemap Links Forum Tests Projects

Test t7319: Compile LIBCOF 32bit Win


Description
Test creates linkable 32bit LIBCOF file t7319.lib.
See also
LinkerCombinations  
Tested procedures
PflibcofCompile  
Source & expected listing t7319.htm.lst
| | EUROASM DEBUG=OFF,PROFILE=OFF,AUTOSEGMENT=ON,LIST=ON, \ | | DUMP=ON,DUMPWIDTH=25,DUMPALL=OFF,CPU=386 | |;; | |t7319 PROGRAM FORMAT=LIBCOF,MODEL=FLAT,WIDTH=32, \ | | LISTMAP=OFF,LISTGLOBALS=OFF | | PUBLIC 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 t7319
Expected messages t7319.out
I0180 Assembling source file "t7319.htm". I0270 Assembling source "t7319". I0310 Assembling source pass 1. I0330 Assembling source pass 2 - final. I0470 Assembling program "t7319". "t7319.htm"{59} I0510 Assembling program pass 1. "t7319.htm"{59} I0510 Assembling program pass 2. "t7319.htm"{59} I0530 Assembling program pass 3 - final. "t7319.htm"{59} I0660 32bit FLAT LIBCOF file "t7319.lib" created, size=1305. "t7319.htm"{100} I0650 Program "t7319" assembled in 3 passes with errorlevel 0. "t7319.htm"{100} I0750 Source "t7319" (205 lines) assembled in 2 passes with errorlevel 0. I0860 Listing file "t7319.htm.lst" created, size=3533. I0990 EuroAssembler terminated with errorlevel 0.
Expected output file t7319. 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 31 30 30 20 20 20 20 20  100666¯¯100¯¯¯¯¯
0040: 20 20 60 0A 00 00 00 07 00 00 01 90 00 00 01 FA  ¯¯`¬°°°·°°·¤°°·¤
0050: 00 00 02 62 00 00 02 C4 00 00 03 2E 00 00 03 2E  °°·b°°·¤°°·.°°·.
0060: 00 00 03 2E 47 65 74 53 74 64 48 61 6E 64 6C 65  °°·.GetStdHandle
0070: 00 57 72 69 74 65 46 69 6C 65 00 42 65 65 70 00  °WriteFile°Beep°
0080: 45 78 69 74 50 72 6F 63 65 73 73 00 57 72 69 74  ExitProcess°Writ
0090: 65 2E 57 33 32 00 42 65 65 70 2E 57 33 32 00 45  e.W32°Beep.W32°E
00A0: 78 69 74 2E 57 33 32 00 2F 20 20 20 20 20 20 20  xit.W32°/¯¯¯¯¯¯¯
00B0: 20 20 20 20 20 20 20 20 30 20 20 20 20 20 20 20  ¯¯¯¯¯¯¯¯0¯¯¯¯¯¯¯
00C0: 20 20 20 20 30 20 20 20 20 20 30 20 20 20 20 20  ¯¯¯¯0¯¯¯¯¯0¯¯¯¯¯
00D0: 31 30 30 36 36 36 20 20 31 31 30 20 20 20 20 20  100666¯¯110¯¯¯¯¯
00E0: 20 20 60 0A 05 00 00 00 90 01 00 00 FA 01 00 00  ¯¯`¬·°°°¤·°°¤·°°
00F0: 62 02 00 00 C4 02 00 00 2E 03 00 00 07 00 00 00  b·°°¤·°°.·°°·°°°
0100: 03 00 05 00 05 00 04 00 01 00 05 00 02 00 42 65  ·°·°·°·°·°·°·°Be
0110: 65 70 00 42 65 65 70 2E 57 33 32 00 45 78 69 74  ep°Beep.W32°Exit
0120: 2E 57 33 32 00 45 78 69 74 50 72 6F 63 65 73 73  .W32°ExitProcess
0130: 00 47 65 74 53 74 64 48 61 6E 64 6C 65 00 57 72  °GetStdHandle°Wr
0140: 69 74 65 2E 57 33 32 00 57 72 69 74 65 46 69 6C  ite.W32°WriteFil
0150: 65 00 2F 2F 20 20 20 20 20 20 20 20 20 20 20 20  e°//¯¯¯¯¯¯¯¯¯¯¯¯
0160: 20 20 30 20 20 20 20 20 20 20 20 20 20 20 30 20  ¯¯0¯¯¯¯¯¯¯¯¯¯¯0¯
0170: 20 20 20 20 30 20 20 20 20 20 31 30 30 36 36 36  ¯¯¯¯0¯¯¯¯¯100666
0180: 20 20 32 20 20 20 20 20 20 20 20 20 60 0A 00 0A  ¯¯2¯¯¯¯¯¯¯¯¯`¬°¬
0190: 47 65 74 53 74 64 48 61 6E 64 6C 65 2F 20 20 20  GetStdHandle/¯¯¯
01A0: 30 20 20 20 20 20 20 20 20 20 20 20 30 20 20 20  0¯¯¯¯¯¯¯¯¯¯¯0¯¯¯
01B0: 20 20 30 20 20 20 20 20 31 30 30 36 36 36 20 20  ¯¯0¯¯¯¯¯100666¯¯
01C0: 34 36 20 20 20 20 20 20 20 20 60 0A 00 00 FF FF  46¯¯¯¯¯¯¯¯`¬°°¤¤
01D0: 01 00 4C 01 00 00 00 00 1A 00 00 00 00 00 04 00  ·°L·°°°°·°°°°°·°
01E0: 47 65 74 53 74 64 48 61 6E 64 6C 65 00 6B 65 72  GetStdHandle°ker
01F0: 6E 65 6C 33 32 2E 64 6C 6C 00 57 72 69 74 65 46  nel32.dll°WriteF
0200: 69 6C 65 2F 20 20 20 20 20 20 30 20 20 20 20 20  ile/¯¯¯¯¯¯0¯¯¯¯¯
0210: 20 20 20 20 20 20 30 20 20 20 20 20 30 20 20 20  ¯¯¯¯¯¯0¯¯¯¯¯0¯¯¯
0220: 20 20 31 30 30 36 36 36 20 20 34 33 20 20 20 20  ¯¯100666¯¯43¯¯¯¯
0230: 20 20 20 20 60 0A 00 00 FF FF 01 00 4C 01 00 00  ¯¯¯¯`¬°°¤¤·°L·°°
0240: 00 00 17 00 00 00 00 00 04 00 57 72 69 74 65 46  °°·°°°°°·°WriteF
0250: 69 6C 65 00 6B 65 72 6E 65 6C 33 32 2E 64 6C 6C  ile°kernel32.dll
0260: 00 10 42 65 65 70 2F 20 20 20 20 20 20 20 20 20  °·Beep/¯¯¯¯¯¯¯¯¯
0270: 20 20 30 20 20 20 20 20 20 20 20 20 20 20 30 20  ¯¯0¯¯¯¯¯¯¯¯¯¯¯0¯
0280: 20 20 20 20 30 20 20 20 20 20 31 30 30 36 36 36  ¯¯¯¯0¯¯¯¯¯100666
0290: 20 20 33 38 20 20 20 20 20 20 20 20 60 0A 00 00  ¯¯38¯¯¯¯¯¯¯¯`¬°°
02A0: FF FF 01 00 4C 01 00 00 00 00 12 00 00 00 00 00  ¤¤·°L·°°°°·°°°°°
02B0: 04 00 42 65 65 70 00 6B 65 72 6E 65 6C 33 32 2E  ·°Beep°kernel32.
02C0: 64 6C 6C 00 45 78 69 74 50 72 6F 63 65 73 73 2F  dll°ExitProcess/
02D0: 20 20 20 20 30 20 20 20 20 20 20 20 20 20 20 20  ¯¯¯¯0¯¯¯¯¯¯¯¯¯¯¯
02E0: 30 20 20 20 20 20 30 20 20 20 20 20 31 30 30 36  0¯¯¯¯¯0¯¯¯¯¯1006
02F0: 36 36 20 20 34 35 20 20 20 20 20 20 20 20 60 0A  66¯¯45¯¯¯¯¯¯¯¯`¬
0300: 00 00 FF FF 01 00 4C 01 00 00 00 00 19 00 00 00  °°¤¤·°L·°°°°·°°°
0310: 00 00 04 00 45 78 69 74 50 72 6F 63 65 73 73 00  °°·°ExitProcess°
0320: 6B 65 72 6E 65 6C 33 32 2E 64 6C 6C 00 10 74 37  kernel32.dll°·t7
0330: 33 31 39 2F 20 20 20 20 20 20 20 20 20 20 30 20  319/¯¯¯¯¯¯¯¯¯¯0¯
0340: 20 20 20 20 20 20 20 20 20 20 30 20 20 20 20 20  ¯¯¯¯¯¯¯¯¯¯0¯¯¯¯¯
0350: 30 20 20 20 20 20 31 30 30 36 36 36 20 20 34 33  0¯¯¯¯¯100666¯¯43
0360: 31 20 20 20 20 20 20 20 60 0A 4C 01 01 00 00 00  1¯¯¯¯¯¯¯`¬L··°°°
0370: 00 00 B8 00 00 00 0B 00 00 00 00 00 00 01 2E 74  °°¤°°°·°°°°°°·.t
0380: 65 78 74 00 00 00 00 00 00 00 00 00 00 00 4A 00  ext°°°°°°°°°°°J°
0390: 00 00 3C 00 00 00 86 00 00 00 00 00 00 00 05 00  °°<°°°¤°°°°°°°·°
03A0: 00 00 20 00 50 60 6A F5 E8 00 00 00 00 89 C3 89  °°¯°P`j¤¤°°°°¤¤¤
03B0: F7 31 C9 31 C0 F7 D1 F2 AE F7 D1 52 89 E2 50 52  ¤1¤1¤¤¤¤¤¤¤R¤¤PR
03C0: 51 56 53 E8 00 00 00 00 5A C3 68 C8 00 00 00 68  QVS¤°°°°Z¤h¤°°°h
03D0: B8 01 00 00 E8 00 00 00 00 68 90 01 00 00 68 4B  ¤·°°¤°°°°h¤·°°hK
03E0: 02 00 00 E8 00 00 00 00 C3 6A 00 E9 00 00 00 00  ·°°¤°°°°¤j°¤°°°°
03F0: 03 00 00 00 07 00 00 00 14 00 1E 00 00 00 08 00  ·°°°·°°°·°·°°°·°
0400: 00 00 14 00 2F 00 00 00 09 00 00 00 14 00 3E 00  °°·°/°°°·°°°·°>°
0410: 00 00 09 00 00 00 14 00 46 00 00 00 0A 00 00 00  °°·°°°·°F°°°¬°°°
0420: 14 00 2E 66 69 6C 65 00 00 00 00 00 00 00 FE FF  ·°.file°°°°°°°¤¤
0430: 00 00 67 01 74 37 33 31 39 2E 68 74 6D 00 00 00  °°g·t7319.htm°°°
0440: 00 00 00 00 00 00 2E 74 65 78 74 00 00 00 00 00  °°°°°°.text°°°°°
0450: 00 00 01 00 00 00 03 01 4A 00 00 00 05 00 00 00  °°·°°°··J°°°·°°°
0460: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 00  °°°°°°°°°°°°°°·°
0470: 00 00 00 00 00 00 01 00 01 02 02 00 42 65 65 70  °°°°°°·°···°Beep
0480: 2E 57 33 32 24 00 00 00 01 00 01 02 02 00 45 78  .W32$°°°·°···°Ex
0490: 69 74 2E 57 33 32 43 00 00 00 01 00 01 02 02 00  it.W32C°°°·°···°
04A0: 00 00 00 00 0E 00 00 00 00 00 00 00 00 00 01 01  °°°°·°°°°°°°°°··
04B0: 02 00 00 00 00 00 1B 00 00 00 00 00 00 00 00 00  ·°°°°°·°°°°°°°°°
04C0: 01 01 02 00 42 65 65 70 00 00 00 00 00 00 00 00  ···°Beep°°°°°°°°
04D0: 00 00 01 01 02 00 00 00 00 00 25 00 00 00 00 00  °°···°°°°°%°°°°°
04E0: 00 00 00 00 01 01 02 00 31 00 00 00 57 72 69 74  °°°°···°1°°°Writ
04F0: 65 2E 57 33 32 00 47 65 74 53 74 64 48 61 6E 64  e.W32°GetStdHand
0500: 6C 65 00 57 72 69 74 65 46 69 6C 65 00 45 78 69  le°WriteFile°Exi
0510: 74 50 72 6F 63 65 73 73 00                       tProcess°

▲Back to the top▲