Help understanding LEGO bytecode for Arduino project
Posted: 05 Jun 2012, 12:09
I am not sure if this is the right forum for this level of lego convo because my search has not turned up much results but here goes.
As I had mentioned in April I am working on a LEGO minstorms interpreter for Arduino, I have "open sourced" it on github
https://github.com/frazras/x10abot
So far I have been trying to interpret the example bytecode provided. I am at the point of reading out the variables and assigning them to the SRAM.
However I am having problems with the offsets.
There are 3 varibables, two 32-bit longs and an 8-bit byte type. The info in the docs say they take up 12 bytes of memory when they really should take up 9 bytes.
There is some info also about the byte alignment of the Dope Vector Arrays being on 4 byte intervals which could explain it by placing padding bytes but I am not sure.
This is because I see other arrays being aligned on address offsets not divisible by 4.
Please let me know if there is anybody here who could help, or where to go to get more help, thank you.
Also feel free to contribute to the development on github if you want to get lego bytecode running on an arduino
As I had mentioned in April I am working on a LEGO minstorms interpreter for Arduino, I have "open sourced" it on github
https://github.com/frazras/x10abot
So far I have been trying to interpret the example bytecode provided. I am at the point of reading out the variables and assigning them to the SRAM.
However I am having problems with the offsets.
There are 3 varibables, two 32-bit longs and an 8-bit byte type. The info in the docs say they take up 12 bytes of memory when they really should take up 9 bytes.
There is some info also about the byte alignment of the Dope Vector Arrays being on 4 byte intervals which could explain it by placing padding bytes but I am not sure.
This is because I see other arrays being aligned on address offsets not divisible by 4.
Please let me know if there is anybody here who could help, or where to go to get more help, thank you.
Also feel free to contribute to the development on github if you want to get lego bytecode running on an arduino