delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/26/10:15:38

From: andrewda AT cogs DOT susx DOT ac DOT uk (Andrew Smythe Davidson)
Newsgroups: comp.os.msdos.djgpp
Subject: Unions...
Date: 26 May 1998 13:29:12 GMT
Organization: University of Sussex
Lines: 9
Message-ID: <6keg38$mia$1@infa.central.susx.ac.uk>
NNTP-Posting-Host: tsunx.ctn.cogs.susx.ac.uk
Summary: none
Keywords: none
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Basically I'm looing for a way to create a structure full of registers, some
of which are 16bit, some 8 bit, and some either 8 or 16. Rather than have to
access it in a regs.?.? way like Union REGS regs would give me I'd like to be
able to refer to the 8/16 bit registers either as, for example, regs.a or
regs.ah/regs.al. Is there anyway of doing this without introducing an extra
level into the structure?

Thanks,
    Andrew

- Raw text -


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