Hacker News new | ask | show | jobs
by pan69 685 days ago
Cool as this is, this isn't the QBasic that came with Microsoft DOS back in the day. It seems to be written in QB64 which is a modern BASIC distribution that retains compatibility with MS Qbasic.

E.g. to open the TCP/IP connection, this project uses the _OPENHOST function, which does not exist in the olden QB.

https://qb64.com/wiki/_OPENHOST.html

https://github.com/jamonholmgren/qub/blob/main/template/qub/...

1 comments

In principle, you could build a web server in classic QBasic: although it has no native networking support, it supports loading and calling machine code functions written in assembly. So, you could write assembly code to call a DOS networking API (such as packet driver), and then use that to build a web server in classic QBasic. I expect the performance will be terrible, but probably someone will eventually do it (not me) just to show it can be done.
I am quite sure you would need QuickBasic proper for that, however I don't have the manual around to confirm that.
QBASIC had the CALL ABSOLUTE statement for calling machine language code. It didn’t require QuickBasic, the QBASIC that can with MS-DOS had it. Also GW-BASIC had it before it. You store the machine code as a list of integers in a DATA statement.
If I remember correctly, you had to run qbasic.exe with a /L switch to load 3rd party library.