Article View: borland.public.csharpbuilder.compiler
Article #2Initializing a Array of Classes.
From: JRobert
Date: Fri, 06 Aug 2004 21:14
Date: Fri, 06 Aug 2004 21:14
41 lines
1748 bytes
1748 bytes
Hi all,
i'm working on a disassembler for the M68K and
have the following situation.
public class m68kDisassembler
{
#region MC68K Mnemonic Strings
static string[] m68kMnemonics =
{"abcd","add.b","add.w","add.l", etc. etc ...
#endregion
class OPCODE_NODE
{
ushort op_mask;
ushort op_code;
OPCODETYPE opctype;
CPUTYPE cpubits;
ADDRMODE addrm;
};
}
now i want to make an array of OPCODE_NODEs and fill them with the
correct data. I'm trying this.
private static OPCODE_NODE[] Group_0x0 = {
{0xffff, 0x003C, m_ORI, opct_CCR, ALL, IMPLIED},
here the next initialization
and the next
.
.
OPCODETYPE,CPUTYPE, and ADDRMODE are enums that are within the code, so
all symbols are existion.
This is the way i'm doing with a c++ compiler but somehow i don't get it
how to make it in cs.
Any suggestions ?
Regards,
Robert
Technical Details
Message-ID:
<4113e6ee$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 1528ba,42c7b495a7aefb3d,start X-Google-Attributes: gid1528ba,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Fri, 06 Aug 2004 22:14:12 +0100 From: JRobert <tsync@cronospec.de> User-Agent: Mozilla Thunderbird 0.7.2 (Windows/20040707) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.csharpbuilder.compiler Subject: Initializing a Array of Classes. Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 80.135.117.153 Message-ID: <4113e6ee$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1091823342 80.135.117.153 (6 Aug 2004 13:15:42 -0700) Lines: 41 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail