Ways to run QBASIC programs on GNU/Linuxby qbguy (Login dean.menezes)Linux-Forum 1. DosBox
DOSBox is an emulator which emulates an IBM PC compatible computer running MS-DOS. It is intended especially for use with old PC games. Some of you might have used it on Vista. DOSBox works well for emulation, but it has the disadvantage of being much slower than native DOS, NTVDM on Windows, and Dosemu. Dosbox's speed can be improved by setting cycles=max in /etc/dosemu.conf Note: disks must be mounted via the mount command in dosbox 2. Dosemu Dosemu can run on both x86 and x86_64 but not embedded architectures like ARM. It usually runs faster than DOSBOX when both are set to max speed, and has the advantage that it can also be used on a framebuffer as well as in X. The amount of CPU it uses can be changed by running speed.com inside dosemu, or to do it permanently, edit dosemu.conf in /etc/dosemu and change hogthreshold to 0 for max speed [or to some higher positive number than the default of 1]. NOTE: If you recieve the error "LOWRAM mmap: Invalid argument Segmentation fault" when running from a terminal or nothing happens when you run it from a GUI, You should edit /etc/sysctl.conf or /etc/sysctl.d/10-process-security.conf (depending on distribution): delete this line if it exists: vm.mmap_min_addr = 65536 add this line: vm.mmap_min_addr = 0 You can mount folders with the lredir command and your home (~) folder is already mounted as d: 3. QB64 QB64 is a program that lets you compile your QBASIC programs to a native Linux binary. However, it does not have a native 64-bit version yet. It translates to C++ so it requires g++ to be installed. It is considered more QBASIC compatible than FreeBASIC and in the future, it will emulate DOS interrupt calls and x86 instructions. 4. FreeBASIC FreeBASIC is another compiler that is QBASIC compatible. It can produce programs that run in a terminal, whereas with QB64 your programs always run in QB64's emulated screen 0. For maximum QBASIC compatibility, run Freebasic with fbc -lang qb. You should be able to use FreeBASIC's new commands in QBASIC mode by prefixing them with TWO underscores. Like QB64, it does not have a 64-bit version.
|