Re: accessing Struct field
From: flekso (taurus_at_email.hinet.hr)
Date: 05/07/04
- Next message: Kvag: "what is: ?live16385@0:"
- Previous message: Christophe Grimault: "Re: Optimizing a basic dot product loop"
- In reply to: Vaektor: "accessing Struct field"
- Next in thread: Tim Roberts: "Re: accessing Struct field"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 7 May 2004 09:40:51 +0000 (UTC)
"Vaektor" <vaektor_phresh@hotmail.com> wrote in message
news:k7Emc.6011$jF2.2432@newssvr27.news.prodigy.com...
> I'm trying to access the 'name' field of my structure but when I try to
masm
> gives me an error:
>
> error A2008: syntax error : name
>
> here's the struct
>
> STUDENT STRUCT
> idNum WORD -1
> name BYTE 20 DUP(0)
> age WORD 0
> Student ENDS
>
> .data
> dbEntries = 50
> studentDB STUDENT dbEntries DUP(<>)
>
> and my lines of code:
>
> mov si, 0
> mov dx, OFFSET (STUDENT PTR StudentDB[si].name)
> mov cx, (SIZEOF STUDENT PTR StudentDB[si].name)
>
Try renaming name to _name or something like that, maybe it's a
keyword/macro.
- Next message: Kvag: "what is: ?live16385@0:"
- Previous message: Christophe Grimault: "Re: Optimizing a basic dot product loop"
- In reply to: Vaektor: "accessing Struct field"
- Next in thread: Tim Roberts: "Re: accessing Struct field"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|