ebmDevMag.com home
ebm Developer's Magazine
links

developer's mag
main page

sections
part 1
part 2
part 3
part 4
part 5
part 6
part 7
part 8
part 9


4 - Functions/Documentation

4.01 - How do I get more information on functions?
4.02 - I can't get to it - why is access denied?
4.03 - What is the difference between the SDK and the CDK?
4.04 - How do I get comfortable with the SDK?
4.05 - What should I do to learn ebm assembly language?
4.06 - Are there any formatting issues in assembly code?
4.07 - How do I count time?
4.08 - How do I randomize values?
4.09 - Are there any style guides out?
4.10 - What about support for shared libraries?
4.11 - How can I work with the serial functions? The USB port? Audio?
4.12 - I need to sleep



4.01 - How do I get more information on functions?
Check the Franklin site documentation, accessible via http://download.franklin.com/franklin/ebookman/developer/

4.02 - I can't get to it - why is access denied?
You have to register. The hows and whys are all part of intellectual property. In the case of the ebm, some of the code you will be exposed to (if you so choose) is part of the operating system, and so it's best everyone understands it shouldn't be freely distributed. Restricting access helps with that.

4.03 - What is the difference between the SDK and the CDK?
The Software Development Kit is for program writing; the Content Development Kit is for data (primarily books).

4.04 - How do I get comfortable with the SDK?
Download it, install it on your system, print every scrap of documentation, and read it constantly. As a rule of thumb, if you're not taking the manuals into the Throne Room, you're not studying enough.

4.05 - What should I do to learn ebm assembly language?
Read the SDK documentation. Read the website tutorials. Review every bit of code you can. Start small (asm additions to C functions rather than whole assembly functions). Optimize small pieces of your code, and then work up.

4.06 - Are there any formatting issues in assembly code?
The biggest is to avoid tabs - they can get in the way of the assembler. Another aspect is to watch placement of code - there should always be space before the opcode on a line, and the labels should be flush against the left edge of each line.

4.07 - How do I count time?
Let me count the ways: You can use the standard C functions from time.h, including gettimeofday(), localtime() & strftime(). For smaller intervals, use the function time_get_onOS(), which returns the number of milliseconds since boot, or time_get_base1900(), which is from (surprise!) 1900.

4.08 - How do I randomize values?
If you want random numbers, use rand(), random(), srand(), from the C Standard Library. These are pseudorandom; since they are initialized (seeded) with the same value, the sequence likely will be identical each time you run your program. To avoid that, use a reasonably random value to seed, for example, srand( time_get_onOS()).

4.09 - Are there any style guides out?
Not yet. You can look at the software delivered with the ebm and offered on the Franklin website to get an idea of what is the norm, however.

4.10 - What about support for shared libraries?
Version 2.0 differs from version 1.0 in that there is support for shared libraries, but only system (Franklin) ones. Whether there will be shared libraries in the near future is uncertain, although it has been mentioned as a Franklin goal.

4.11 - How can I work with the serial functions? The USB port? Audio?
These APIs are due to be released shortly; until then, there is no standard way to access these sections of the ebm.

4.12 - I need to sleep
Avoid caffeine several hours before bedtime. If you are referring to your code, then use the call usleep(x), with x being the time in microseconds



Previous Section
Next Section

Copyright © 2001-2006 ebmDevMag.com - Legal Notice