EuroAssembler Index Manual Download Source Macros


Sitemap Links Forum Tests Projects

Test t7921: Compile to MZ linking from 1 OMF in SMALL model, ungrouped unaligned segments.


Description
Linked as SMALL model from two 16bit programs. Executable as t7921.exe.
Tested procedures
SssRelocateSegment   PgmLinkImage  
Source & expected listing t7921.htm.lst
| | EUROASM LIST=ON,DUMP=ON,DUMPWIDTH=22 | |t7921A PROGRAM FORMAT=OMF,MODEL=SMALL,LISTMAP=ON,LISTGLOBALS=ON |[SUBPROC] |[SUBPROC] SEGMENT WIDTH=16,PURPOSE=CODE,ALIGN=BYTE |0000:90 | NOP |0001: | Write::PROC ; Write $-terminated string DS:DX to sysout. |0001:B409 | MOV AH,9 |0003:CD21 | INT 0x21 |0005:C3 | RET |0006: | ENDP Write:: |0006: | Terminate::PROC ; Terminate program with errorlevel 0. |0006:B8004C | MOV AX,0x4C00 |0009:CD21 | INT 0x21 |000B:C3 | RET |000C: | ENDP Terminate:: |[STACK] |[STACK] SEGMENT WIDTH=16,PURPOSE=STACK |0000:..............~| D 32*WORD | | ENDPROGRAM t7921A | **** ListMap "t7921A.obj",groups=0,segments=2,entry=,stack=[STACK]:00000040h | [SUBPROC],RVA=00000000h,size=0000000Ch=12,width=16,align=1,purpose=CODE | [STACK],RVA=00000000h,size=00000040h=64,width=16,align=16,purpose=STACK | **** ListGlobals "t7921A.obj",Global=0,Public=2,Extern=0,eXport=0,Import=0 | Terminate,[SUBPROC]:00000006h,scope='P' | Write,[SUBPROC]:00000001h,scope='P' | |t7921 PROGRAM FORMAT=MZ,MODEL=SMALL,LISTMAP=ON,LISTGLOBALS=ON,ENTRY=Start: |[DATA] |[DATA] SEGMENT WIDTH=16,PURPOSE=DATA |0000:4575726F417373~|Txt1: DB "EuroAssembler test t7921",13,10,'$' |001B:45786563757461~|Txt2: DB "Executable as t7921.exe",13,10,'$' |[CODE] |[CODE] SEGMENT WIDTH=16,PURPOSE=CODE |0000:90 | NOP |0001: |Start: |0001:B8{0000} | MOV AX,PARA# Txt1: |0004:8ED8 | MOV DS,AX |0006:BA[0000] | MOV DX,Txt1: |0009:E8(0000) | CALL Write:: |000C:BA[1B00] | MOV DX,Txt2: |000F:E8(0000) | CALL Write:: |0012:E8(0000) | CALL Terminate:: | | LINK "t7921A.obj" | |ENDPROGRAM t7921 |# I0560 Linking OMF module ".\t7921A.obj". | **** ListMap "t7921.exe",groups=3,segments=4,entry=[CODE]:00000001h,stack=[STACK]:00000040h | [DATA],RVA=00000000h,size=00000035h=53,group [DATA] | [DATA],RVA=00000000h,size=00000035h=53,width=16,align=16,purpose=DATA | [CODE],RVA=00000040h,size=00000021h=33,group [CODE] [SUBPROC] | [CODE],RVA=00000040h,size=00000015h=21,width=16,align=16,purpose=CODE | [SUBPROC],RVA=00000055h,size=0000000Ch=12,width=16,align=1,purpose=CODE+DATA | [STACK],RVA=00000070h,size=00000040h=64,group [STACK] | [STACK],RVA=00000070h,size=00000040h=64,width=16,align=16,purpose=STACK | **** ListGlobals "t7921.exe",Global=2,Public=1,Extern=0,eXport=0,Import=0 | Start,[CODE]:00000001h,RVA=00000041h,scope='P' | Terminate,[CODE]:0000001Bh,RVA=0000005Bh,scope='G' | Write,[CODE]:00000016h,RVA=00000056h,scope='G'
Expected messages t7921.out
I0180 Assembling source file "t7921.htm". I0270 Assembling source "t7921". I0310 Assembling source pass 1. I0330 Assembling source pass 2 - final. I0470 Assembling program "t7921A". "t7921.htm"{56} I0510 Assembling program pass 1. "t7921.htm"{56} I0510 Assembling program pass 2. "t7921.htm"{56} I0530 Assembling program pass 3 - final. "t7921.htm"{56} I0660 16bit SMALL OMF file "t7921A.obj" created, size=135. "t7921.htm"{71} I0650 Program "t7921A" assembled in 3 passes with errorlevel 0. "t7921.htm"{71} I0470 Assembling program "t7921". "t7921.htm"{78} I0510 Assembling program pass 1. "t7921.htm"{78} I0510 Assembling program pass 2. "t7921.htm"{78} I0530 Assembling program pass 3 - final. "t7921.htm"{78} I0560 Linking OMF module ".\t7921A.obj". "t7921.htm"{93} I0660 16bit SMALL MZ file "t7921.exe" created, size=193. "t7921.htm"{93} I0650 Program "t7921" assembled in 3 passes with errorlevel 0. "t7921.htm"{93} I0750 Source "t7921" (149 lines) assembled in 2 passes with errorlevel 0. I0860 Listing file "t7921.htm.lst" created, size=2968. I0990 EuroAssembler terminated with errorlevel 0.
Expected output file t7921. exe
0000: 4D 5A C1 00 01 00 01 00 06 00 05 00 FF FF 07 00  MZ¤°·°·°·°·°¤¤·°
0010: 40 00 C9 9F 01 00 04 00 40 00 00 00 00 00 00 00  @°¤¤·°·°@°°°°°°°
0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0040: 02 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00  ·°·°°°°°°°°°°°°°
0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0060: 45 75 72 6F 41 73 73 65 6D 62 6C 65 72 20 74 65  EuroAssembler¯te
0070: 73 74 20 74 37 39 32 31 0D 0A 24 45 78 65 63 75  st¯t7921·¬$Execu
0080: 74 61 62 6C 65 20 61 73 20 74 37 39 32 31 2E 65  table¯as¯t7921.e
0090: 78 65 0D 0A 24 00 00 00 00 00 00 00 00 00 00 00  xe·¬$°°°°°°°°°°°
00A0: 90 B8 00 00 8E D8 BA 00 00 E8 0A 00 BA 1B 00 E8  ¤¤°°¤¤¤°°¤¬°¤·°¤
00B0: 04 00 E8 06 00 90 B4 09 CD 21 C3 B8 00 4C CD 21  ·°¤·°¤¤·¤!¤¤°L¤!
00C0: C3                                               ¤

▲Back to the top▲