🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.language.basm
Article #11

Do I know how to use OFFSET?

#11
From: Larry Griffiths
Date: Mon, 16 Jul 2007 16:47
16 lines
1251 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.
Technical Details
Message-ID: <469ba1a0$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <465af3d6@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 107b11,be1aae1f5a23b04f
X-Google-Attributes: gid107b11,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Larry Griffiths" <nospame@nowhere.com>
Newsgroups: borland.public.cppbuilder.language.basm
References: <465af3d6@newsgroups.borland.com>
Subject: Do I know how to use OFFSET?
Date: Mon, 16 Jul 2007 11:47:52 -0500
Lines: 19
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 70.252.174.162
Message-ID: <469ba1a0$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1184604576 70.252.174.162 (16 Jul 2007 09:49:36 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail