Difference between revisions of "Code Examples"

From GbdevWiki
Jump to: navigation, search
(C examples)
m (C examples)
Line 11: Line 11:
 
</pre>
 
</pre>
  
== C examples ==
+
== GBDK C examples ==
 
[[Simple paint program]]
 
[[Simple paint program]]
  

Revision as of 13:55, 1 August 2014

Simple GBBasic 2.10 example

10 rem Simple example
20 for i=1 to 16
30 u=rnd(1)*16
40 print u
50 delay 20
60 next i
70 end

GBDK C examples

Simple paint program

Tic Tac Toe

Simple GBDK example


#include <gb/gb.h>
#include <stdio.h>

void main()
{
printf("nHello World!");
}

Assembler examples