Subject:
|
Re: Kent's sonar routines
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Fri, 13 Mar 1998 04:24:21 GMT
|
Original-From:
|
Max Davies <[mdavies@cam.org]SayNoToSpam[]>
|
Viewed:
|
1407 times
|
| |
| |
MAR ERICSON wrote:
> Can anyone clarify something for me?
>
> A section of the code of sonar.asm goes as
> follows:
>
> variable_sonar_time
> sonar_time FDB 0
>
> What does this mean? Why are there two variables
> before the FDB?
The line "variable_sonar_time" indicates that the
immediately following FDB will be available to IC
as an integer variable named "sonar_time".
The next line with the FDB is just a regular
assembler definition statement to allocate storage
for the variable and name it for assembler access
purposes.
> Another section goes as follows:
>
> variable_sonar_enable FCB 0
> sonar_enable FCB 0
>
> I thought IC integers had to be 2 bytes.
Yes, IC integers have to be 2 bytes.
> And also, are these two different variables?
My guess is "yes and no". I am guessing they are
pulling a trick so that IC sees a 2-byte variable
while assembler sees a 1-byte variable.
I haven't seen this sort of thing before. If you
didn't copy it wrong and if it really works then
my guess would be that it is defining a
single-byte value for assembler usage, prefixed by
a guaranteed null byte so that IC can access it
properly.
/Max
|
|
Message is in Reply To:
| | Kent's sonar routines
|
| Can anyone clarify something for me? A section of the code of sonar.asm goes as follows: variable_sonar_time sonar_time FDB 0 What does this mean? Why are there two variables before the FDB? Another section goes as follows: variable_sonar_enable FCB (...) (27 years ago, 13-Mar-98, to lugnet.robotics.handyboard)
|
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|