<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Object-Oriented Techniques with C51</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/15045/object-oriented-techniques-with-c51</link><description> Hello All, 
 
Do you know any application notes, tutorial, or example program that is using Object-Oriented Techniques in 8051 ? I heard about Abstract Data Type, Jump Table and so on. 
 
Thanks 
-Cahya </description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Object-Oriented Techniques with C51</title><link>https://community.arm.com/thread/110030?ContentTypeID=1</link><pubDate>Tue, 14 May 2002 04:49:40 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:dc75c833-5be1-4944-981f-1744f59e7f93</guid><dc:creator>Tri Jatmiko</dc:creator><description>&lt;p&gt;kind of this.. thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Object-Oriented Techniques with C51</title><link>https://community.arm.com/thread/84265?ContentTypeID=1</link><pubDate>Mon, 13 May 2002 11:09:22 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:817f5f24-a33d-4105-b1fb-c6aff00ae609</guid><dc:creator>Jon Young</dc:creator><description>&lt;p&gt;&lt;pre&gt;
// Becuase of the limitations of a 8051,
//    most(if not all) of your &amp;#39;classes&amp;#39; should singletons
//    with statically allocated storage, 
//
// I use the ClassName_Member notation on &amp;#39;public&amp;#39; members
//    to mimic the ClassName.Member notation
//
// Here is one example of a singleton, statically allocated class:


//
// ClassName.h
//
extrn int  ClassName_property1;
extrn char ClassName_property2;

void ClassName_Ctor(void);
void ClassName_Dtor(void);

int  ClassName_Method1(char* p);
char ClassName_Method2(void);

//
// ClassName.c
//
#include &amp;quot;ClassName.h&amp;quot;

//public:
int  ClassName_property1;
char ClassName_property2;

//private:
static int property1;
static int property2;

//public:
void ClassName_Ctor(void)
{
  ClassName_property1 = 0;
  ClassName_property2 = &amp;#39;\0&amp;#39;;
  property1 = 0;
  property2 = &amp;#39;\0&amp;#39;;
};
//void ClassName_Dtor(void) //rarely used
//{};

int  ClassName_Method1(char* p)
{};
char ClassName_Method2(void)
{};

//private:
static int  Method1(char* p)
{};
static char Method2(void)
{};


//
// Main.h
//

static void Ctor(void)
{
  ClassName_Ctor();
  //.. other Ctors 
}

void main(void)
{
  Ctor();
  
  ClassName_property1 = 1;
  ClassName_Method1(1);
  
  while( 1 );
}

&lt;/pre&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Object-Oriented Techniques with C51</title><link>https://community.arm.com/thread/54389?ContentTypeID=1</link><pubDate>Mon, 13 May 2002 03:43:20 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:756d3d8b-208e-4c48-98b6-14552dd2001d</guid><dc:creator>Tri Jatmiko</dc:creator><description>&lt;p&gt;Ic, but I am not intended to use C++. Only the OO techniques adopted into C51. May be a working example with description for certain CPU would be fine for learning.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Object-Oriented Techniques with C51</title><link>https://community.arm.com/thread/38710?ContentTypeID=1</link><pubDate>Mon, 13 May 2002 03:31:49 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:0e46c9c8-2671-4dfd-ad40-69317e8e6fb2</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;Wouldn&amp;#39;t the application of OO Techniques be independent of the 8051 target?&lt;br /&gt;
&lt;br /&gt;
Jump Tables are not specifically Object-Oriented - Assembler programmers use &amp;#39;em all the time!&lt;br /&gt;
&lt;br /&gt;
Have you looked at this:&lt;br /&gt;
&lt;a href="http://www.keil.com/pr/ceibo_020327.htm"&gt;http://www.keil.com/pr/ceibo_020327.htm&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>