MADE FOR THE NES. READY FOR YOUR IDEAS. NO ACCOUNT NEEDED.
NESBASICBY NDB SOFTWARE

01 THE EXAMPLE LIBRARY

Steal a little
inspiration.

Eight complete programs from the free guide. Read the code, try it in the actual ROM, then make it your own.

Beginner01

Hello, 8-bit world

Your first two lines of NES BASIC. Print a message and make the machine yours.

HELLO.BAS
10 PRINT "HELLO FROM NES BASIC"
20 END
Beginner02

Meet your program

Ask for a name, store a string, and build a personal greeting.

NAME.BAS
10 INPUT "YOUR NAME";N$
20 A$="HELLO, "+N$
30 PRINT A$
40 IF N$="" THEN PRINT "EMPTY NAME"
50 END
Beginner03

There and back again

Call a subroutine and return to the next instruction.

SUBROUTINE.BAS
10 GOSUB 100
20 PRINT "BACK"
30 END
100 PRINT "IN SUBROUTINE"
110 RETURN
Beginner04

A little number magic

Add the numbers from 1 to 5 with a FOR / NEXT loop.

SUM.BAS
10 A=0
20 FOR I=1 TO 5
30 A=A+I
40 NEXT I
50 PRINT "TOTAL=";A
60 END
Intermediate05

Draw outside the lines

Create a frame, a diagonal, and a pixel on the real graphics canvas.

DRAWING.BAS
10 SCREEN 1
20 COLOR 42,15
30 RECT 8,8,119,55
40 LINE 0,0,127,63
50 PSET 64,32
60 END
Beginner06

Three notes, one idea

Make a short melody with the NES pulse channel.

MELODY.BAS
10 SOUND 1,60,20
20 WAIT 20
30 SOUND 1,64,20
40 WAIT 20
50 SOUND 1,67,30
60 WAIT 30
70 END
Intermediate07

What did you press?

Read controller events with INKEY$ and inspect their byte codes.

CODES.BAS
10 K$=INKEY$
20 IF K$="" THEN GOTO 10
30 PRINT "CODE=";ASC(K$)
40 GOTO 10
Intermediate08

Move your first sprite

Put a ship on screen and move it with the controller.

MOVER.BAS
10 SCREEN 1:X=80
20 SPRITE 0,X,100,0
30 J=JOY(1)
40 X=80+J/128*8
50 MOVE 0,X,100
60 WAIT 1:GOTO 30
These examples run in the matching ROM. The controller and input-code examples keep running until you press Stop or Ctrl+C. The name example waits for your answer. Downloads contain actual ASCII BASIC source.