EuroAssembler Index Manual Download Source Macros


Sitemap Links Forum Tests Projects

Test t7478: Compile MZ 16bit Dos linking LIBOMF 16bit Dos


Description
Test creates executable 16bit MZ file t7478.exe from linkable 16bit LIBOMF module.
See also
LinkerCombinations  
Tested procedures
PfmzCompile   PflibomfLoadPgm  
Source & expected listing t7478.htm.lst
| | EUROASM DEBUG=OFF,PROFILE=OFF,AUTOSEGMENT=ON,LIST=ON, \ | | DUMP=ON,DUMPWIDTH=25,DUMPALL=OFF,CPU=086 | |;; | |t7478OW 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 t7478OW | **** ListMap "t7478OW.obj",groups=0,segments=1,entry=,stack= | [CODE],RVA=00000000h,size=0000000Eh=14,width=16,align=0010h,purpose=CODE | **** ListGlobals "t7478OW.obj",Global=0,Public=1,Extern=0,eXport=0,Import=0 | Write.D16,[CODE]:00000000h,scope='P' | |;; | |t7478OB 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 t7478OB | **** ListMap "t7478OB.obj",groups=0,segments=1,entry=,stack= | [CODE],RVA=00000000h,size=00000007h=7,width=16,align=0010h,purpose=CODE | **** ListGlobals "t7478OB.obj",Global=0,Public=1,Extern=0,eXport=0,Import=0 | Beep.D16,[CODE]:00000000h,scope='P' | |;; | |t7478OE 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 t7478OE | **** ListMap "t7478OE.obj",groups=0,segments=1,entry=,stack= | [CODE],RVA=00000000h,size=00000005h=5,width=16,align=0010h,purpose=CODE | **** ListGlobals "t7478OE.obj",Global=0,Public=1,Extern=0,eXport=0,Import=0 | Exit.D16,[CODE]:00000000h,scope='P' | |;; | |t7478O PROGRAM FORMAT=LIBOMF,MODEL=SMALL,WIDTH=16, \ | | LISTMAP=OFF,LISTGLOBALS=OFF | | LINK t7478OW.obj, t7478OB.obj, t7478OE.obj | |ENDPROGRAM t7478O |# I0560 Linking OMF module ".\t7478OW.obj". |# I0560 Linking OMF module ".\t7478OB.obj". |# I0560 Linking OMF module ".\t7478OE.obj". | |;; | |t7478 PROGRAM FORMAT=MZ,MODEL=SMALL,WIDTH=16,ENTRY=Start:, \ | | LISTMAP=ON ,LISTGLOBALS=ON | | GLOBAL Write.D16, Exit.D16 ; Intentionally omitted Beep.D16. | | LINK t7478O.lib |[CODE] ::::Section changed. |0000:90 | NOP ; Unsignificant code marker. |0001: |Start: ; Entry point of the program. |0001:B8{0000} | MOV AX,PARA# Message: ; Paragraph address of segment [DATA]. |0004:8ED8 | MOV DS,AX ; Let DS address the segment [DATA]. |0006:BE[0000] | MOV SI,Message: ; Offset of the message. |0009:E8(0000) | CALL Write.D16: ; Write the ASCIIZ string DS:SI. |000C:E8(0000) | CALL Exit.D16: ; Terminate the program with errorlevel 0. |[DATA] ::::Section changed. |0000:3136626974207072~~|Message: DB "16bit program MZ t7478.exe created by EuroAssembler linking 16bit LIBOMF.",13,10,0 | |ENDPROGRAM t7478 |# I0560 Linking LIBOMF module ".\t7478O.lib". | **** ListMap "t7478.exe",groups=2,segments=3,entry=[CODE]:00000001h,stack=[STACK]:00001000h | [CODE],RVA=00000000h,size=00000025h=37,group [CODE] | [CODE],RVA=00000000h,size=00000025h=37,width=16,align=0010h,purpose=CODE | [DATA],RVA=00000030h,size=0000004Ch=76,group [DATA] | [DATA],RVA=00000030h,size=0000004Ch=76,width=16,align=0010h,purpose=DATA | [STACK],RVA=00000080h,size=00001000h=4096,width=16,align=0010h,purpose=STACK | **** ListGlobals "t7478.exe",Global=2,Public=1,Extern=0,eXport=0,Import=0 | Exit.D16,[CODE]:00000020h,RVA=00000020h,scope='G' | Start,[CODE]:00000001h,RVA=00000001h,scope='P' | Write.D16,[CODE]:00000010h,RVA=00000010h,scope='G'
Expected messages t7478.out
I0180 Assembling source file "t7478.htm". I0270 Assembling source "t7478". I0310 Assembling source pass 1. I0330 Assembling source pass 2 - final. I0470 Assembling program "t7478OW". "t7478.htm"{62} I0510 Assembling program pass 1. "t7478.htm"{62} I0510 Assembling program pass 2. "t7478.htm"{62} I0530 Assembling program pass 3 - final. "t7478.htm"{62} I0660 16bit SMALL OMF file "t7478OW.obj" created, size=104. "t7478.htm"{76} I0650 Program "t7478OW" assembled in 3 passes with errorlevel 0. "t7478.htm"{76} I0470 Assembling program "t7478OB". "t7478.htm"{82} I0510 Assembling program pass 1. "t7478.htm"{82} I0510 Assembling program pass 2. "t7478.htm"{82} I0530 Assembling program pass 3 - final. "t7478.htm"{82} I0660 16bit SMALL OMF file "t7478OB.obj" created, size=96. "t7478.htm"{92} I0650 Program "t7478OB" assembled in 3 passes with errorlevel 0. "t7478.htm"{92} I0470 Assembling program "t7478OE". "t7478.htm"{98} I0510 Assembling program pass 1. "t7478.htm"{98} I0510 Assembling program pass 2. "t7478.htm"{98} I0530 Assembling program pass 3 - final. "t7478.htm"{98} I0660 16bit SMALL OMF file "t7478OE.obj" created, size=94. "t7478.htm"{106} I0650 Program "t7478OE" assembled in 3 passes with errorlevel 0. "t7478.htm"{106} I0470 Assembling program "t7478O". "t7478.htm"{112} I0510 Assembling program pass 1. "t7478.htm"{112} I0530 Assembling program pass 2 - final. "t7478.htm"{112} I0560 Linking OMF module ".\t7478OW.obj". "t7478.htm"{115} I0560 Linking OMF module ".\t7478OB.obj". "t7478.htm"{115} I0560 Linking OMF module ".\t7478OE.obj". "t7478.htm"{115} I0660 16bit SMALL LIBOMF file "t7478O.lib" created, size=1536. "t7478.htm"{115} I0650 Program "t7478O" assembled in 2 passes with errorlevel 0. "t7478.htm"{115} I0470 Assembling program "t7478". "t7478.htm"{120} I0510 Assembling program pass 1. "t7478.htm"{120} I0510 Assembling program pass 2. "t7478.htm"{120} I0530 Assembling program pass 3 - final. "t7478.htm"{120} I0560 Linking LIBOMF module ".\t7478O.lib". "t7478.htm"{134} I0660 16bit SMALL MZ file "t7478.exe" created, size=220. "t7478.htm"{134} I0650 Program "t7478" assembled in 3 passes with errorlevel 0. "t7478.htm"{134} I0750 Source "t7478" (209 lines) assembled in 2 passes with errorlevel 0. I0860 Listing file "t7478.htm.lst" created, size=5772. I0990 EuroAssembler terminated with errorlevel 0.
Expected output file t7478. exe
0000: 4D 5A DC 00 01 00 01 00 06 00 01 01 FF FF 08 00  MZ¤°·°·°·°··¤¤·°
0010: 00 10 14 5E 01 00 00 00 40 00 00 00 00 00 00 00  °··^·°°°@°°°°°°°
0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0040: 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ·°°°°°°°°°°°°°°°
0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0060: 90 B8 03 00 8E D8 BE 00 00 E8 04 00 E8 11 00 90  ¤¤·°¤¤¤°°¤·°¤·°¤
0070: B4 02 8A 14 84 D2 74 05 CD 21 46 EB F5 C3 90 90  ¤·¤·¤¤t·¤!F¤¤¤¤¤
0080: B8 00 4C CD 21 00 00 00 00 00 00 00 00 00 00 00  ¤°L¤!°°°°°°°°°°°
0090: 31 36 62 69 74 20 70 72 6F 67 72 61 6D 20 4D 5A  16bit¯program¯MZ
00A0: 20 74 37 34 37 38 2E 65 78 65 20 63 72 65 61 74  ¯t7478.exe¯creat
00B0: 65 64 20 62 79 20 45 75 72 6F 41 73 73 65 6D 62  ed¯by¯EuroAssemb
00C0: 6C 65 72 20 6C 69 6E 6B 69 6E 67 20 31 36 62 69  ler¯linking¯16bi
00D0: 74 20 4C 49 42 4F 4D 46 2E 0D 0A 00              t¯LIBOMF.·¬°

▲Back to the top▲