EnglishFrenchSpanish

OnWorks favicon

zmakebas - Online in the Cloud

Run zmakebas in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command zmakebas that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


zmakebas - convert text file into Spectrum Basic program

SYNOPSIS


zmakebas [-hlr] [-a startline] [-i incr] [-n speccy_filename] [-o output_file] [-s line]
[input_file]

DESCRIPTION


zmakebas converts a Spectrum Basic program written as a text file into an actual speccy
Basic file (as a .TAP file, or optionally a raw headerless file). By default, input comes
from stdin, and output goes to `out.tap'.

Using zmakebas rather than (say) writing the Basic in an emulator means you can write
using a nicer editor, and can use tools which work on text files, etc. Also, with the `-l'
option you can write without line numbers, using labels in their place where necessary.

The program was originally intended to be used simply to make little loader programs, so
they wouldn't have to be sourceless binaries. However, I went to a fair amount of effort
to make sure it'd work for bigger, more serious programs too, so you can also use it for
that kind of thing.

OPTIONS


-a make the generated file auto-start from line startline. If `-l' was specified,
this can be a label, but don't forget to include the initial `@' to point this out.

-h give help on command line options.

-i in labels mode, set line number increment (default 2).

-l use labels rather than line numbers.

-n specify filename to use in .TAP file (up to 10 chars), i.e. the filename the speccy
will see. Default is a blank filename (10 spaces).

-o output to output_file rather than the default `out.tap'. Use `-' as the filename to
output on stdout.

-r write a raw headerless Basic file, rather than the default .TAP file.

-s in labels mode, set starting line number (default 10).

INPUT FORMAT


The input should be much as you would type into a speccy (a 128, to be precise), with the
following exceptions:

Lines starting with `#' are ignored. This allows you to insert comments which are not
copied into the output Basic file.

Blank lines are ignored.

Case is ignored in keywords - `print', `PRINT', and `pRiNt' are equivalent.

You can optionally use `randomise' as an alternative to `randomize'.

You can get hex numbers by using `bin' with a C-style hex number, e.g. to get 1234h you'd
use `bin 0x1234'. (It appears in exactly that form in the speccy listing, though, so don't
use it if you want to be able to edit the output program on a speccy.)

You can get a pound sign (character 96 on a speccy) by using a backquote (`).

One input line normally equals one line of Basic, but you can use backslash as the last
character of a line to continue the statement(s) on the next input line.

Rather than literally inserting block graphics characters and UDGs as you would on a
speccy, you should use an escape sequence. These begin with a backslash (`\'). To get a
UDG, follow this backslash with the UDG's letter, in the range `a' to `u' (`t' and `u'
will only have the desired effect if the program is run on a 48k speccy or in 48k mode,
though); both upper and lowercase work. To get the copyright symbol, follow it with `*'.
To get a block graphics character, follow it with a two-character `drawing' of it using
spaces, dots, apostrophes and/or colons. (For example, you'd get character 135 with `\':',
and character 142 with `\:.'.) To get a literal `@', follow it with `@'. (This is needed
only if the `-l' option was given, but works whether it was or not.) To specify a literal
eight-bit character code to dump into the Basic output file directly (to use for embedded
colour control codes and the like), use braces and a C-syntax number e.g. `\{42}' for
decimal, and `\{0x42}' for hex. Finally, as usual with such things, you can get a literal
backslash by following the first backslash with another.

If the `-l' option was given, line numbers must be omitted. Instead these are
automatically generated in the output, and you can use labels where necessary as
substitute line numbers for `goto' commands etc. A label is defined with the text
`@label:' at the beginning of a line (possibly preceded by whitespace). It can be referred
to (before or after) with `@label'. Any printable ASCII character other than colon and
space can be used in a label name. Here's an example of how labels work, showing both the
input and (listing of) the output - first, the input:

goto @foo
print "not seen"
@foo: print "hello world"

Now the output:

10 GO TO 14
12 PRINT "not seen"
14 PRINT "hello world"

Note that case is significant for labels; `foo' and `FOO' are different.

Use zmakebas online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Transmission Remote GUI
    Transmission Remote GUI
    Transmission Remote GUI is a feature
    rich cross platform front-end to
    remotely control a Transmission
    Bit-Torrent client daemon via its RPC
    protocol. Transmissi...
    Download Transmission Remote GUI
  • 2
    s3cmd
    s3cmd
    Open-source tool to access Amazon S3
    file storage. S3cmd is a free command
    line tool and client for uploading,
    retrieving and managing data in Amazon
    S3 and ot...
    Download s3cmd
  • 3
    XyZerKunG ServerTool
    XyZerKunG ServerTool
    XyZerKunG ServerTool helps you to make
    your own Minecraft server and play with
    your friend for a few minutes.
    Features:Automatically create a
    Minecraft serverU...
    Download XyZerKunG ServerTool
  • 4
    CalcTools
    CalcTools
    Java source intended to serve as a
    nexus for teaching both mathematics and
    software solutions for computation on
    iterative equations. Public interfaces
    allow a...
    Download CalcTools
  • 5
    Rocket.Chat Desktop Client
    Rocket.Chat Desktop Client
    Rocket.Chat Desktop client is the
    official desktop app for Rocket.Chat,
    the simple but powerful open source web
    chat platform. It's tested on macOS,
    Windows...
    Download Rocket.Chat Desktop Client
  • 6
    OfficeFloor
    OfficeFloor
    OfficeFloor provides inversion of
    coupling control, with its: - dependency
    injection - continuation injection -
    thread injection For more information
    visit the...
    Download OfficeFloor
  • More »

Linux commands

  • 1
    a2query
    a2query
    a2query - retrieve runtime
    configuration from a local Apache 2 HTTP
    server ...
    Run a2query
  • 2
    a2x
    a2x
    a2x - A toolchain manager for AsciiDoc
    (converts Asciidoc text files to other
    file formats) ...
    Run a2x
  • 3
    covered
    covered
    Covered - Verilog Code Coverage
    Analyzer SYNTAX: covered
    [global_options] score [options] covered
    [global_options] merge [options]
    existing_database database_t...
    Run covered
  • 4
    coverpg
    coverpg
    make.coverpg - create a fax coverpg on
    stdout ...
    Run coverpg
  • 5
    FvwmWharf
    FvwmWharf
    FvwmWharf - the AfterStep application
    "dock" module ported to Fvwm. ...
    Run FvwmWharf
  • 6
    FvwmWindowMenu
    FvwmWindowMenu
    FvwmWindowMenu - open configurable fvwm
    menu listing current windows ...
    Run FvwmWindowMenu
  • More »

Ad