EuroAssembler Index Manual Download Source Macros


Sitemap Links Forum Tests Projects

Test t7430: Compile BIN 16bit Dos linking LIBCOF 16bit Dos


Description
Test creates executable 16bit BIN file t7430.bin from linkable 16bit LIBCOF module.
See also
LinkerCombinations  
Tested procedures
PfbinCompile   PflibcofLoadPgm  
Source & expected listing t7430.htm.lst
| | EUROASM DEBUG=OFF,PROFILE=OFF,AUTOSEGMENT=ON,LIST=ON, \ | | DUMP=ON,DUMPWIDTH=25,DUMPALL=OFF,CPU=386 | |;; | |t7430CW PROGRAM FORMAT=COFF,MODEL=FLAT,WIDTH=16, \ | | LISTMAP=ON,LISTGLOBALS=ON | | PUBLIC Write.D16 |[.text] ::::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 t7430CW | **** ListMap "t7430CW.obj",groups=0,segments=1,entry=,stack= | [.text],RVA=00000000h,size=0000000Eh=14,width=16,align=0010h,purpose=CODE | **** ListGlobals "t7430CW.obj",Global=0,Public=1,Extern=0,eXport=0,Import=0 | Write.D16,[.text]:00000000h,scope='P' | |;; | |t7430CB PROGRAM FORMAT=COFF,MODEL=FLAT,WIDTH=16, \ | | LISTMAP=ON,LISTGLOBALS=ON | | PUBLIC Beep.D16 |[.text] ::::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 t7430CB | **** ListMap "t7430CB.obj",groups=0,segments=1,entry=,stack= | [.text],RVA=00000000h,size=00000007h=7,width=16,align=0010h,purpose=CODE | **** ListGlobals "t7430CB.obj",Global=0,Public=1,Extern=0,eXport=0,Import=0 | Beep.D16,[.text]:00000000h,scope='P' | |;; | |t7430CE PROGRAM FORMAT=COFF,MODEL=FLAT,WIDTH=16, \ | | LISTMAP=ON,LISTGLOBALS=ON | | PUBLIC Exit.D16 |[.text] ::::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 t7430CE | **** ListMap "t7430CE.obj",groups=0,segments=1,entry=,stack= | [.text],RVA=00000000h,size=00000005h=5,width=16,align=0010h,purpose=CODE | **** ListGlobals "t7430CE.obj",Global=0,Public=1,Extern=0,eXport=0,Import=0 | Exit.D16,[.text]:00000000h,scope='P' | |;; | |t7430C PROGRAM FORMAT=LIBCOF,MODEL=FLAT,WIDTH=16, \ | | LISTMAP=OFF,LISTGLOBALS=OFF | | LINK t7430CW.obj, t7430CB.obj, t7430CE.obj | |ENDPROGRAM t7430C |# I0560 Linking COFF module ".\t7430CW.obj". |# I0560 Linking COFF module ".\t7430CB.obj". |# I0560 Linking COFF module ".\t7430CE.obj". | |;; | |t7430 PROGRAM FORMAT=BIN,MODEL=TINY,WIDTH=16, \ | | IMAGEBASE=256K,LISTMAP=ON ,LISTGLOBALS=ON | | GLOBAL Write.D16, Exit.D16 ; Intentionally omitted Beep.D16. | | LINK t7430C.lib |[BIN] ::::Section changed. |0000:90 | NOP ; Unsignificant code marker. |0001:BE[0A00] | MOV SI,Message: ; Offset of the message. |0004:E8(0000) | CALL Write.D16: ; Write the ASCIIZ string DS:SI. |0007:E8(0000) | CALL Exit.D16: ; Terminate the program with errorlevel 0. |000A:3136626974204249~~|Message: DB "16bit BIN program t7430.bin created by EuroAssembler linking 16bit LIBCOF.",13,10,0 | |ENDPROGRAM t7430 |# I0560 Linking LIBCOF module ".\t7430C.lib". | **** ListMap "t7430.bin",groups=1,segments=2,entry=,stack=[BIN]:0000FFFEh | [BIN],VA=00040000h,size=00000075h=117,group [BIN] [.text] | [BIN],VA=00040000h,size=00000057h=87,width=16,align=0010h,purpose=CODE+DATA+BSS+STACK | [.text],VA=00040060h,size=00000015h=21,width=16,align=0010h,purpose=CODE | **** ListGlobals "t7430.bin",Global=2,Public=0,Extern=0,eXport=0,Import=0 | Exit.D16,[BIN]:00000070h,VA=00040070h,scope='G' | Write.D16,[BIN]:00000060h,VA=00040060h,scope='G'
Expected messages t7430.out
I0180 Assembling source file "t7430.htm". I0270 Assembling source "t7430". I0310 Assembling source pass 1. I0330 Assembling source pass 2 - final. I0470 Assembling program "t7430CW". "t7430.htm"{62} I0510 Assembling program pass 1. "t7430.htm"{62} I0510 Assembling program pass 2. "t7430.htm"{62} I0530 Assembling program pass 3 - final. "t7430.htm"{62} I0660 16bit FLAT COFF file "t7430CW.obj" created, size=238. "t7430.htm"{76} I0650 Program "t7430CW" assembled in 3 passes with errorlevel 0. "t7430.htm"{76} I0470 Assembling program "t7430CB". "t7430.htm"{82} I0510 Assembling program pass 1. "t7430.htm"{82} I0510 Assembling program pass 2. "t7430.htm"{82} I0530 Assembling program pass 3 - final. "t7430.htm"{82} I0660 16bit FLAT COFF file "t7430CB.obj" created, size=162. "t7430.htm"{92} I0650 Program "t7430CB" assembled in 3 passes with errorlevel 0. "t7430.htm"{92} I0470 Assembling program "t7430CE". "t7430.htm"{98} I0510 Assembling program pass 1. "t7430.htm"{98} I0510 Assembling program pass 2. "t7430.htm"{98} I0530 Assembling program pass 3 - final. "t7430.htm"{98} I0660 16bit FLAT COFF file "t7430CE.obj" created, size=160. "t7430.htm"{106} I0650 Program "t7430CE" assembled in 3 passes with errorlevel 0. "t7430.htm"{106} I0470 Assembling program "t7430C". "t7430.htm"{112} I0510 Assembling program pass 1. "t7430.htm"{112} I0530 Assembling program pass 2 - final. "t7430.htm"{112} I0560 Linking COFF module ".\t7430CW.obj". "t7430.htm"{115} I0560 Linking COFF module ".\t7430CB.obj". "t7430.htm"{115} I0560 Linking COFF module ".\t7430CE.obj". "t7430.htm"{115} I0660 16bit FLAT LIBCOF file "t7430C.lib" created, size=968. "t7430.htm"{115} I0650 Program "t7430C" assembled in 2 passes with errorlevel 0. "t7430.htm"{115} I0470 Assembling program "t7430". "t7430.htm"{120} I0510 Assembling program pass 1. "t7430.htm"{120} I0510 Assembling program pass 2. "t7430.htm"{120} I0530 Assembling program pass 3 - final. "t7430.htm"{120} I0560 Linking LIBCOF module ".\t7430C.lib". "t7430.htm"{130} I0660 16bit TINY BIN file "t7430.bin" created, size=117. "t7430.htm"{130} I0650 Program "t7430" assembled in 3 passes with errorlevel 0. "t7430.htm"{130} I0750 Source "t7430" (196 lines) assembled in 2 passes with errorlevel 0. I0860 Listing file "t7430.htm.lst" created, size=5358. I0990 EuroAssembler terminated with errorlevel 0.
Expected output file t7430. bin
0000: 90 BE 0A 00 E8 59 00 E8 66 00 31 36 62 69 74 20  ¤¤¬°¤Y°¤f°16bit¯
0010: 42 49 4E 20 70 72 6F 67 72 61 6D 20 74 37 34 33  BIN¯program¯t743
0020: 30 2E 62 69 6E 20 63 72 65 61 74 65 64 20 62 79  0.bin¯created¯by
0030: 20 45 75 72 6F 41 73 73 65 6D 62 6C 65 72 20 6C  ¯EuroAssembler¯l
0040: 69 6E 6B 69 6E 67 20 31 36 62 69 74 20 4C 49 42  inking¯16bit¯LIB
0050: 43 4F 46 2E 0D 0A 00 00 00 00 00 00 00 00 00 00  COF.·¬°°°°°°°°°°
0060: B4 02 8A 14 84 D2 74 05 CD 21 46 EB F5 C3 90 90  ¤·¤·¤¤t·¤!F¤¤¤¤¤
0070: B8 00 4C CD 21                                   ¤°L¤!

▲Back to the top▲