Examples that run right now¶
This page is a shelf of finished d/BASIC programs. Click any card and the program loads into the playground and runs, right in your browser, with nothing to install. Each card also gives the size of the compiled program file, .dbc, that today's compiler produces from it, measured by the same tool that builds the Classic Listings page.
OPEN builds it, DRAW paints it, CLOSE lets it go. 801 bytes of compiled code.
Console helloTwo PRINTs and an END: a console program, an exit status, and the smallest program file you can make. 185 bytes of compiled code.
Sine wave, the 1978 wayThe landing page's demo: nine numbered lines, TAB, SIN and a flag, printing the years 1988 and 2026 down a wave. 379 bytes of compiled code.
BUNNY, 1978The classic, untouched: the same compiler, a listing typed in 1978.
Ninety-five more 1978 listings, each with a note on what it does in the browser today, are on the Classic Listings page.
Read the source, then change it¶
Each example is a plain .bas file you can read before you run it: sine-wave.bas, dworks-starter.bas, gx-gravity.bas, gx-first-light.bas, window-hello.bas, console-hello.bas. The GX sample sits next to the sprites, the map and the MIT licence it came with, in gx-gravity-assets.
When you have made something of your own, press Copy share link in the playground. The whole program travels inside the link, and nothing is uploaded anywhere.
Continue with Windows & Events, d/Works Widgets or Your First GX Game.