Program language
Program language
Hi, I am writing to ask If it's possible to see the program written with the universal language of programing, without symbols.
It means that I want to see the program with numbers, not symbols. Is it possible?
pd: Sorry for my bad english.
It means that I want to see the program with numbers, not symbols. Is it possible?
pd: Sorry for my bad english.
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: Program language
You want to use NXT-G (the software that comes with the NXT), but you want to see the program in text form? That's not possible.
What I would suggest is that you use BCC and NXC. You can use the same FW that is already on the NXT (normal lego FW), although it's better to upgrade to the latest enhanced FW (still 100% backwards compatible with NXT-G).
What I would suggest is that you use BCC and NXC. You can use the same FW that is already on the NXT (normal lego FW), although it's better to upgrade to the latest enhanced FW (still 100% backwards compatible with NXT-G).
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
Re: Program language
Do you mean machine code?
A sophistical rhetorician, inebriated with the exuberance of his own verbosity, and gifted with an egotistical imagination that can at all times command an interminable and inconsistent series of arguments to malign an opponent and to glorify himself.
Re: Program language
I mean in text form. But mattallen37 has said that it's not possible.
Thanks.
Thanks.
Re: Program language
there is an attempt to write a graphical "language" such as NXT-G or Enchanting which simultaneously generates a C-like code (NXC):
Visual-NXC
it's not finished yet - but do you mean something like that?
But consider that NXC is another uncompiled high-level-language - although readable in script form, not in icon form - it's not the code the firmware is working with... (in both cases that would be the generated byte code - actually almost unreadable)
Visual-NXC
it's not finished yet - but do you mean something like that?
But consider that NXC is another uncompiled high-level-language - although readable in script form, not in icon form - it's not the code the firmware is working with... (in both cases that would be the generated byte code - actually almost unreadable)
Re: Program language
First of all, there is no single 'universal language of programming'. If you're talking about machine code (which consists only of numbers, binary 0 and 1, which can alsoaarnau wrote:I mean in text form. But mattallen37 has said that it's not possible.
Thanks.
be represented as Hexadecimal (4 binary values == 1 hexadecimal value from zero to the symbol 'F'), it is specific to a given processor architecture. For example, in PCs, which are based on the 80x86 architecture, a 32-bit hex value of ABCD1234 (I made that up) means one thing, while on the NXT, which uses a processor based on the ARM architecture, it means something else entirely.
Secondly, the NXT-G programs are not written in the machine language used by the ARM processor in the NXT. Instead it is written to a virtual machine bytecode format, similar to how Java compilers generate Java Byte Code. The NXT Byte Code (NBC) is what is used by the NXT firmware to execute its programs, typically.
You can of course take a RXE file generated by NXT-G or Bricxcc and perform a Hex-dump of it, meaning, use a program which reads in the RXE file, and display the numerical (hexadecimal) value of each byte in the file. I suppose that may be what you're asking. However, it would be next to impossible to understand what it means without knowing a lot of details regarding which value represents what command, and which bits in a value refer to commands and which refer to storage locations, etc.
Re: Program language
yes, it was what I wanted to know, thanks.
Now, I am seeing that it's more difficult than what I thought.
Now, I am seeing that it's more difficult than what I thought.
Re: Program language
I have seen that somebody has written in letters the program as I want.
Here is the example:
Code: Select all
#include "NXCDefs.h"
#include "NBCCommon.h"
#define MOTOR_LEFT OUT_B
#define MOTOR_RIGHT OUT_C
#define MOTOR_BOTH OUT_BC
#define MOTOR_FORK OUT_A
#define COLORSENSOR SENSOR_2
#define TOUCH SENSOR_3
#define ULSONIC SensorUS(IN_1)
#define LIGHT_BLACK 115
#define LIGHT_WHITE 275
... and it continues
How can I do it?
Here is the example:
Code: Select all
#include "NXCDefs.h"
#include "NBCCommon.h"
#define MOTOR_LEFT OUT_B
#define MOTOR_RIGHT OUT_C
#define MOTOR_BOTH OUT_BC
#define MOTOR_FORK OUT_A
#define COLORSENSOR SENSOR_2
#define TOUCH SENSOR_3
#define ULSONIC SensorUS(IN_1)
#define LIGHT_BLACK 115
#define LIGHT_WHITE 275
... and it continues
How can I do it?
Re: Program language
that's NXC
install BricxCC, NXC is included!
install BricxCC, NXC is included!
Who is online
Users browsing this forum: Semrush [Bot] and 13 guests