This Forum is Dedicated For all The Object Oriented PIC Lovers .......... The concept behind OOPic is straight forward. Use preprogrammed multitasking Objects from a library of highly optimized Objects to do all the work of interacting with the hardware. Then write small scripts in Basic, C, or Java syntax styles to control the Objects. During operation, the Objects run continuously and simultaneously in the background while the scripts run in the foreground telling the objects what to do.

Saturday, February 23, 2008

[oopic] Re: Omp file in V6 - what is first column

--- In oopic@yahoogroups.com, Ian Drennan <ianid@...> wrote:
>
> I think your guess is probably correct WRT Value and Logic.
> My preference would be to use the .OPS file to find addresses as
there
> is additional info that can be gleaned.
>
> e.g.
>
> Here is the OPS code generated for two objects namely Led1 and Led2
>
> L1.Program.Begin
> C0029:015 ;Ver.Num

...

> L6.Constructors.End
>
> L7.Init.Begin
>
> L7.Init.End
> C0057:129 ;Branch.
>
> L1.Program.End
>
> In your parsing program look for a match with the string
> "Construct.Begin". The very next line will contain the name of the
> object and its address. The address is preceded with ":" and will
always
> consists of 3 characters
>
>
> L2.Construct.Begin ;Dim Led1 As oDIO1
> C0045:041 ;This.Led1.Address
>
>
> You do know that the address of objects can be found by right
clicking
> on the object in the object view and selecting either 'Information'
or
> 'Memory map' or alternately by right clicking on the objects text
in the
> editor view and selecting information.
>
> Should you want to use the branch command 'Y' then you will also
need
> the start address of the sub-procedures.
> There is a tool in the files section of this group called " Sub
Address
> Finder" which does just that.
>
> Ian

Ian,

Thanks for the wealth of info.

I was aware of the info window displaying the address. This is what
I was originally using, but every time I made a change to the OOPic
code, I'd have to manually go through and change most of the
addresses. This became tedious, so I embarked on a programmatic
solution.

I chose the Omp file after looking at the two because I am not that
familiar with the layout of the OPS file. I assume this is assembly
for the embedded Pic.

If the same info is in the OPS file that is in the Omp file, I'm not
sure I can see it. The Omp file shows not only the address, size,
class type, and object name, but also a complete breakdown of all sub
objects. This might be helpful if you needed to access some sub
object's property that doesn't happen to be the default property of
the original defined object.

I examined the OPS file of my more complex OOPic program and I'm not
sure it follows the rules you specified. Here is a fragment:


...
C0704:146 ;Drop.
C0705:129 ;Branch.
L178.Delay.End

L175.Constructors.Begin
C0706:007 ;7
C0707:041 ;41
C0708:134 ;Fill Ram.
C0709:020 ;Loc 41 Dim brake As New oMathI ' Brake calculation
C0710:007 ;Loc 42
C0711:000 ;Loc 43
C0712:000 ;Loc 44
C0713:000 ;Loc 45
C0714:020 ;Loc 46 Dim trekNav As New oNavConI ' Navigation object
C0715:057 ;Loc 47
C0716:053 ;53
C0717:053 ;53
C0718:134 ;Fill Ram.
C0719:001 ;Loc 53 Dim frtBumper As New oDIO1 ' front bumper
C0720:001 ;Loc 54 Dim bckBumper As New oDIO1 ' back bumper
C0721:001 ;Loc 55 Dim led1 As New oDIO1 ' 0=off, 1=on
C0722:001 ;Loc 56 Dim led2 As New oDIO1 ' 0=off, 1=on
C0723:008 ;Loc 57 Dim manualScan As New oEvent ' scan from main
computer
...
C0771:008 ;Loc 105 Dim Bumped As New oEvent ' front bumper contact
C0772:014 ;14
C0773:113 ;113
C0774:134 ;Fill Ram.
C0775:018 ;Loc 113 Dim encLValue As New oWord ' encoder
C0776:000 ;Loc 114
C0777:000 ;Loc 115
C0778:018 ;Loc 116 Dim encRValue As New oWord ' encoder
C0779:000 ;Loc 117
C0780:000 ;Loc 118
C0781:080 ;Loc 119 Dim Compass As New oI2C ' Create the compass
objects
C0782:000 ;Loc 120
C0783:000 ;Loc 121
C0784:000 ;Loc 122
C0785:000 ;Loc 123
C0786:034 ;Loc 124 Dim speed As New oByte ' resultant speed
C0787:000 ;Loc 125
C0788:034 ;Loc 126 Dim power As New oPower ' URCP speed
C0789:251 ;Select Command Set2.
C0790:021 ;Set Construct Done.
L175.Constructors.End

L176.Init.Begin
...


I do not see any "Construct.Begin" although there is a "Set Construct
Done". I suppose I could key on "Dim" which would get me the objects
and variables that I defined, but not all the composite objects.

I also don't see how to determine the memory area (A,I,V,or F) to
specify with the address.

The only thing I don't see in the Omp file is the sub-address value.
Is that discernable from the OPS file?

Thanks for the heads up about the Sub Address Finder. I will
definately investigate it.

Thanks again for the Info,
Dogulas


Yahoo! Groups Links

<*> To visit your group on the web, go to:

http://groups.yahoo.com/group/oopic/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:

http://groups.yahoo.com/group/oopic/join

(Yahoo! ID required)

<*> To change settings via email:
mailto:oopic-digest@yahoogroups.com
mailto:oopic-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
oopic-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:

http://docs.yahoo.com/info/terms/

No comments: