Skip to content

BASCOMP 2.0

Choose a tag to compare

@tt1542 tt1542 released this 31 May 16:45
· 23 commits to main since this release
289927f

Initial public release.

BASCOMP 2.0 is a traditional single-pass compiler, taking BASIC files in different layouts (traditional line-numbers or QB compatible mode) and creating NASM compatible assembler files.
The postprocessing ASMPACK executable optimizes the generated files, providing for a 30-percent decrease in binary size.
The resulting files can then be processed by either NASM (creating 386+ code) or using the provided BASM specialized assembler (creates 8086 compatible code).

The compiler can compile itself. All sources are included.

Usage

  • Extract all files into the same directory.
  • For compiling/building a .BAS file, use "build filename" (no extension)
  • You should end up with a .COM file of the same name.
  • For recompiling the compiler, use the "bn" batch file (no parameters)

Examples included

  • PI.BAS - calculate up to 200 digits of PI (without using floating point arithmetic!)
  • HEXDUMP.BAS - show a hexdump of a given file
  • TIMEIT.BAS - show the totel time an external program needs to run (used for the build scripts)
  • LZSENC.BAS / LZSDEC.BAS - examples of using primitive compression/decompression algorithms with BASCOMP
  • VIDDEM.BAS - demonstrating PEEK/POKE functions using video memory (color graphic adapters)
  • RENUMB.BAS - in case you run out of line numbers/need a renumbering of your BASIC code, this tool is for you
  • CONV2QB.BAS - changes traditional BASIC code with line numbers into the more readable QB format