EuroAssembler Index Manual Download Source Macros


Sitemap Links Forum Tests Projects

Test t3186: Machine instructions LEA in 64bit mode


Description
Encoding and relocations of absolute and relative addressing mode.
Tested procedures
IigLEA  
Source & expected listing t3186.htm.lst
| | EUROASM LIST=ON,DUMP=ON,AUTOSEGMENT=ON,DUMPWIDTH=32,CPU=X64 | |t3186 PROGRAM FORMAT=BIN,IMAGEBASE=0040_0000h,WIDTH=64, \ | | MODEL=FLAT,LISTMAP=ON,LISTGLOBALS=OFF |[.text] ::::Section changed. |00000000:90 | NOP ; Linked at 0040_0000h. |00000001:8D0DFAFFFFFF | LEA ECX,[$] |00000007:488D0DF9FFFFFF | LEA RCX,[$] |0000000E:488D0DF9FFFFFF | LEA RCX,[$],ADDR=REL |00000015:488D0C25[15000000] | LEA RCX,[$],ADDR=ABS |0000001D:8D0C2505000000 | LEA ECX,[5] |00000024:488D0C2505000000 | LEA RCX,[5] |0000002C:488D0C2505000000 | LEA RCX,[5],ADDR=ABS |00000034:488D0C2505000000 | LEA RCX,[5],ADDR=REL ; RIP-relative abs.address not supported. W2401 expected. |## W2401 Modifier "ADDR=REL" could not be obeyed in this instruction. |0000003C:8D0D32000000 | LEA ECX,[CodeLabel] |00000042:488D0D2B000000 | LEA RCX,[CodeLabel] ; ADD=REL is default in 64bit mode. |00000049:488D0D24000000 | LEA RCX,[CodeLabel],ADDR=REL |00000050:488D0C25[74000000] | LEA RCX,[CodeLabel],ADDR=ABS |00000058:8D0D(08000000) | LEA ECX,[DataLabel] |0000005E:488D0D(08000000) | LEA RCX,[DataLabel] ; ADD=REL is default in 64bit mode. |00000065:488D0D(08000000) | LEA RCX,[DataLabel],ADDR=REL |0000006C:488D0C25[08000000] | LEA RCX,[DataLabel],ADDR=ABS |00000074:C3 |CodeLabel: RET ; Linked at 0040_0074h. |[.data] ::::Section changed. |00000000:1111111111111111 | DQ 0x11111111_11111111 |00000008:2222222222222222 |DataLabel: DQ 0x22222222_22222222 ; Linked at 0040_0088h. |00000010:3333333333333333 | DQ 0x33333333_33333333 | | %DISPLAY RELOCATIONS |# D1550 **** %DISPLAY Relocations |# D1570 at=[.text]:00000019h,width=32,obj=00000015h,add=00000000h,type=abs,tg=.text,[.text]:00000000h |# D1570 at=[.text]:00000054h,width=32,obj=00000074h,add=00000000h,type=abs,tg=.text,[.text]:00000000h |# D1570 at=[.text]:0000005Ah,width=32,obj=00000008h,add=FFFFFFFCh,type=rel,tg=.data,[.data]:00000000h |# D1570 at=[.text]:00000061h,width=32,obj=00000008h,add=FFFFFFFCh,type=rel,tg=.data,[.data]:00000000h |# D1570 at=[.text]:00000068h,width=32,obj=00000008h,add=FFFFFFFCh,type=rel,tg=.data,[.data]:00000000h |# D1570 at=[.text]:00000070h,width=32,obj=00000008h,add=00000000h,type=abs,tg=.data,[.data]:00000000h |# D1790 **** End of %DISPLAY | | ENDPROGRAM t3186 | **** ListMap "t3186.bin",model=FLAT,groups=0,segments=2,entry=,stack= | [.text],FA=00000000h,VA=00400000h,size=00000075h=117,width=64,align=0010h,purpose=CODE | [.data],FA=00000080h,VA=00400080h,size=00000018h=24,width=64,align=0010h,purpose=DATA
Expected messages t3186.out
I0180 Assembling source file "t3186.htm". I0270 Assembling source "t3186". I0310 Assembling source pass 1. D1550 **** %DISPLAY Relocations "t3186.htm"{78} D1790 **** End of %DISPLAY "t3186.htm"{78} I0330 Assembling source pass 2 - final. I0470 Assembling program "t3186". "t3186.htm"{52} I0510 Assembling program pass 1. "t3186.htm"{52} D1550 **** %DISPLAY Relocations "t3186.htm"{78} D1790 **** End of %DISPLAY "t3186.htm"{78} I0510 Assembling program pass 2. "t3186.htm"{52} D1550 **** %DISPLAY Relocations "t3186.htm"{78} D1790 **** End of %DISPLAY "t3186.htm"{78} I0530 Assembling program pass 3 - final. "t3186.htm"{52} W2401 Modifier "ADDR=REL" could not be obeyed in this instruction. "t3186.htm"{63} D1550 **** %DISPLAY Relocations "t3186.htm"{78} D1570 at=[.text]:00000019h,width=32,obj=00000015h,add=00000000h,type=abs,tg=.text,[.text]:00000000h "t3186.htm"{78} D1570 at=[.text]:00000054h,width=32,obj=00000074h,add=00000000h,type=abs,tg=.text,[.text]:00000000h "t3186.htm"{78} D1570 at=[.text]:0000005Ah,width=32,obj=00000008h,add=FFFFFFFCh,type=rel,tg=.data,[.data]:00000000h "t3186.htm"{78} D1570 at=[.text]:00000061h,width=32,obj=00000008h,add=FFFFFFFCh,type=rel,tg=.data,[.data]:00000000h "t3186.htm"{78} D1570 at=[.text]:00000068h,width=32,obj=00000008h,add=FFFFFFFCh,type=rel,tg=.data,[.data]:00000000h "t3186.htm"{78} D1570 at=[.text]:00000070h,width=32,obj=00000008h,add=00000000h,type=abs,tg=.data,[.data]:00000000h "t3186.htm"{78} D1790 **** End of %DISPLAY "t3186.htm"{78} I0660 64bit FLAT BIN file "t3186.bin" created, size=152. "t3186.htm"{87} I0650 Program "t3186" assembled in 3 passes with errorlevel 2. "t3186.htm"{87} I0750 Source "t3186" (138 lines) assembled in 2 passes with errorlevel 2. I0860 Listing file "t3186.htm.lst" created, size=2969. I0990 EuroAssembler terminated with errorlevel 2.
Expected output file t3186. bin
0000: 90 8D 0D FA FF FF FF 48 8D 0D F9 FF FF FF 48 8D  ¤¤·¤¤¤¤H¤·¤¤¤¤H¤
0010: 0D F9 FF FF FF 48 8D 0C 25 15 00 40 00 8D 0C 25  ·¤¤¤¤H¤·%·°@°¤·%
0020: 05 00 00 00 48 8D 0C 25 05 00 00 00 48 8D 0C 25  ·°°°H¤·%·°°°H¤·%
0030: 05 00 00 00 48 8D 0C 25 05 00 00 00 8D 0D 32 00  ·°°°H¤·%·°°°¤·2°
0040: 00 00 48 8D 0D 2B 00 00 00 48 8D 0D 24 00 00 00  °°H¤·+°°°H¤·$°°°
0050: 48 8D 0C 25 74 00 40 00 8D 0D 2A 00 00 00 48 8D  H¤·%t°@°¤·*°°°H¤
0060: 0D 23 00 00 00 48 8D 0D 1C 00 00 00 48 8D 0C 25  ·#°°°H¤··°°°H¤·%
0070: 88 00 40 00 C3 00 00 00 00 00 00 00 00 00 00 00  ¤°@°¤°°°°°°°°°°°
0080: 11 11 11 11 11 11 11 11 22 22 22 22 22 22 22 22  ········""""""""
0090: 33 33 33 33 33 33 33 33                          33333333

▲Back to the top▲