| Index | Manual | Download | Source | Macros | Embedded word Case ins.
Sitemap | Links | Forum | Tests | Projects

# Test t3145: Machine instruction JMP automatic distance

Description
  JMP default distance selected by memory model.
Tested procedures
  IiDispatchLocation

Source & expected listing t3145.htm.lst
  `| | EUROASM LIST=ON,DUMP=ON,DUMPWIDTH=22,CPU=386 | |t3145 PROGRAM FORMAT=BIN,MODEL=MEDIUM,IMAGEBASE=0x3000,LISTMAP=ON,LISTGLOBALS=OFF |[CodeSeg] |[CodeSeg] SEGMENT PURPOSE=CODE,WIDTH=16 ; Linked at 0x0300:0. |0000:E9(1800) | JMPN FarLabel: |0003:EA[1800]{0000} | JMPF FarLabel: |0008:EA[1800]{0000} | JMP FarLabel: ; Defaults to JMPF due to the different target segment [FarSeg] and MODEL=MEDIUM. |000D:E9(1800) | JMPN FarProc: |0010:EA[1800]{0000} | JMPF FarProc: |0015:EA[1800]{0000} | JMP FarProc: ; Defaults to JMPF due to the different target segment [FarSeg]. |001A:E9(2211) | JMPN 0x1122 ; Relative near jump to the scalar offset 0x1122 within segment [CodeSeg]. |001D:EA[2211]{0000} | JMPF 0x1122 ; Absolute far jump to the scalar target 0:0x1122 with implicit segment 0. |0022:EA[2211]{0000} | JMP 0x1122 ; Defaults to JMPF. |0027:EA22110000 | JMPF 0:0x1122 ; Absolute far jump to the scalar target 0:0x1122 with explicit segment 0. |002C:EA22110000 | JMP 0:0x1122 ; Defaults to JMPF. Near jump with implicit segment is not supported. |0031: | | |;; |[FarSeg] |[FarSeg] SEGMENT PURPOSE=CODE,WIDTH=16,ALIGN=0x10 ; Linked at 0x0304:0. |0000:E91500 | JMPN FarLabel: ; Relative NEAR jump. |0003:EA[1800]{0000} | JMPF FarLabel: ; Absolute FAR jump. |0008:EB0E | JMP FarLabel: ; Intrasegment distance defaults to NEAR or SHORT. |000A:E90B00 | JMPN FarProc: |000D:EA[1800]{0000} | JMPF FarProc: |0012:EA[1800]{0000} | JMP FarProc: ; Distance defaults to FAR due to target's DIST=FAR modifier. |0017:C3 | RET ; Instruction RET defaults to DIST=NEAR. |0018: |FarLabel: |0018: |FarProc: PROC DIST=FAR ; Explicitly specified FAR property of FarProc. |0018:CB | RET ; Instruction RET inside far procedure defaults to DIST=FAR. |0019: | ENDP FarProc: | |ENDPROGRAM t3145 | **** ListMap "t3145.bin",model=MEDIUM,groups=0,segments=2,entry=,stack= | [CodeSeg],FA=00000000h,VA=00003000h,size=00000031h=49,width=16,align=0010h,purpose=CODE | [FarSeg],FA=00000040h,VA=00003040h,size=00000019h=25,width=16,align=0010h,purpose=CODE |00000000: |`

Expected messages t3145.out
  `I0180 Assembling source file "t3145.htm". I0270 Assembling source "t3145". I0310 Assembling source pass 1. I0330 Assembling source pass 2 - final. I0470 Assembling program "t3145". "t3145.htm"{52} I0510 Assembling program pass 1. "t3145.htm"{52} I0510 Assembling program pass 2. "t3145.htm"{52} I0510 Assembling program pass 3. "t3145.htm"{52} I0530 Assembling program pass 4 - final. "t3145.htm"{52} I0660 16bit MEDIUM BIN file "t3145.bin" created, size=89. "t3145.htm"{79} I0650 Program "t3145" assembled in 4 passes with errorlevel 0. "t3145.htm"{79} I0750 Source "t3145" (113 lines) assembled in 2 passes with errorlevel 0. I0860 Listing file "t3145.htm.lst" created, size=2386. I0990 EuroAssembler terminated with errorlevel 0.`

Expected output file t3145. bin

      0000: E9 55 00 EA 18 00 04 03 EA 18 00 04 03 E9 48 00  ¤U°¤·°··¤·°··¤H°
      0010: EA 18 00 04 03 EA 18 00 04 03 E9 05 11 EA 22 11  ¤·°··¤·°··¤··¤"·
      0020: 00 00 EA 22 11 00 00 EA 22 11 00 00 EA 22 11 00  °°¤"·°°¤"·°°¤"·°
      0030: 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90  °¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
      0040: E9 15 00 EA 18 00 04 03 EB 0E E9 0B 00 EA 18 00  ¤·°¤·°··¤·¤·°¤·°
      0050: 04 03 EA 18 00 04 03 C3 CB                       ··¤·°··¤¤

▲Back to the top▲