EuroAssembler Index Manual Download Source Macros


Sitemap Links Forum Tests Projects

Test t7016: Compile OMF 16bit Dos linking LIBOMF 16bit Dos


Description
Test creates linkable 16bit OMF file t7016.obj from linkable 16bit LIBOMF module.
See also
LinkerCombinations  
Tested procedures
PfomfCompile   PflibomfLoadPgm  
Source & expected listing t7016.htm.lst
| | EUROASM DEBUG=OFF,PROFILE=OFF,AUTOSEGMENT=ON,LIST=ON, \ | | DUMP=ON,DUMPWIDTH=25,DUMPALL=OFF,CPU=386 | |;; | |t7016OW 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 t7016OW | **** ListMap "t7016OW.obj",groups=0,segments=1,entry=,stack= | [CODE],RVA=00000000h,size=0000000Eh=14,width=16,align=0010h,purpose=CODE | **** ListGlobals "t7016OW.obj",Global=0,Public=1,Extern=0,eXport=0,Import=0 | Write.D16,[CODE]:00000000h,scope='P' | |;; | |t7016OB 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 t7016OB | **** ListMap "t7016OB.obj",groups=0,segments=1,entry=,stack= | [CODE],RVA=00000000h,size=00000007h=7,width=16,align=0010h,purpose=CODE | **** ListGlobals "t7016OB.obj",Global=0,Public=1,Extern=0,eXport=0,Import=0 | Beep.D16,[CODE]:00000000h,scope='P' | |;; | |t7016OE 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 t7016OE | **** ListMap "t7016OE.obj",groups=0,segments=1,entry=,stack= | [CODE],RVA=00000000h,size=00000005h=5,width=16,align=0010h,purpose=CODE | **** ListGlobals "t7016OE.obj",Global=0,Public=1,Extern=0,eXport=0,Import=0 | Exit.D16,[CODE]:00000000h,scope='P' | |;; | |t7016O PROGRAM FORMAT=LIBOMF,MODEL=SMALL,WIDTH=16, \ | | LISTMAP=OFF,LISTGLOBALS=OFF | | LINK t7016OW.obj, t7016OB.obj, t7016OE.obj | | ENDPROGRAM t7016O |# I0560 Linking OMF module ".\t7016OW.obj". |# I0560 Linking OMF module ".\t7016OB.obj". |# I0560 Linking OMF module ".\t7016OE.obj". | |;; | |t7016 PROGRAM FORMAT=OMF,MODEL=SMALL,WIDTH=16, \ | | LISTMAP=ON,LISTGLOBALS=ON | | GLOBAL Write.D16, Exit.D16 ; Intentionally omitted Beep.D16. | | LINK t7016O.lib | | ENDPROGRAM t7016 |# I0560 Linking LIBOMF module ".\t7016O.lib". | **** ListMap "t7016.obj",groups=0,segments=1,entry=,stack= | [CODE],RVA=00000000h,size=00000025h=37,width=16,align=0010h,purpose=CODE | **** ListGlobals "t7016.obj",Global=2,Public=1,Extern=0,eXport=0,Import=0 | Beep.D16,[CODE]:00000010h,scope='P' | Exit.D16,[CODE]:00000020h,scope='G' | Write.D16,[CODE]:00000000h,scope='G'
Expected messages t7016.out
I0180 Assembling source file "t7016.htm". I0270 Assembling source "t7016". I0310 Assembling source pass 1. I0330 Assembling source pass 2 - final. I0470 Assembling program "t7016OW". "t7016.htm"{62} I0510 Assembling program pass 1. "t7016.htm"{62} I0510 Assembling program pass 2. "t7016.htm"{62} I0530 Assembling program pass 3 - final. "t7016.htm"{62} I0660 16bit SMALL OMF file "t7016OW.obj" created, size=104. "t7016.htm"{76} I0650 Program "t7016OW" assembled in 3 passes with errorlevel 0. "t7016.htm"{76} I0470 Assembling program "t7016OB". "t7016.htm"{82} I0510 Assembling program pass 1. "t7016.htm"{82} I0510 Assembling program pass 2. "t7016.htm"{82} I0530 Assembling program pass 3 - final. "t7016.htm"{82} I0660 16bit SMALL OMF file "t7016OB.obj" created, size=96. "t7016.htm"{92} I0650 Program "t7016OB" assembled in 3 passes with errorlevel 0. "t7016.htm"{92} I0470 Assembling program "t7016OE". "t7016.htm"{98} I0510 Assembling program pass 1. "t7016.htm"{98} I0510 Assembling program pass 2. "t7016.htm"{98} I0530 Assembling program pass 3 - final. "t7016.htm"{98} I0660 16bit SMALL OMF file "t7016OE.obj" created, size=94. "t7016.htm"{106} I0650 Program "t7016OE" assembled in 3 passes with errorlevel 0. "t7016.htm"{106} I0470 Assembling program "t7016O". "t7016.htm"{112} I0510 Assembling program pass 1. "t7016.htm"{112} I0530 Assembling program pass 2 - final. "t7016.htm"{112} I0560 Linking OMF module ".\t7016OW.obj". "t7016.htm"{115} I0560 Linking OMF module ".\t7016OB.obj". "t7016.htm"{115} I0560 Linking OMF module ".\t7016OE.obj". "t7016.htm"{115} I0660 16bit SMALL LIBOMF file "t7016O.lib" created, size=1536. "t7016.htm"{115} I0650 Program "t7016O" assembled in 2 passes with errorlevel 0. "t7016.htm"{115} I0470 Assembling program "t7016". "t7016.htm"{120} I0510 Assembling program pass 1. "t7016.htm"{120} I0510 Assembling program pass 2. "t7016.htm"{120} I0530 Assembling program pass 3 - final. "t7016.htm"{120} I0560 Linking LIBOMF module ".\t7016O.lib". "t7016.htm"{124} I0660 16bit SMALL OMF file "t7016.obj" created, size=190. "t7016.htm"{124} I0650 Program "t7016" assembled in 3 passes with errorlevel 0. "t7016.htm"{124} I0750 Source "t7016" (193 lines) assembled in 2 passes with errorlevel 0. I0860 Listing file "t7016.htm.lst" created, size=4923. I0990 EuroAssembler terminated with errorlevel 0.
Expected output file t7016. obj
0000: 80 07 00 05 74 37 30 31 36 32 88 10 00 00 00 45  ¤·°·t70162¤·°°°E
0010: 75 72 6F 41 73 73 65 6D 62 6C 65 72 2F 88 05 00  uroAssembler/¤·°
0020: 00 9D 33 73 30 96 07 00 00 04 43 4F 44 45 44 98  °¤3s0¤·°°·CODED¤
0030: 07 00 68 25 00 02 01 00 D1 8C 0C 00 09 57 72 69  ·°h%°··°¤¤·°·Wri
0040: 74 65 2E 44 31 36 00 7B 8C 0B 00 08 45 78 69 74  te.D16°{¤·°·Exit
0050: 2E 44 31 36 00 EE 90 10 00 00 01 09 57 72 69 74  .D16°¤¤·°°··Writ
0060: 65 2E 44 31 36 00 00 00 72 90 0F 00 00 01 08 42  e.D16°°°r¤·°°··B
0070: 65 65 70 2E 44 31 36 10 00 00 F3 90 0F 00 00 01  eep.D16·°°¤¤·°°·
0080: 08 45 78 69 74 2E 44 31 36 20 00 00 C5 A0 29 00  ·Exit.D16¯°°¤¤)°
0090: 01 00 00 B4 02 8A 14 84 D2 74 05 CD 21 46 EB F5  ·°°¤·¤·¤¤t·¤!F¤¤
00A0: C3 90 90 B2 07 B4 02 CD 21 C3 90 90 90 90 90 90  ¤¤¤¤·¤·¤!¤¤¤¤¤¤¤
00B0: 90 90 90 B8 00 4C CD 21 FA 8A 02 00 00 74        ¤¤¤¤°L¤!¤¤·°°t

▲Back to the top▲