![]() |
Re: I Have A Question About Pointers
Quote:
|
Re: I Have A Question About Pointers
Quote:
|
Re: I Have A Question About Pointers
Quote:
|
Re: I Have A Question About Pointers
Itanium or IA-64 is in a way pure 64-bit architecture. Because there is little to no compatibility with other architectures, Microsoft is finally abandoning it so there is no more future IA-64 Windows. x64 is actually an extension of x86, I think that's why some call it x86-64.
|
Re: I Have A Question About Pointers
Learning assembly and low-level computer architecture are good things. Putting your experiments on your teams robots -- maybe not.
Assembly programming is a very unforgiving task, and is best done with a net. My CS degree was a few years back, but they still required an assembly course. It was done completely virtual, on a mainframe, because your program would crash about 90% of the time. Since it was virtual, the "processor" was frozen so that you could examine the remains and determine where you went wrong, modify code, and run the experiment again. Even with the help of good tools such as this, it was a painful reminder of just how low-level and complex computers are. The good thing about that experience is that from time to time, I need to look under the covers and try to understand a bug, an optimization, etc. and being able to grok the assembly and low-level parts of the computer is useful. The rest of the time it would only slow me down by about 100x. Once you have a good PPC assembly reference and understand the basics of the architecture, I'm pretty sure that you can run your C++ code in vxWorks, hit a breakpoint, show the registers, the stack, and the disassembly. Even better, some environments show you the mixed view of your code -- a line of C and the assembly for that line. This will allow you to see how the compiler produces assembly, learn its tricks, and do it much faster than starting from scratch. It is informative to look at array indexing code, function calls, loops, and other high-level structures that make you productive. It is also informative to intentionally put some common bugs into your code and step through them in assembly to better understand what they cause the computer to do. Greg McKaskle |
Re: I Have A Question About Pointers
Are you trying to learn an assembly language or it must be PPC assembly? If learning x86 assembly is good enough, you can use your existing tools. Since your first post seems to be C++/C#, you probaby have visual studio. If so it supports the syntax of _asm {<some assembly code>} mixed in with C code. So you can progressively add more assembly code to your project. Another useful thing to do is to configure your compiler to generate assembly listing so that you can see how each C line is converted into assembly.
|
Re: I Have A Question About Pointers
Quote:
|
Re: I Have A Question About Pointers
I'm pretty sure you add a -S to the command line options to do that...I'm gonna try that out now.
After trying that out, HUGE MISTAKE. I used to think my code was elegant... |
Re: I Have A Question About Pointers
Yes, I used the disassembly tool in the debugger, I found that a lot of the code was filled with nop (no operation) but why? Is it to compensate for the data transfer from the ram to the cache? That seems unlikely
|
Re: I Have A Question About Pointers
Most likely for alignment. Usually in between functions.
|
Re: I Have A Question About Pointers
Quote:
HTH |
Re: I Have A Question About Pointers
Quote:
|
Re: I Have A Question About Pointers
Quote:
HTH |
Re: I Have A Question About Pointers
I'm not on the RT team, but the reason I was given was that when they did the board support, the RTP introduced too much overhead for the I/O drivers. Until FRC, the only C programmers for the cRIO were the NI developers, so they kept it in kernel mode. At that time, all other users of the cRIO used LV.
Exposing the C/C++ interfaces and tools, going to RTP was evaluated, but there would be a lot of work and testing involved, and it would mess with the I/O rates of various drivers. Greg McKaskle |
Re: I Have A Question About Pointers
Quote:
|
| All times are GMT -5. The time now is 12:30. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi