EuroAssembler Index Manual Download Source Macros


Sitemap Links Forum Tests Projects

Test t7930: Compile to MZ linking from 2 OMF in SMALL model, ungrouped aligned segments.


Description
Executable linked from 3 modules in SMALL memory model. Default distance is NEAR. Executing t7930.exe should write "AAAA BBBB CCCC".
Source & expected listing t7930.htm.lst
| | EUROASM LIST=ON,DUMP=ON,DUMPWIDTH=22 |534D414C4C |%MODEL %SET SMALL |3136 |%ALIGN %SET 16 | |t7930A PROGRAM FORMAT=OMF,MODEL=%MODEL,LISTMAP=ON,LISTGLOBALS=ON |[DATA] |[DATA] SEGMENT WIDTH=16,PURPOSE=DATA,COMBINE=PUBLIC,ALIGN=%ALIGN |0000:AAAA | DW 0xAAAA |0002:414141412024 |TxtA:: DB "AAAA $" |0008:434343432024 |TxtC:: DB "CCCC $" |[CODE] |[CODE] SEGMENT WIDTH=16,PURPOSE=CODE,COMBINE=PUBLIC,ALIGN=%ALIGN |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:: | |ENDPROGRAM t7930A | **** ListMap "t7930A.obj",groups=0,segments=2,entry=,stack= | [DATA],RVA=00000000h,size=0000000Eh=14,width=16,align=0010h,purpose=DATA | [CODE],RVA=00000000h,size=0000000Ch=12,width=16,align=0010h,purpose=CODE | **** ListGlobals "t7930A.obj",Global=0,Public=4,Extern=0,eXport=0,Import=0 | Terminate,[CODE]:00000006h,scope='P' | TxtA,[DATA]:00000002h,scope='P' | TxtC,[DATA]:00000008h,scope='P' | Write,[CODE]:00000001h,scope='P' | |t7930B PROGRAM FORMAT=OMF,MODEL=%MODEL,LISTMAP=ON,LISTGLOBALS=ON |[DATA] |[DATA] SEGMENT WIDTH=16,PURPOSE=DATA,COMBINE=PUBLIC,ALIGN=%ALIGN |0000:BBBBBBBB | DW 0xBBBB,0xBBBB |0004:424242422024 |TxtB:: DB "BBBB $" |000A:[0000] |PtrC:: DW TxtC:: |[CODE] |[CODE] SEGMENT WIDTH=16,PURPOSE=CODE,COMBINE=PUBLIC,ALIGN=%ALIGN |0000:6690 | NOP2 |0002: |WriteAll::PROC |0002:B8{0000} | MOV AX,PARA# Hdr:: |0005:8ED8 | MOV DS,AX |0007:BA[0000] | MOV DX,TxtA:: |000A:E8(0000) | CALL Write:: |000D:BA[0400] | MOV DX,TxtB:: |0010:E8(0000) | CALL Write:: |0013:8B16[0A00] | MOV DX,[PtrC::] |0017:E8(0000) | CALL Write:: |001A:C3 | RET |001B: | ENDP WriteAll:: |[STACK] |[STACK] SEGMENT WIDTH=16,PURPOSE=STACK,COMBINE=STACK |0000:..............~| D 16*WORD | |ENDPROGRAM t7930B | **** ListMap "t7930B.obj",groups=0,segments=3,entry=,stack=[STACK]:00000020h | [DATA],RVA=00000000h,size=0000000Ch=12,width=16,align=0010h,purpose=DATA | [CODE],RVA=00000000h,size=0000001Bh=27,width=16,align=0010h,purpose=CODE | [STACK],RVA=00000000h,size=00000020h=32,width=16,align=0010h,purpose=STACK | **** ListGlobals "t7930B.obj",Global=0,Public=3,Extern=4,eXport=0,Import=0 | Hdr,[Hdr]:00000000h,scope='E' | PtrC,[DATA]:0000000Ah,scope='P' | TxtA,[TxtA]:00000000h,scope='E' | TxtB,[DATA]:00000004h,scope='P' | TxtC,[TxtC]:00000000h,scope='E' | Write,[Write]:00000000h,scope='E' | WriteAll,[CODE]:00000002h,scope='P' | |t7930 PROGRAM FORMAT=MZ,MODEL=%MODEL,LISTMAP=ON,LISTGLOBALS=ON,ENTRY=Start: |[DATA] |[DATA] SEGMENT WIDTH=16,PURPOSE=DATA,ALIGN=%ALIGN |0000:1111 | DW 0x1111 |0002:4575726F417373~|Hdr:: DB "EuroAssembler test t7930.exe",13,10,'$' |[STACK] |[STACK] SEGMENT WIDTH=16,PURPOSE=STACK,COMBINE=STACK |0000:..............~| D 8*WORD |[CODE] |[CODE] SEGMENT WIDTH=16,PURPOSE=CODE,COMBINE=PUBLIC,ALIGN=%ALIGN |0000:90 | NOP |0001: |Start: |0001:E8(0000) | CALL WriteAll:: |0004:E8(0000) | CALL Terminate:: |0007:C3 | RET | | LINK "t7930A.obj" | | LINK "t7930B.obj" | |ENDPROGRAM t7930 |# I0560 Linking OMF module ".\t7930A.obj". |# I0560 Linking OMF module ".\t7930B.obj". | **** ListMap "t7930.exe",groups=3,segments=3,entry=[CODE]:00000001h,stack=[STACK]:00000030h | [DATA],RVA=00000000h,size=0000004Ch=76,group [DATA] | [DATA],RVA=00000000h,size=0000004Ch=76,width=16,align=0010h,purpose=DATA | [CODE],RVA=00000050h,size=0000003Bh=59,group [CODE] | [CODE],RVA=00000050h,size=0000003Bh=59,width=16,align=0010h,purpose=CODE | [STACK],RVA=00000090h,size=00000030h=48,group [STACK] | [STACK],RVA=00000090h,size=00000030h=48,width=16,align=0010h,purpose=STACK | **** ListGlobals "t7930.exe",Global=6,Public=3,Extern=0,eXport=0,Import=0 | Hdr,[DATA]:00000002h,RVA=00000002h,scope='G' | PtrC,[DATA]:0000004Ah,RVA=0000004Ah,scope='P' | Start,[CODE]:00000001h,RVA=00000051h,scope='P' | Terminate,[CODE]:00000016h,RVA=00000066h,scope='G' | TxtA,[DATA]:00000032h,RVA=00000032h,scope='G' | TxtB,[DATA]:00000044h,RVA=00000044h,scope='P' | TxtC,[DATA]:00000038h,RVA=00000038h,scope='G' | Write,[CODE]:00000011h,RVA=00000061h,scope='G' | WriteAll,[CODE]:00000022h,RVA=00000072h,scope='G'
Expected messages t7930.out
I0180 Assembling source file "t7930.htm". I0270 Assembling source "t7930". I0310 Assembling source pass 1. I0330 Assembling source pass 2 - final. I0470 Assembling program "t7930A". "t7930.htm"{50} I0510 Assembling program pass 1. "t7930.htm"{50} I0510 Assembling program pass 2. "t7930.htm"{50} I0530 Assembling program pass 3 - final. "t7930.htm"{50} I0660 16bit SMALL OMF file "t7930A.obj" created, size=180. "t7930.htm"{67} I0650 Program "t7930A" assembled in 3 passes with errorlevel 0. "t7930.htm"{67} I0470 Assembling program "t7930B". "t7930.htm"{76} I0510 Assembling program pass 1. "t7930.htm"{76} I0510 Assembling program pass 2. "t7930.htm"{76} I0530 Assembling program pass 3 - final. "t7930.htm"{76} I0660 16bit SMALL OMF file "t7930B.obj" created, size=273. "t7930.htm"{96} I0650 Program "t7930B" assembled in 3 passes with errorlevel 0. "t7930.htm"{96} I0470 Assembling program "t7930". "t7930.htm"{109} I0510 Assembling program pass 1. "t7930.htm"{109} I0510 Assembling program pass 2. "t7930.htm"{109} I0530 Assembling program pass 3 - final. "t7930.htm"{109} I0560 Linking OMF module ".\t7930A.obj". "t7930.htm"{123} I0560 Linking OMF module ".\t7930B.obj". "t7930.htm"{123} I0660 16bit SMALL MZ file "t7930.exe" created, size=235. "t7930.htm"{123} I0650 Program "t7930" assembled in 3 passes with errorlevel 0. "t7930.htm"{123} I0750 Source "t7930" (194 lines) assembled in 2 passes with errorlevel 0. I0860 Listing file "t7930.htm.lst" created, size=5275. I0990 EuroAssembler terminated with errorlevel 0.
Expected output file t7930. exe
0000: 4D 5A EB 00 01 00 01 00 06 00 04 00 FF FF 09 00  MZ¤°·°·°·°·°¤¤·°
0010: 30 00 03 38 01 00 05 00 40 00 00 00 00 00 00 00  0°·8·°·°@°°°°°°°
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: 23 00 05 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: 11 11 45 75 72 6F 41 73 73 65 6D 62 6C 65 72 20  ··EuroAssembler¯
0070: 74 65 73 74 20 74 37 39 33 30 2E 65 78 65 0D 0A  test¯t7930.exe·¬
0080: 24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  $°°°°°°°°°°°°°°°
0090: AA AA 41 41 41 41 20 24 43 43 43 43 20 24 00 00  ¤¤AAAA¯$CCCC¯$°°
00A0: BB BB BB BB 42 42 42 42 20 24 38 00 00 00 00 00  ¤¤¤¤BBBB¯$8°°°°°
00B0: 90 E8 1E 00 E8 0F 00 C3 90 90 90 90 90 90 90 90  ¤¤·°¤·°¤¤¤¤¤¤¤¤¤
00C0: 90 B4 09 CD 21 C3 B8 00 4C CD 21 C3 90 90 90 90  ¤¤·¤!¤¤°L¤!¤¤¤¤¤
00D0: 66 90 B8 00 00 8E D8 BA 32 00 E8 E4 FF BA 44 00  f¤¤°°¤¤¤2°¤¤¤¤D°
00E0: E8 DE FF 8B 16 4A 00 E8 D7 FF C3                 ¤¤¤¤·J°¤¤¤¤

▲Back to the top▲