Sign in

username:

password:



Not a member?

Search oopic



Search tips

Subscribe to oopic



Ads

Discussion Groups

Discussion Groups | | Omp file in V6 - what is first column

Omp file in V6 - what is first column - dogulas - Feb 23 2:34:58 2008

Hi,

I've been looking at parsing the Omp file to aquire address data of my
objects for use in an SCP program. I understand what all the columns
are for except the first one. It is labeled "P" and seems to contain
either "V", "L", or nothing. My first guess is that it is "V"alue
and "L"ogic, but that is just a guess.

Can anyone spell this out for me?

Thanks,
Dogulas



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )


Re: Omp file in V6 - what is first column - Ian Drennan - Feb 23 7:09:46 2008

dogulas wrote:
> Hi,
>
> I've been looking at parsing the Omp file to aquire address data of my
> objects for use in an SCP program. I understand what all the columns
> are for except the first one. It is labeled "P" and seems to contain
> either "V", "L", or nothing. My first guess is that it is "V"alue
> and "L"ogic, but that is just a guess.
>
> Can anyone spell this out for me?
>
> Thanks,
> Dogulas
>
>
>
Dogulas

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
C0030:128 ;Version.
L8.JumpTo.Main.Begin
C0031:137 ;16-Bit Value.
C0032:000 ;L4.StopApp.Begin.HighByte
C0033:012 ;L4.StopApp.Begin.LowByte
C0034:137 ;16-Bit Value.
C0035:000 ;L4.StopApp.Begin.HighByte
C0036:012 ;L4.StopApp.Begin.LowByte
C0037:137 ;16-Bit Value.
C0038:000 ;L6.Constructors.Begin.HighByte
C0039:016 ;L6.Constructors.Begin.LowByte
C0040:129 ;Branch.
L8.JumpTo.Main.End
L4.StopApp.Begin
C0041:137 ;16-Bit Value.
C0042:000 ;L4.StopApp.Begin.HighByte
C0043:012 ;L4.StopApp.Begin.LowByte
C0044:129 ;Branch.
L4.StopApp.End

L6.Constructors.Begin

L2.Construct.Begin ;Dim Led1 As oDIO1
C0045:041 ;This.Led1.Address
C0046:001 ;This.Led1.ArraySize
C0047:001 ;This.Led1.ObjSize
C0048:009 ;This.Led1.ClassID ;oDIO1
C0049:135 ;Create Object.
L2.Construct.End

L3.Construct.Begin ;Dim Led2 As oDIO1
C0050:042 ;This.Led2.Address
C0051:001 ;This.Led2.ArraySize
C0052:001 ;This.Led2.ObjSize
C0053:009 ;This.Led2.ClassID ;oDIO1
C0054:135 ;Create Object.
L3.Construct.End
C0055:251 ;Select Command Set2.
C0056:021 ;Set Construct Done.
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

look for the match



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: Omp file in V6 - what is first column - dogulas - Feb 23 19:42:39 2008

--- In o...@yahoogroups.com, Ian Drennan 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



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: Re: Omp file in V6 - what is first column - Ian Drennan - Feb 24 3:29:07 2008

Dogulas

It would appear from the OPS code which you posted that you are using
the oopic C version. I realise only now that the OPS code generated for
the C version is very different in syntax to that of the oopic version
IIB+ chip. Hence the Sub Address Finder will only work with code
generated for the IIB+ chip. I will have to modify the program to be
able to select the Target Device so that the parsing rules can be
changed. I will do this when I get a Ver C chip to play with.

Getting back to the OPS code for the C version, the string search looks
simpler as the object address uses the key "Loc" and much of the info
you are requiring are all in the same string of text nicely delimited
with spaces (ascii 32)

e.g.

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

where:
Loc 41 is the address of the object, brake is the object name and
oMathI is the object class

The bytes at Loc 42 to Loc 45 hold the various properties values for the
oMathI object. Remember these are packed bytes which means that a single
byte can contain more that one set of data. For example the value of the
Mode property will reside in bits 4,5 and 6 of the byte at address 42.
The Operate value is bit 7 of the same byte at address 42.

>
> I assume this is assembly
> for the embedded Pic.
>
>
No it is not assembler code. I think it is what they call tokens which
are passed to the on chip interpreter.
> 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.
>
>
As explained above the OPS code contains all that and more.

>
>
I also don't see how to determine the memory area (A,I,V,or F) to
> specify with the address.
>
I am not sure how this works, but I think the A,I,V and F refer to the 4
memory banks contained within the Pic chip.

> The only thing I don't see in the Omp file is the sub-address value.
> Is that discernable from the OPS file?
>
As explained it is not directly discernable from what I can see from
within the OPS code but of course it is available by right clicking on
the objects property...hmmm not so easily to automate this.
If you are wanting to easily test writing/reading from/to these address
with SCP, there is a tool called 'SCP Configurator' which is in the
files section of this group. It is a graphical terminal interface which
I developed a few years back when I was learning how to use SCP.

What language are you using for your applications? I use VB6 at the moment.

Regards

Ian



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )