EuroAssembler Index Manual Download Source Macros


Sitemap Links Forum Tests Projects

Test t7190: Compile COFF 16bit Dos


Description
Test creates linkable 16bit COFF file t7190.obj.
See also
LinkerCombinations  
Tested procedures
PfcoffCompile  
Source & expected listing t7190.htm.lst
| | EUROASM DEBUG=OFF,PROFILE=OFF,AUTOSEGMENT=ON,LIST=ON, \ | | DUMP=ON,DUMPWIDTH=25,DUMPALL=OFF,CPU=386 | |;; | |t7190 PROGRAM FORMAT=COFF,MODEL=FLAT,WIDTH=16, \ | | LISTMAP=ON,LISTGLOBALS=ON | | PUBLIC Write.D16, Beep.D16, Exit.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: |000E: |Beep.D16: PROC ; Echo beep sound in 16bit DOS. |000E:B207 | MOV DL,7 ; BEL character, interpreted as beep sound. |0010:B402 | MOV AH,2 ; DOS function WRITE CHARACTER TO STANDARD OUTPUT. |0012:CD21 | INT 0x21 ; Call DOS service to send a BEL. |0014:C3 | RET ; Return to caller. |0015: | ENDPROC Beep.D16: |0015: |Exit.D16: PROC ; Terminate program in 16bit DOS. |0015:B8004C | MOV AX,4C00h ; DOS function TERMINATE WITH RETURN CODE IN AL. |0018:CD21 | INT 21h ; Call DOS service to terminate the program. |001A: | ENDPROC Exit.D16: | |ENDPROGRAM t7190 | **** ListMap "t7190.obj",groups=0,segments=1,entry=,stack= | [.text],RVA=00000000h,size=0000001Ah=26,width=16,align=0010h,purpose=CODE | **** ListGlobals "t7190.obj",Global=0,Public=3,Extern=0,eXport=0,Import=0 | Beep.D16,[.text]:0000000Eh,scope='P' | Exit.D16,[.text]:00000015h,scope='P' | Write.D16,[.text]:00000000h,scope='P'
Expected messages t7190.out
I0180 Assembling source file "t7190.htm". I0270 Assembling source "t7190". I0310 Assembling source pass 1. I0330 Assembling source pass 2 - final. I0470 Assembling program "t7190". "t7190.htm"{59} I0510 Assembling program pass 1. "t7190.htm"{59} I0510 Assembling program pass 2. "t7190.htm"{59} I0530 Assembling program pass 3 - final. "t7190.htm"{59} I0660 16bit FLAT COFF file "t7190.obj" created, size=286. "t7190.htm"{83} I0650 Program "t7190" assembled in 3 passes with errorlevel 0. "t7190.htm"{83} I0750 Source "t7190" (130 lines) assembled in 2 passes with errorlevel 0. I0860 Listing file "t7190.htm.lst" created, size=2397. I0990 EuroAssembler terminated with errorlevel 0.
Expected output file t7190. obj
0000: 4C 01 01 00 00 00 00 00 56 00 00 00 09 00 00 00  L··°°°°°V°°°·°°°
0010: 00 00 00 00 2E 74 65 78 74 00 00 00 00 00 00 00  °°°°.text°°°°°°°
0020: 00 00 00 00 1A 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 B2 07 B4 02 CD 21  ¤¤t·¤!F¤¤¤¤·¤·¤!
0050: C3 B8 00 4C CD 21 2E 66 69 6C 65 00 00 00 00 00  ¤¤°L¤!.file°°°°°
0060: 00 00 FE FF 00 00 67 01 74 37 31 39 30 2E 68 74  °°¤¤°°g·t7190.ht
0070: 6D 00 00 00 00 00 00 00 00 00 2E 74 65 78 74 00  m°°°°°°°°°.text°
0080: 00 00 00 00 00 00 01 00 00 00 03 01 1A 00 00 00  °°°°°°·°°°···°°°
0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
00A0: 00 00 04 00 00 00 00 00 00 00 01 00 01 02 02 00  °°·°°°°°°°·°···°
00B0: 42 65 65 70 2E 44 31 36 0E 00 00 00 01 00 01 02  Beep.D16·°°°·°··
00C0: 02 00 45 78 69 74 2E 44 31 36 15 00 00 00 01 00  ·°Exit.D16·°°°·°
00D0: 01 02 02 00 00 00 00 00 0E 00 00 00 02 00 00 00  ···°°°°°·°°°·°°°
00E0: 01 00 00 00 03 00 00 00 00 00 1A 00 00 00 0D 00  ·°°°·°°°°°·°°°·°
00F0: 00 00 01 00 00 00 03 00 26 00 00 00 57 72 69 74  °°·°°°·°&°°°Writ
0100: 65 2E 44 31 36 00 57 72 69 74 65 2E 44 31 36 2E  e.D16°Write.D16.
0110: 31 00 57 72 69 74 65 2E 44 31 36 2E 39 00        1°Write.D16.9°

▲Back to the top▲