EuroAssembler Index Manual Download Source Macros


Sitemap Links Forum Tests Projects

Test t8723: LIBOMF library for 32bit Linux links LIBCOF library


Source & expected listing t8723.htm.lst
| | EUROASM AUTOSEGMENT=ON,CPU=386,DUMPWIDTH=28 |7438373233 |%test %SET t8723 | |;; | |;; Create the first auxiliary COFF module | |%test.WB PROGRAM FORMAT=COFF,MODEL=FLAT,WIDTH=32 |[.text] ::::Section changed. |00000000: |Write.L32:: PROC ; Display ASCIIZ string pointed to by ESI using 32bit Linux. |00000000:31C9 | XOR ECX,ECX ; Clear ECX to keep the size of input string. |00000002:31C0 | XOR EAX,EAX ; Clear AL, the searched terminating character |00000004:89F7 | MOV EDI,ESI ; String address. |00000006:F7D1 | NOT ECX ; Assume unlimited possible string size. |00000008:F2AE | REPNE SCASB ; Find the zero terminator. |0000000A:F7D1 | NOT ECX ; Get string size to RCX. |0000000C:B804000000 | MOV EAX,4 ; Kernel service sys_write. |00000011:BB01000000 | MOV EBX,1 ; %1 I/O handle STDOUT_FILENO. |00000016:89CA | MOV EDX,ECX ; %3 String size. |00000018:89F1 | MOV ECX,ESI ; %2 String address. |0000001A:CD80 | INT 0x80 ; Invoke kernel. |0000001C:C3 | RET ; Return to caller. EAX,EBX,ECX,EDX,ESI,EDI are clobbered. |0000001D: | ENDPROC Write.L32: | |;; |0000001D: |Beep.L32:: PROC ; Display message "Beeping.." and play a sound using 32bit Linux. |0000001D:8D35[00000000] | LEA ESI,[=B"Beeping..."] ; Define a literal string in [.rodata]. |00000023:E8D8FFFFFF | CALL Write.L32:: ; Display the notification "Beeping...". |00000028:8D35[00000000] | LEA ESI,[=W(0x0007)] ; Define ASCIIZ string with BEL character in [.rodata]. |0000002E:E8CDFFFFFF | CALL Write.L32:: ; Play the beep sound. |00000033:C3 | RET ; Return to caller. RAX,RCX,RDX,RSI,RDI,R11 are clobbered. |00000034: | ENDPROC Beep.L32: |[@LT2] ====ListLiterals in section [@LT2]. |00000000:0700 =W(0x0007) |[@LT1] ====ListLiterals in section [@LT1]. |00000000:42656570696E672E~=B"Beeping..." | |ENDPROGRAM %test.WB | **** ListMap "t8723.WB.obj",model=FLAT,groups=0,segments=2,entry=,stack= | [.text],FA=00000064h,RVA=00000000h,size=00000034h=52,width=32,align=0010h,purpose=CODE | [.rodata],FA=000000ACh,RVA=00000000h,size=0000000Dh=13,width=32,align=0010h,purpose=RODATA+LITERAL | **** ListGlobals "t8723.WB.obj",Global=0,Public=2,Extern=0,eXport=0,Import=0 | Beep.L32,[.text]:0000001Dh,scope='P' | Write.L32,[.text]:00000000h,scope='P' | |;; | |;; Create the second auxiliary COFF module. | |%test.EX PROGRAM FORMAT=COFF,MODEL=FLAT,WIDTH=32 |[.text] ::::Section changed. |00000000: |Exit.L32:: PROC ; Display message "End", terminate the program. |00000000:8D35[00000000] | LEA ESI,[.M:] ; String "End" will be defined in segment [.bss] at ESI. |00000006:C706456E6400 | MOVD [ESI+0],"End" ; Dynamically define the message "End". |0000000C:C746030A000000 | MOVD [ESI+3],0x0A ; LF+NUL. |00000013:E8(00000000) | CALL Write.L32:: ; Display the notification "End". |00000018:31DB | XOR EBX,EBX ; %1 Errorlevel=0. |0000001A:B801000000 | MOV EAX,1 ; Kernel service sys_exit. |0000001F:CD80 | INT 0x80 ; Invoke kernel. No return to caller. |[.bss] ::::Section changed. |00000000:.............. |.M:DB 7*BYTE ; Reserve space for ASCIIZ string "End" in [.bss]. |[.text] ::::Section changed. |00000021: | ENDPROC Exit.L32: | |ENDPROGRAM %test.EX | **** ListMap "t8723.EX.obj",model=FLAT,groups=0,segments=2,entry=,stack= | [.text],FA=00000064h,RVA=00000000h,size=00000021h=33,width=32,align=0010h,purpose=CODE | [.bss],FA=00000000h,RVA=00000000h,size=00000007h=7,width=32,align=0010h,purpose=BSS | **** ListGlobals "t8723.EX.obj",Global=0,Public=1,Extern=1,eXport=0,Import=0 | Exit.L32,[.text]:00000000h,scope='P' | Write.L32,[Write.L32]:00000000h,scope='E' | |;; | |;; Create the auxiliary LIBCOF library. | |%test.coff PROGRAM FORMAT=LIBCOF,MODEL=FLAT,WIDTH=32 | | LINK %test.WB.obj, %test.EX.obj | |ENDPROGRAM %test.coff |# I0560 Linking COFF module ".\t8723.WB.obj". |# I0560 Linking COFF module ".\t8723.EX.obj". | **** ListMap "t8723.coff.lib",model=FLAT,groups=0,segments=0,entry=,stack= | **** ListGlobals "t8723.coff.lib",Global=0,Public=0,Extern=0,eXport=0,Import=0 | |;; | |;; Create the main LIBOMF library. | |%test PROGRAM FORMAT=LIBOMF,MODEL=FLAT,WIDTH=32 | | GLOBAL Write.L32,Beep.L32,Exit.L32 | | LINK %test.coff.lib | |ENDPROGRAM %test |# I0561 Linking LIBCOF library ".\t8723.coff.lib". | **** ListMap "t8723.lib",model=FLAT,groups=0,segments=0,entry=,stack= | **** ListGlobals "t8723.lib",Global=0,Public=0,Extern=3,eXport=0,Import=0 | Beep.L32,[Beep.L32]:00000000h,scope='E' | Exit.L32,[Exit.L32]:00000000h,scope='E' | Write.L32,[Write.L32]:00000000h,scope='E'
Expected messages t8723.out
I0180 Assembling source file "t8723.htm". I0270 Assembling source "t8723". I0310 Assembling source pass 1. I0330 Assembling source pass 2 - final. I0470 Assembling program "t8723.WB". "t8723.htm"{45} I0510 Assembling program pass 1. "t8723.htm"{45} I0510 Assembling program pass 2. "t8723.htm"{45} I0530 Assembling program pass 3 - final. "t8723.htm"{45} I0660 32bit FLAT COFF file "t8723.WB.obj" created, size=442. "t8723.htm"{73} I0650 Program "t8723.WB" assembled in 3 passes with errorlevel 0. "t8723.htm"{73} I0470 Assembling program "t8723.EX". "t8723.htm"{82} I0510 Assembling program pass 1. "t8723.htm"{82} I0510 Assembling program pass 2. "t8723.htm"{82} I0530 Assembling program pass 3 - final. "t8723.htm"{82} I0660 32bit FLAT COFF file "t8723.EX.obj" created, size=341. "t8723.htm"{96} I0650 Program "t8723.EX" assembled in 3 passes with errorlevel 0. "t8723.htm"{96} I0470 Assembling program "t8723.coff". "t8723.htm"{105} I0510 Assembling program pass 1. "t8723.htm"{105} I0530 Assembling program pass 2 - final. "t8723.htm"{105} I0560 Linking COFF module ".\t8723.WB.obj". "t8723.htm"{107} I0560 Linking COFF module ".\t8723.EX.obj". "t8723.htm"{107} I0660 32bit FLAT LIBCOF file "t8723.coff.lib" created, size=1263. "t8723.htm"{107} I0650 Program "t8723.coff" assembled in 2 passes with errorlevel 0. "t8723.htm"{107} I0470 Assembling program "t8723". "t8723.htm"{114} I0510 Assembling program pass 1. "t8723.htm"{114} I0510 Assembling program pass 2. "t8723.htm"{114} I0530 Assembling program pass 3 - final. "t8723.htm"{114} I0561 Linking LIBCOF library ".\t8723.coff.lib". "t8723.htm"{117} I0660 32bit FLAT LIBOMF file "t8723.lib" created, size=1536. "t8723.htm"{117} I0650 Program "t8723" assembled in 3 passes with errorlevel 0. "t8723.htm"{117} I0750 Source "t8723" (262 lines) assembled in 2 passes with errorlevel 0. I0860 Listing file "t8723.htm.lst" created, size=6007. I0990 EuroAssembler terminated with errorlevel 0.
Expected output file t8723. lib
0000: F0 0D 00 00 02 00 00 02 00 01 00 00 00 00 00 00  ¤·°°·°°·°·°°°°°°
0010: 82 0A 00 08 74 38 37 32 33 2E 57 42 5D 88 10 00  ¤¬°·t8723.WB]¤·°
0020: 00 00 45 75 72 6F 41 73 73 65 6D 62 6C 65 72 2F  °°EuroAssembler/
0030: 88 05 00 00 9D 33 66 3D 96 10 00 00 05 2E 74 65  ¤·°°¤3f=¤·°°·.te
0040: 78 74 07 2E 72 6F 64 61 74 61 B2 99 09 00 69 34  xt·.rodata¤¤·°i4
0050: 00 00 00 02 01 00 BE 99 09 00 69 0D 00 00 00 03  °°°··°¤¤·°i·°°°·
0060: 01 00 E4 90 0F 00 00 01 08 42 65 65 70 2E 4C 33  ·°¤¤·°°··Beep.L3
0070: 32 1D 00 00 E0 90 10 00 00 01 09 57 72 69 74 65  2·°°¤¤·°°··Write
0080: 2E 4C 33 32 00 00 00 6C A1 3A 00 01 00 00 00 00  .L32°°°l¤:°·°°°°
0090: 31 C9 31 C0 89 F7 F7 D1 F2 AE F7 D1 B8 04 00 00  1¤1¤¤¤¤¤¤¤¤¤¤·°°
00A0: 00 BB 01 00 00 00 89 CA 89 F1 CD 80 C3 8D 35 02  °¤·°°°¤¤¤¤¤¤¤¤5·
00B0: 00 00 00 E8 D8 FF FF FF 8D 35 00 00 00 00 E8 CD  °°°¤¤¤¤¤¤5°°°°¤¤
00C0: FF FF FF C3 7C 9D 09 00 E4 1F 54 02 E4 2A 54 02  ¤¤¤¤|¤·°¤·T·¤*T·
00D0: 9D A1 13 00 02 00 00 00 00 07 00 42 65 65 70 69  ¤¤·°·°°°°·°Beepi
00E0: 6E 67 2E 2E 2E 00 FF 8B 06 00 00 00 00 00 00 6F  ng...°¤¤·°°°°°°o
00F0: 82 0A 00 08 74 38 37 32 33 2E 45 58 59 88 10 00  ¤¬°·t8723.EXY¤·°
0100: 00 00 45 75 72 6F 41 73 73 65 6D 62 6C 65 72 2F  °°EuroAssembler/
0110: 88 05 00 00 9D 33 66 3D 96 0D 00 00 05 2E 74 65  ¤·°°¤3f=¤·°°·.te
0120: 78 74 04 2E 62 73 73 EB 99 09 00 69 21 00 00 00  xt·.bss¤¤·°i!°°°
0130: 02 01 00 D1 99 09 00 69 07 00 00 00 03 01 00 EA  ··°¤¤·°i·°°°··°¤
0140: 8C 0C 00 09 57 72 69 74 65 2E 4C 33 32 00 75 90  ¤·°·Write.L32°u¤
0150: 0F 00 00 01 08 45 78 69 74 2E 4C 33 32 00 00 00  ·°°··Exit.L32°°°
0160: DF A1 27 00 01 00 00 00 00 8D 35 00 00 00 00 C7  ¤¤'°·°°°°¤5°°°°¤
0170: 06 45 6E 64 00 C7 46 03 0A 00 00 00 E8 00 00 00  ·End°¤F·¬°°°¤°°°
0180: 00 31 DB B8 01 00 00 00 CD 80 7D 9D 09 00 E4 02  °1¤¤·°°°¤¤}¤·°¤·
0190: 54 02 A4 14 56 01 0F 8B 06 00 00 00 00 00 00 6F  T·¤·V··¤·°°°°°°o
01A0: F1 5D 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ¤]°°°°°°°°°°°°°°
01B0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
01C0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
01D0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
01E0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
01F0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 B2  °°°°°°°°°°°°°°°¤
0200: 19 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ·°°°°°°°°°°°°°°°
0210: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0220: 00 00 13 00 00 1F 08 42 65 65 70 2E 4C 33 32 01  °°·°°··Beep.L32·
0230: 00 00 08 45 78 69 74 2E 4C 33 32 0F 00 00 00 00  °°·Exit.L32·°°°°
0240: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0250: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0260: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0270: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0290: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
02A0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
02B0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
02C0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
02D0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
02E0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
02F0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0310: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0320: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0330: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0340: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0350: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0360: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0370: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0390: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
03A0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
03B0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
03C0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
03D0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
03E0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
03F0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0400: 00 00 13 00 00 00 00 00 00 00 00 00 00 00 00 00  °°·°°°°°°°°°°°°°
0410: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0420: 00 00 00 00 00 19 09 57 72 69 74 65 2E 4C 33 32  °°°°°··Write.L32
0430: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ·°°°°°°°°°°°°°°°
0440: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0450: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0460: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0470: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0490: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
04A0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
04B0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
04C0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
04D0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
04E0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
04F0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0510: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0520: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0530: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0540: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0550: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0560: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0570: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0590: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
05A0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
05B0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
05C0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
05D0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
05E0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
05F0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°

▲Back to the top▲