Hacker News new | ask | show | jobs
by epsylon 3701 days ago
QBasic supports subroutines (called SUB for procedures and FUNCTION for functions). You can write very structured code with QBasic; pretty much the only thing it lacks is pointers, but it's a very capable language otherwise.
2 comments

> pretty much the only thing it lacks is pointers, but it's a very capable...

You can PEEK and POKE arbitrary memory addresses and use CALL ABSOLUTE to call assembly shell code at any address.

I remember typing out a mouse driver shell code in hexadecimal from a magazine. QBasic does not have built in mouse routines and the young me was baffled when you could make that happen with a long string of digits.

GOSUB got me pretty far!