EuroAssembler Index Manual Download Source Macros


Sitemap Links Forum Tests Projects

Test t7193: Compile COFF 16bit Dos linking OMF 16bit Dos


Description
Test creates linkable 16bit COFF file t7193.obj from linkable 16bit OMF module.
See also
LinkerCombinations  
Tested procedures
PfcoffCompile   PfomfLoadPgm  
Source & expected listing t7193.htm.lst
| | EUROASM DEBUG=OFF,PROFILE=OFF,AUTOSEGMENT=ON,LIST=ON, \ | | DUMP=ON,DUMPWIDTH=25,DUMPALL=OFF,CPU=386 | |;; | |t7193OW PROGRAM FORMAT=OMF,MODEL=SMALL,WIDTH=16, \ | | LISTMAP=ON,LISTGLOBALS=ON | | PUBLIC Write.D16 |[CODE] ::::Section changed. |0000: |Write.D16: PROC ; Write ASCIIZ string DS:SI in 16bit DOS. |0000:B402 | MOV AH,02h ; Dos function WRITE CHARACTER FROM DL TO STANDARD OUTPUT. |0002:8A14 |.1:MOV DL,[SI] ; Get one character. |0004:84D2 | TEST DL ; Test if it is the terminating zero. |0006:7405 | JZ .9: ; Go to the end if so. |0008:CD21 | INT 21h ; Call DOS service to write a character. |000A:46 | INC SI ; Let SI point to the next character. |000B:EBF5 | JMP .1: ; Repeat until DL=0. |000D:C3 |.9:RET |000E: | ENDPROC Write.D16: | |ENDPROGRAM t7193OW | **** ListMap "t7193OW.obj",groups=0,segments=1,entry=,stack= | [CODE],RVA=00000000h,size=0000000Eh=14,width=16,align=16,purpose=CODE | **** ListGlobals "t7193OW.obj",Global=0,Public=1,Extern=0,eXport=0,Import=0 | Write.D16,[CODE]:00000000h,scope='P' | |;; | |t7193OB PROGRAM FORMAT=OMF,MODEL=SMALL,WIDTH=16, \ | | LISTMAP=ON,LISTGLOBALS=ON | | PUBLIC Beep.D16 |[CODE] ::::Section changed. |0000: |Beep.D16: PROC ; Echo beep sound in 16bit DOS. |0000:B207 | MOV DL,7 ; BEL character, interpreted as beep sound. |0002:B402 | MOV AH,2 ; DOS function WRITE CHARACTER TO STANDARD OUTPUT. |0004:CD21 | INT 0x21 ; Call DOS service to send a BEL. |0006:C3 | RET ; Return to caller. |0007: | ENDPROC Beep.D16: | |ENDPROGRAM t7193OB | **** ListMap "t7193OB.obj",groups=0,segments=1,entry=,stack= | [CODE],RVA=00000000h,size=00000007h=7,width=16,align=16,purpose=CODE | **** ListGlobals "t7193OB.obj",Global=0,Public=1,Extern=0,eXport=0,Import=0 | Beep.D16,[CODE]:00000000h,scope='P' | |;; | |t7193OE PROGRAM FORMAT=OMF,MODEL=SMALL,WIDTH=16, \ | | LISTMAP=ON,LISTGLOBALS=ON | | PUBLIC Exit.D16 |[CODE] ::::Section changed. |0000: |Exit.D16: PROC ; Terminate program in 16bit DOS. |0000:B8004C | MOV AX,4C00h ; DOS function TERMINATE WITH RETURN CODE IN AL. |0003:CD21 | INT 21h ; Call DOS service to terminate the program. |0005: | ENDPROC Exit.D16: | |ENDPROGRAM t7193OE | **** ListMap "t7193OE.obj",groups=0,segments=1,entry=,stack= | [CODE],RVA=00000000h,size=00000005h=5,width=16,align=16,purpose=CODE | **** ListGlobals "t7193OE.obj",Global=0,Public=1,Extern=0,eXport=0,Import=0 | Exit.D16,[CODE]:00000000h,scope='P' | |;; | |t7193 PROGRAM FORMAT=COFF,MODEL=FLAT,WIDTH=16, \ | | LISTMAP=ON,LISTGLOBALS=ON | | LINK t7193OW.obj, t7193OB.obj, t7193OE.obj | |ENDPROGRAM t7193 |# I0560 Linking OMF module ".\t7193OW.obj". |# I0560 Linking OMF module ".\t7193OB.obj". |# I0560 Linking OMF module ".\t7193OE.obj". | **** ListMap "t7193.obj",groups=0,segments=1,entry=,stack= | [CODE],RVA=00000000h,size=00000025h=37,width=16,align=16,purpose=CODE | **** ListGlobals "t7193.obj",Global=0,Public=3,Extern=0,eXport=0,Import=0 | Beep.D16,[CODE]:00000010h,scope='P' | Exit.D16,[CODE]:00000020h,scope='P' | Write.D16,[CODE]:00000000h,scope='P'
Expected messages t7193.out
I0180 Assembling source file "t7193.htm". I0270 Assembling source "t7193". I0310 Assembling source pass 1. I0330 Assembling source pass 2 - final. I0470 Assembling program "t7193OW". "t7193.htm"{62} I0510 Assembling program pass 1. "t7193.htm"{62} I0510 Assembling program pass 2. "t7193.htm"{62} I0530 Assembling program pass 3 - final. "t7193.htm"{62} I0660 16bit SMALL OMF file "t7193OW.obj" created, size=104. "t7193.htm"{76} I0650 Program "t7193OW" assembled in 3 passes with errorlevel 0. "t7193.htm"{76} I0470 Assembling program "t7193OB". "t7193.htm"{82} I0510 Assembling program pass 1. "t7193.htm"{82} I0510 Assembling program pass 2. "t7193.htm"{82} I0530 Assembling program pass 3 - final. "t7193.htm"{82} I0660 16bit SMALL OMF file "t7193OB.obj" created, size=96. "t7193.htm"{92} I0650 Program "t7193OB" assembled in 3 passes with errorlevel 0. "t7193.htm"{92} I0470 Assembling program "t7193OE". "t7193.htm"{98} I0510 Assembling program pass 1. "t7193.htm"{98} I0510 Assembling program pass 2. "t7193.htm"{98} I0530 Assembling program pass 3 - final. "t7193.htm"{98} I0660 16bit SMALL OMF file "t7193OE.obj" created, size=94. "t7193.htm"{106} I0650 Program "t7193OE" assembled in 3 passes with errorlevel 0. "t7193.htm"{106} I0470 Assembling program "t7193". "t7193.htm"{112} I0510 Assembling program pass 1. "t7193.htm"{112} I0530 Assembling program pass 2 - final. "t7193.htm"{112} I0560 Linking OMF module ".\t7193OW.obj". "t7193.htm"{115} I0560 Linking OMF module ".\t7193OB.obj". "t7193.htm"{115} I0560 Linking OMF module ".\t7193OE.obj". "t7193.htm"{115} I0660 16bit FLAT COFF file "t7193.obj" created, size=256. "t7193.htm"{115} I0650 Program "t7193" assembled in 2 passes with errorlevel 0. "t7193.htm"{115} I0750 Source "t7193" (183 lines) assembled in 2 passes with errorlevel 0. I0860 Listing file "t7193.htm.lst" created, size=4270. I0990 EuroAssembler terminated with errorlevel 0.
Expected output file t7193. obj
0000: 4C 01 01 00 00 00 00 00 62 00 00 00 08 00 00 00  L··°°°°°b°°°·°°°
0010: 00 00 00 00 43 4F 44 45 00 00 00 00 00 00 00 00  °°°°CODE°°°°°°°°
0020: 00 00 00 00 25 00 00 00 3C 00 00 00 00 00 00 00  °°°°%°°°<°°°°°°°
0030: 00 00 00 00 00 00 00 00 20 00 50 60 B4 02 8A 14  °°°°°°°°¯°P`¤·¤·
0040: 84 D2 74 05 CD 21 46 EB F5 C3 90 90 B2 07 B4 02  ¤¤t·¤!F¤¤¤¤¤¤·¤·
0050: CD 21 C3 90 90 90 90 90 90 90 90 90 B8 00 4C CD  ¤!¤¤¤¤¤¤¤¤¤¤¤°L¤
0060: 21 00 2E 73 63 61 6C 61 72 73 00 00 00 00 FF FF  !°.scalars°°°°¤¤
0070: 00 00 03 00 2E 66 69 6C 65 00 00 00 00 00 00 00  °°·°.file°°°°°°°
0080: FE FF 00 00 67 01 74 37 31 39 33 2E 68 74 6D 00  ¤¤°°g·t7193.htm°
0090: 00 00 00 00 00 00 00 00 43 4F 44 45 00 00 00 00  °°°°°°°°CODE°°°°
00A0: 00 00 00 00 01 00 00 00 03 01 25 00 00 00 00 00  °°°°·°°°··%°°°°°
00B0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
00C0: 04 00 00 00 00 00 00 00 01 00 00 00 02 00 42 65  ·°°°°°°°·°°°·°Be
00D0: 65 70 2E 44 31 36 10 00 00 00 01 00 00 00 02 00  ep.D16·°°°·°°°·°
00E0: 45 78 69 74 2E 44 31 36 20 00 00 00 01 00 00 00  Exit.D16¯°°°·°°°
00F0: 02 00 0E 00 00 00 57 72 69 74 65 2E 44 31 36 00  ·°·°°°Write.D16°

▲Back to the top▲