File: examples.html

package info (click to toggle)
pcbasic 2.0.7-9
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 35,416 kB
  • sloc: python: 28,411; sh: 103; makefile: 10
file content (83 lines) | stat: -rw-r--r-- 3,026 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!--
    PC-BASIC documentation
    Copyright (c) 2014-2022 Rob Hagemans
    This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
    http://creativecommons.org/licenses/by-sa/4.0/legalcode
-->

<section>
    <h3 id="examples">Examples</h3>
    <dl>
        <dt><code><b>pcbasic</b></code></dt>
        <dd>
            Start PC-BASIC in direct mode, emulating GW-BASIC/BASICA
            with VGA graphics.
        </dd>

        <dt><code><b>pcbasic --codepage=950</b></code></dt>
        <dd>
            Start PC-BASIC using the Big-5 codepage.
        </dd>

        <dt><code><b>pcbasic Foobar.baz</b></code></dt>
        <dd>
            Start PC-BASIC with package Foobar. Load the settings from the
            package; usually this will run a main program contained in the
            package.
        </dd>

        <dt><code><b>pcbasic Foobar.baz --convert=A --text-encoding=utf-8</b></code></dt>
        <dd>
            List the main program of package Foobar to standard output as UTF-8.
        </dd>

        <dt><code><b>pcbasic MYPROG.BAS --mount=A:./files,B:./morefiles</b></code></dt>
        <dd>
            Mount the current directory's subdirectory <code>files</code>
            as drive <code>A:</code> and subdirectory <code>morefiles</code> as
            drive <code>B:</code>, then run <code>MYPROG.BAS</code>.
        </dd>

        <dt><code><b>pcbasic --mount=A:C:\fakeflop</b></code></dt>
        <dd>
            Run PC-BASIC with Windows directory <code>C:\fakeflop</code> mounted as
            <code>A:</code> drive.
        </dd>

        <dt><code><b>pcbasic Z:\INFO.BAS --preset=mda --monitor=amber</b></code></dt>
        <dd>
            Run <code>INFO.BAS</code> in the current directory on an
            emulated MDA with amber tinted monitor.
        </dd>

        <dt><code><b>pcbasic /home/me/retro/COMP.BAS --preset=cga --monitor=composite</b></code></dt>
        <dd>
            Run <code>COMP.BAS</code> stored at <code>/home/me/retro</code>
            on an emulated CGA machine with a composite monitor.
        </dd>

        <dt><code><b>pcbasic PCJRGAME.BAS --preset=pcjr -k='start\r'</b></code></dt>
        <dd>
            Run <code>PCJRGAME.BAS</code> on an emulated PCjr and feed in
            the keystrokes <kbd>s</kbd><kbd>t</kbd><kbd>a</kbd><kbd>r</kbd><kbd>t</kbd><kbd>Enter</kbd>.
        </dd>

        <dt><code><b>pcbasic BANNER.BAS --lpt2=PRINTER:</b></code></dt>
        <dd>
            Run <code>BANNER.BAS</code> in default mode with the default
            printer attached to <code>LPT2:</code>.
        </dd>

        <dt><code><b>pcbasic --resume</b></code></dt>
        <dd>
            Resume the most recently closed PC-BASIC session.
        </dd>

        <dt><code><b>pcbasic -c ?1+1</b></code></dt>
        <dd>
            Execute the BASIC command <code>PRINT 1+1</code> in the
            command-line interface and return to the calling shell.
        </dd>
    </dl>
</section>
<hr />