EuroAssembler Index Manual Download Source Macros


Sitemap Links Forum Tests Projects

Test t7418: Compile BIN 16bit Dos


Description
Test creates executable 16bit BIN file t7418.bin.
See also
LinkerCombinations  
Tested procedures
PfbinCompile  
Source & expected listing t7418.htm.lst
| | EUROASM DEBUG=OFF,PROFILE=OFF,AUTOSEGMENT=ON,LIST=ON, \ | | DUMP=ON,DUMPWIDTH=25,DUMPALL=OFF,CPU=386 | |;; | |t7418 PROGRAM FORMAT=BIN,MODEL=TINY,WIDTH=16, \ | | IMAGEBASE=256K,LISTMAP=ON ,LISTGLOBALS=ON |[BIN] ::::Section changed. |0000:90 | NOP ; Unsignificant code marker. |0001:BE[0D00] | MOV SI,Message: ; Offset of the message. |0004:E83E00 | CALL Write.D16: ; Write the ASCIIZ string DS:SI. |0007:E84900 | CALL Beep.D16: ; Play a beep sound. |000A:E84D00 | CALL Exit.D16: ; Terminate the program with errorlevel 0. |000D:3136626974204249~~|Message: DB "16bit BIN program t7418.bin created by EuroAssembler.",13,10,0 |0045: |Write.D16: PROC ; Write ASCIIZ string DS:SI in 16bit DOS. |0045:B402 | MOV AH,02h ; Dos function WRITE CHARACTER FROM DL TO STANDARD OUTPUT. |0047:8A14 |.1:MOV DL,[SI] ; Get one character. |0049:84D2 | TEST DL ; Test if it is the terminating zero. |004B:7405 | JZ .9: ; Go to the end if so. |004D:CD21 | INT 21h ; Call DOS service to write a character. |004F:46 | INC SI ; Let SI point to the next character. |0050:EBF5 | JMP .1: ; Repeat until DL=0. |0052:C3 |.9:RET |0053: | ENDPROC Write.D16: |0053: |Beep.D16: PROC ; Echo beep sound in 16bit DOS. |0053:B207 | MOV DL,7 ; BEL character, interpreted as beep sound. |0055:B402 | MOV AH,2 ; DOS function WRITE CHARACTER TO STANDARD OUTPUT. |0057:CD21 | INT 0x21 ; Call DOS service to send a BEL. |0059:C3 | RET ; Return to caller. |005A: | ENDPROC Beep.D16: |005A: |Exit.D16: PROC ; Terminate program in 16bit DOS. |005A:B8004C | MOV AX,4C00h ; DOS function TERMINATE WITH RETURN CODE IN AL. |005D:CD21 | INT 21h ; Call DOS service to terminate the program. |005F: | ENDPROC Exit.D16: | |ENDPROGRAM t7418 | **** ListMap "t7418.bin",groups=1,segments=1,entry=,stack=[BIN]:0000FFFEh | [BIN],VA=00040000h,size=0000005Fh=95,group [BIN] | [BIN],VA=00040000h,size=0000005Fh=95,width=16,align=0010h,purpose=CODE+DATA+BSS+STACK | **** ListGlobals "t7418.bin",Global=0,Public=0,Extern=0,eXport=0,Import=0
Expected messages t7418.out
I0180 Assembling source file "t7418.htm". I0270 Assembling source "t7418". I0310 Assembling source pass 1. I0330 Assembling source pass 2 - final. I0470 Assembling program "t7418". "t7418.htm"{59} I0510 Assembling program pass 1. "t7418.htm"{59} I0510 Assembling program pass 2. "t7418.htm"{59} I0530 Assembling program pass 3 - final. "t7418.htm"{59} I0660 16bit TINY BIN file "t7418.bin" created, size=95. "t7418.htm"{88} I0650 Program "t7418" assembled in 3 passes with errorlevel 0. "t7418.htm"{88} I0750 Source "t7418" (121 lines) assembled in 2 passes with errorlevel 0. I0860 Listing file "t7418.htm.lst" created, size=2784. I0990 EuroAssembler terminated with errorlevel 0.
Expected output file t7418. bin
0000: 90 BE 0D 00 E8 3E 00 E8 49 00 E8 4D 00 31 36 62  ¤¤·°¤>°¤I°¤M°16b
0010: 69 74 20 42 49 4E 20 70 72 6F 67 72 61 6D 20 74  it¯BIN¯program¯t
0020: 37 34 31 38 2E 62 69 6E 20 63 72 65 61 74 65 64  7418.bin¯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▲