bBasic - Hello World
For my first bBasic program I choose to stay with tradition and write a Hello World program. For non-programmers reading this, there is a bit of a tradition in programming with a new language to start with a simple program that simply outputs "Hello World" to the user.
Goals:
-> Minimal source code size
-> Simple white text on a black background.
-> no user interaction.
Design:
-> Use the standard bBasic kernel to render an asymetrical playfield image of "Hello World". The 32 pixel resolution requires a less than pretty font to show 10 characters, but that is a problem common to all VCS programs and not exclusive to bBasic.
Implementation:
Lessons learned:
-> Remarks need to be indented!
-> Labels can not be followed by a colon like in DASM.
Recommendations for improving bBasic:
-> Looking at the .asm output from the compiler I see that the entire language library is included even if I never use most of the functions. Randomize for example and all the PF scroll functions are included in the image even though I didn't use them. I understand why this was done, but it would greatly reduce ROM consumption if unused functions were not included leaving more room for user defined code.
Up Next:
-> Can we do PF height animations?
3 Comments
Recommended Comments