News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Obscure test piece result.

Started by hutch--, April 12, 2017, 06:14:44 PM

Previous topic - Next topic

hutch--

Tried to use the current location counter "$" in a 64 bit test piece with /LARGEADDRESSAWARE and got this result.

    mov rax, QWORD PTR [rcx][$+64]

    ; POLINK: error: Relocation type ADDR32 is invalid without /LARGEADDRESSAWARE:NO, for symbol '$$00000C'

So much for that theory.  :P

TWell

is this same for that purbose?
mov rdx, $+64 ;48BA4400000000000000
mov rax,qword ptr [rdx+rcx] ;488B040A

hutch--

Thanks Tim,

I don't know if this is useful but at lest it builds OK.

; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

    include \masm32\include64\masm64rt.inc

    .code

; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

entry_point proc

    LOCAL .rsp  :QWORD
    LOCAL hInstance :QWORD

    invoke GetModuleHandle,0
    mov hInstance, rax

    mov rdx, $
    sub rdx, hInstance

    add rdx, 127
    and rdx, -128       ; align rdx by 128 bytes relative to hInstance

    conout str$(rdx),lf,lf

    waitkey
    invoke ExitProcess,0

    ret

entry_point endp

; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

    end