Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
BasloadV1.0Win32.zip | 2017-10-15 | 13.1 kB | |
BasloadV0.9Win32.zip | 2017-10-09 | 10.0 kB | |
BasloadV0.8Win32.zip | 2017-10-01 | 9.5 kB | |
BasloadV0.7Win32.zip | 2017-10-01 | 9.5 kB | |
Totals: 4 Items | 42.1 kB | 0 |
Basload is a simple BASIC loader generator that generates a typeable listing of a machine language program and optionally also a working BASIC program that can be transferred to floppy disk, tape or whatever data storage device you can connect to your C64. USAGE: "basload <infile> [-o <outfile>] [-b <bytes per line>] [-l <load address>] [c- <listing>]" <infile> is the filename of the ML-program you want to basloadify. -o <outfile> produces a basloadified C64 executable. You could run it on your C64 or an emulator to see if it does what it should. If it doesn't and that's clearly Basload's fault feel free to raise a ticket in the bugtracker. -b <bytes per line> specifies how many bytes should be put on each data line. Since each byte is split into two characters the maximum is 31 to stay within the C64's 80 character input limit. The minimum is 6 bytes per line. -l <load address> must be provided when the ML-program doesn't have one, and only then! Basload accepts both decimal and hexadicimal input (with $-prefix) for all numerical parameters. -c <listing> lets Basload use a custom BASIC loader instead of the default "strmemc.bas" one. Basload always prints the resulting BASIC program to the console, if you pipe the output to a textfile like e.g. "basload foo > bar.txt" the contents of bar.txt could then be copied & pasted to share the program via webservices that don't allow attaching binaries or if the recipient cannot transfer a binary from his PC to his C64 and has to type it in. POSSIBLE ERROR MESSAGES AND THEIR MEANING: "invalid load address" - the load address must not be greater than 65535. "invalid input file" - <infile> is too large or too small for conversion, or Basload couldn't find it. "can't open listing" - the custom listing file couldn't be found, check for correct spelling of path and filename. "can't parse listing" - the listing misses some mandatory control flags, contains empty or too long BASIC lines or uses the same line numbers more than once or in non-ascending order. "too much output" - the output is too large to fit into BASIC ram. If it is just a little bit too large it might help to to generate string data wihtout checksums and the maximum number of bytes per line. "can't write output file" - it already exists and is write-protected, you have no write permission for the current folder, your HD is on fire or whatever else can go wrong. You may also get warnings if the BASIC code and the generated ML-code overlap in memory. Ignore them at your own risk or use a custom loader that saves the ML-output to disk. CUSTOMIZING THE BASIC LOADER: The default loader is stored in "strmemc.bas" and produces string data with checksums that gets written to memory. "strmem.bas" does the same without checksum, "strdisk.bas and "strdiskc.bas" write to disk instead of memory. "nummem.txt", "nummemc.bas", "numdisk.bas" and "numdiskc.bas" use numerical data instead of strings, what makes the loader code shorter and faster but generates longer/more data statements, so better only use these for rather short ML-programs. For really huge listings you can use "hybrid.bas" which works like the default loader but installs a machine language routine that processes the data *much* faster than the interpreted BASIC code. For comparison: writing this readme to C64 ram takes over 175 seconds with the default one but just about 18 with the hybrid loader. If you want to write your own loader the following rules apply: Line numbers are restricted to 0-9, the tokenized code must fit within less than 1000 bytes, and to allow to type in the listing on a C64 each line of BASIC text must neither be empty nor longer than 80 characters. Keyword abbreviations like ?, pO etc. aren't recognized, use the long version instead. Control codes to move the cursor etc. won't work, keep your print-statements simple or use chr$(), spc() etc. if you really have to. The following uppercase characters are reserved for data generation control and must be placed before the actual BASIC listing: S: use string data N: use numerical data. either this or S *must* be specified. C: generate checksum F: code is written to a file (disables memory overlap warnings) The following uppercase characters are placeholders within the listing and shouldn't be used for anything else: X: load address Y: number of string data lines Z: number of numerical data items If you want to add comments to your loader either use rem-statements within the BASIC text itself or put them behind it after a backslash. FINAL WARNING: Not only is the source the usual ugly mess, this is still an early beta and thus may have lots of bugs that could harm your PC, so use it at your own risk! That's all! Have fun, CS