Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

Robobasic v2.5 & the obj file

Hitec robotics including ROBONOVA humanoid, HSR-8498HB servos, MR C-3024 Controllers and RoboBasic
5 postsPage 1 of 1
5 postsPage 1 of 1

Robobasic v2.5 & the obj file

Post by wangke » Tue May 25, 2010 11:12 am

Post by wangke
Tue May 25, 2010 11:12 am

Dear friend ,We use Robobasic v2.5 to control my robot,but we just know how to write the .bas file ,recently, I want to write a compiler to analyse my robobasic program,but I don't know how to write the obj file,I just know first it has 25 0x00 and second has 100 0x20,I don't know what the follow mean,maybe the file length or others, If you know, help me,please,
thanx!
Dear friend ,We use Robobasic v2.5 to control my robot,but we just know how to write the .bas file ,recently, I want to write a compiler to analyse my robobasic program,but I don't know how to write the obj file,I just know first it has 25 0x00 and second has 100 0x20,I don't know what the follow mean,maybe the file length or others, If you know, help me,please,
thanx!
wangke
Newbie
Newbie
Posts: 4
Joined: Tue May 25, 2010 10:54 am

Post by i-Bot » Tue May 25, 2010 1:55 pm

Post by i-Bot
Tue May 25, 2010 1:55 pm

The Robobasic compiler converts the .bas file to the .obj file which is a list of byte codes which are subsequently interpreted by the C3024.

This visual c# program in my file area reads the .obj file and extracts the variable definitions and converts the byte code data to mnemonics. I can't remember the format, but you will see it from the source code.


I hope it helps. I use it quite a lot to check if a problem is in the compiler or the interpreter.

Ask again if you have any specific questions on C3024 byte codes.
http://robosavvy.com/Builders/i-Bot/RoboDump.zip
The Robobasic compiler converts the .bas file to the .obj file which is a list of byte codes which are subsequently interpreted by the C3024.

This visual c# program in my file area reads the .obj file and extracts the variable definitions and converts the byte code data to mnemonics. I can't remember the format, but you will see it from the source code.


I hope it helps. I use it quite a lot to check if a problem is in the compiler or the interpreter.

Ask again if you have any specific questions on C3024 byte codes.
http://robosavvy.com/Builders/i-Bot/RoboDump.zip
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by wangke » Tue May 25, 2010 3:05 pm

Post by wangke
Tue May 25, 2010 3:05 pm

I have run your program ,it converts .obj file to .bas file,maybe it can help me solve my problem,I will read the code carefully,thanks again and best wishes!
I have run your program ,it converts .obj file to .bas file,maybe it can help me solve my problem,I will read the code carefully,thanks again and best wishes!
wangke
Newbie
Newbie
Posts: 4
Joined: Tue May 25, 2010 10:54 am

Post by i-Bot » Tue May 25, 2010 3:14 pm

Post by i-Bot
Tue May 25, 2010 3:14 pm

The program converts the .obj file to a readable format which is exactly how the byte code interpreter in the robots executes it. It is not a .bas file. The mnemonics and format for the byte code commands are made up. You will see how the .obj format contains some file data, the variable names, and the byte code.

Is that what you want to do ? To create your own byte code. Or do you want to create hex code which can run on the ATMega ? To run hex code, you need to load the code into the Atmega using a program like Roboflash. Of course for a hex file you have to write all the servo drivers etc.

Roboflash and the C3024 firmware annotated source code for 2.5 are in my file area.
The program converts the .obj file to a readable format which is exactly how the byte code interpreter in the robots executes it. It is not a .bas file. The mnemonics and format for the byte code commands are made up. You will see how the .obj format contains some file data, the variable names, and the byte code.

Is that what you want to do ? To create your own byte code. Or do you want to create hex code which can run on the ATMega ? To run hex code, you need to load the code into the Atmega using a program like Roboflash. Of course for a hex file you have to write all the servo drivers etc.

Roboflash and the C3024 firmware annotated source code for 2.5 are in my file area.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by wangke » Thu May 27, 2010 10:07 am

Post by wangke
Thu May 27, 2010 10:07 am

My friend, with your help,I have solved my problem.

I write the .obj file according to your program,and it works,now my complier can convert .bas file to .obj file successfully,just like the robobasic v2.5 does.

Thank you very much.
My friend, with your help,I have solved my problem.

I write the .obj file according to your program,and it works,now my complier can convert .bas file to .obj file successfully,just like the robobasic v2.5 does.

Thank you very much.
wangke
Newbie
Newbie
Posts: 4
Joined: Tue May 25, 2010 10:54 am


5 postsPage 1 of 1
5 postsPage 1 of 1