delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/17/12:16:24

From: d DOT roos AT st DOT hanze DOT nl (Donnie Roos)
Newsgroups: comp.os.msdos.djgpp
Subject: assigning the correct adress?
Date: Tue, 17 Feb 1998 17:05:07 GMT
Organization: Rijksuniversiteit Groningen
Lines: 24
Message-ID: <34e9a8df.2317141@news.rug.nl>
NNTP-Posting-Host: client40-34.oprit.rug.nl
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hi,

In my program i have a variable of word size (unsigned short)
and two pointers which point to the two bytes of this word.

word TMP;
byte *ptr_TMP_l, *ptr_TMP_h;

In my code i try to assign it in the following way.
It needs a cast to increase the adress by 1 byte instead of a word.

ptr_TMP_l = & (byte) reg_TMP;
ptr_TMP_h = & (byte) reg_TMP + 1;

When compiling my source from RHIDE (default options) i get the
message: invalid lvalue in unary `&'

I've tried more () what ya call them? but it keeps complaining.


Any help will be greatly apreciated.

Donnie Roos.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019