🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.language.basm
1 messages
1 total messages Started by Larry Griffiths Mon, 16 Jul 2007 17:54
Do I know how to use OFFSET correctly?
#12
Author: Larry Griffiths
Date: Mon, 16 Jul 2007 17:54
16 lines
1237 bytes
I have a class that has two __int64 variables.

class x
{
unsigned __int64 A;
unsigned __int64 B;
};

I add some assembler to a method of the class:

    asm     mov     DWORD PTR     ecx, this;
    asm     add     DWORD PTR    ecx, OFFSET this.B

The offset to "B" is $08 but the generated code only adds $04 to ECX.

Am I missing something here or doing something incorrectly.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads