Jump to content
IGNORED

Robert M's Blog - bBasic - Hello World


RSS Bot

Recommended Posts

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:

txt.gif

helloworld.txt ( 1.23K )

Number of downloads: 0

 

 

bin.gif

helloworld.txt.bin ( 4K )

Number of downloads: 0

 

 

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?

 

http://www.atariage.com/forums/index.php?a...;showentry=3763

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...