On this page, you will find some small QBasic programs and functions that I have written. If you find something useful and want to incorporate it in your program, feel free to do so. No need to ask for permission. Just copy and use whatever you like.

I learned QBasic programming language when I was 12 years old. Later I learned C, x86 assembly, Perl, and JavaScript. Programming is one of my hobbies. Most people don't program in QBasic anymore, and I rarely do as well. But still, this is a nice language, and it's perfect for beginners.

QBasic Functions

QLIB - work with quad words, Large integers, solve Knapsack, etc.

WINDOWS - Tests to see if Windows is running

FILESIZE - Returns the correct size of large files

REPLACE - Replaces part of a string

CENTER - Prints text in the center

ASM - Runs assembly routine (hex codes)

QBasic Programs

EVAL.BAS - Solves a simple problem like 3-4*(2+9)

PI.BAS - Calculates the value of PI

PRIMES.BAS - finds primes and factors

XCMOS.BAS - wipes the contents of CMOS memory

COUNTRY.BAS - select your country from a list

VIEWFILE.BAS - a simple text file viewer. I created this program while I was recovering from pneumonia which I got after I had the flu. I was in bed for 2 months. Horrible time! I'll never forget that.

RANDOM.BAS - prints random numbers in various ways

REBOOT.BAS - this program can reboot Windows and DOS

FILEWRAP.BAS - wrap a ZIP file into a basic program!

TXTSTARS.BAS - stars screen saver in text mode

MEMDUMP.BAS - view the contents of your memory

INTLIST.BAS - saves & displays interrupt vectors

DATE.BAS - displays the current date

LINEDEMO.BAS - a lines screen saver (graphics mode)

SINWAVE.BAS - draws a sine wave (graphics mode)

HILIGHT.BAS - BASIC source code with syntax highlithing

Last Update: Jan 21, 2022