> -----Original Message----- > From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf > Of Peter > Sent: Tuesday, February 28, 2006 7:01 PM > To: Microcontroller discussion list - Public. > Subject: Re: [EE] selecting the right C++ STD library memory buffer > > > On Tue, 28 Feb 2006, Alan B. Pearce wrote: > > >> You get used to a tool by learning its idioms. > >> Although I have written object oriented assembly. > > > > Any pointers on where to get info on doing this? I tried to get the info > > from Microsoft that was presented on this at last years Masters, without > > success. > > > > The nearest I have come to OOP in assembler is by using linkable > modules. > > I think that you can use the usual 'system call interface' paradigm. All > data is private to a set of subroutines, which form an object. There is > a single entry point and you select the function (method) using a > parameter. Inheritance is by forwarding calls to an inherited object. > > Peter What I've done in the past is use jump/call tables to simulate the hidden vtable of C++. Its not pure OOP so the academic programmers freak out (same way they freak out when I call C++ Templates a Macro facility). You have to make your own 'this' with a parameter/register pointing to a data 'structure'. That is a lot like the fputX/fprintX/sprintf type C functions where thepointer to FILE is the equivalent of this really. I use this approach in any language such as C or assembler that doesn't directly support objects. I try to make a similar set of function/subroutines that use a similar API with programming by difference. I make generic routines for most integer types for example with specialized ones called for some that are effectively derived types. None of this is new with C++ or even pure OO languages from the '90s since all were inspired by Simula '67. Even the new buzzwords of generic programming and design patterns are really just old ideas we've been doing 'forever' just with fancy names. ------------------------------------- Notice of Confidentiality ---------------------------------------------------------- This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify postmaster@vgt.net. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist