EuroAssembler Index Manual Download Source Macros


Sitemap Links Forum Tests Projects

Test t7457: Compile COM 16bit Dos


Description
Test creates executable 16bit COM file t7457.com.
See also
LinkerCombinations  
Tested procedures
PfcomCompile  
Source & expected listing t7457.htm.lst
| | EUROASM DEBUG=OFF,PROFILE=OFF,AUTOSEGMENT=ON,LIST=ON, \ | | DUMP=ON,DUMPWIDTH=25,DUMPALL=OFF,CPU=086 | |;; | |t7457 PROGRAM FORMAT=COM,MODEL=TINY,WIDTH=16, \ | | LISTMAP=ON ,LISTGLOBALS=ON |[COM] ::::Section changed. |0100:90 | NOP ; Unsignificant code marker. |0101:BE[0D01] | MOV SI,Message: ; Offset of the message. |0104:E83E00 | CALL Write.D16: ; Write the ASCIIZ string DS:SI. |0107:E84900 | CALL Beep.D16: ; Play a beep sound. |010A:E84D00 | CALL Exit.D16: ; Terminate the program with errorlevel 0. |010D:313662697420434F~~|Message: DB "16bit COM program t7457.com created by EuroAssembler.",13,10,0 |0145: |Write.D16: PROC ; Write ASCIIZ string DS:SI in 16bit DOS. |0145:B402 | MOV AH,02h ; Dos function WRITE CHARACTER FROM DL TO STANDARD OUTPUT. |0147:8A14 |.1:MOV DL,[SI] ; Get one character. |0149:84D2 | TEST DL ; Test if it is the terminating zero. |014B:7405 | JZ .9: ; Go to the end if so. |014D:CD21 | INT 21h ; Call DOS service to write a character. |014F:46 | INC SI ; Let SI point to the next character. |0150:EBF5 | JMP .1: ; Repeat until DL=0. |0152:C3 |.9:RET |0153: | ENDPROC Write.D16: |0153: |Beep.D16: PROC ; Echo beep sound in 16bit DOS. |0153:B207 | MOV DL,7 ; BEL character, interpreted as beep sound. |0155:B402 | MOV AH,2 ; DOS function WRITE CHARACTER TO STANDARD OUTPUT. |0157:CD21 | INT 0x21 ; Call DOS service to send a BEL. |0159:C3 | RET ; Return to caller. |015A: | ENDPROC Beep.D16: |015A: |Exit.D16: PROC ; Terminate program in 16bit DOS. |015A:B8004C | MOV AX,4C00h ; DOS function TERMINATE WITH RETURN CODE IN AL. |015D:CD21 | INT 21h ; Call DOS service to terminate the program. |015F: | ENDPROC Exit.D16: | |ENDPROGRAM t7457 | **** ListMap "t7457.com",groups=1,segments=1,entry=[COM]:00000100h,stack=[COM]:0000FFFEh | [COM],RVA=00000000h,size=0000015Fh=351,group [COM] | [COM],RVA=00000000h,size=0000015Fh=351,width=16,align=0010h,purpose=CODE+DATA+BSS+STACK | **** ListGlobals "t7457.com",Global=0,Public=0,Extern=0,eXport=0,Import=0
Expected messages t7457.out
I0180 Assembling source file "t7457.htm". I0270 Assembling source "t7457". I0310 Assembling source pass 1. I0330 Assembling source pass 2 - final. I0470 Assembling program "t7457". "t7457.htm"{59} I0510 Assembling program pass 1. "t7457.htm"{59} I0510 Assembling program pass 2. "t7457.htm"{59} I0510 Assembling program pass 3. "t7457.htm"{59} I0530 Assembling program pass 4 - final. "t7457.htm"{59} I0660 16bit TINY COM file "t7457.com" created, size=95. "t7457.htm"{88} I0650 Program "t7457" assembled in 4 passes with errorlevel 0. "t7457.htm"{88} I0750 Source "t7457" (122 lines) assembled in 2 passes with errorlevel 0. I0860 Listing file "t7457.htm.lst" created, size=2702. I0990 EuroAssembler terminated with errorlevel 0.
Expected output file t7457. com
0000: 90 BE 0D 01 E8 3E 00 E8 49 00 E8 4D 00 31 36 62  ¤¤··¤>°¤I°¤M°16b
0010: 69 74 20 43 4F 4D 20 70 72 6F 67 72 61 6D 20 74  it¯COM¯program¯t
0020: 37 34 35 37 2E 63 6F 6D 20 63 72 65 61 74 65 64  7457.com¯created
0030: 20 62 79 20 45 75 72 6F 41 73 73 65 6D 62 6C 65  ¯by¯EuroAssemble
0040: 72 2E 0D 0A 00 B4 02 8A 14 84 D2 74 05 CD 21 46  r.·¬°¤·¤·¤¤t·¤!F
0050: EB F5 C3 B2 07 B4 02 CD 21 C3 B8 00 4C CD 21     ¤¤¤¤·¤·¤!¤¤°L¤!

▲Back to the top▲