 ****************************************************** .
 *                    A P P L E   1                   * .
 *              emulator for ZX Spectrum              * .
 ****************************************************** .
                      HELP CONTENT:                     .
     Features                                           .
     Emulator control keys                              .
     System monitor commands                            .
     Apple Basic commands                               .
     Error messages                                     .
     Memory map                                         .
                        Features                        .
                        --------                        .
Apple 1 is first personal computer produced by Steve    .
Wozniak and Steve Jobs. It featured MOS 6502 processor  .
at about 1 MHz, 4 - 32 kB RAM (unexpanded), TV terminal .
and ASCII keyboard with two extra buttons (reset and    .
clearscreen). Cassette interface was available and Apple.
integer Basic was loaded from tape.                     .
This emulator features full Apple 1 system, keyboard and.
terminal, documented 6502 instruction set, and 32 kB RAM.
(on ZX 128) or 16 kB RAM (ZX 48). Apple Basic is stored .
in ROM (as Briel Computer has).                         .
It also emulates circuit for single instruction step,   .
has built-in monitor, disassembler, assembler and simple.
tracing utility.                                        .
System monitor is working faster than original Apple 1, .
speed of Basic is somewhat slower.                      .
                                                        .
                 Emulator control keys:                 .
                 ----------------------                 .
CS + 1 (EDIT) - warm RESET (hardware button).           .
CS + 2 (CAPS LOCK) - CAPS LOCK, ON at start.            .
     * Upper case letters are needed for commands! *    .
CS + 3 (TRUE VIDEO) - monitor OFF (fast).               .
CS + 4 (INV. VIDEO) - monitor ON (slow).                .
CS + 5 (LEFT) - step by single instruction.             .
CS + 6 (DOWN) - invokes the MENU, cursor at top.        .
CS + 7 (UP) - invokes the MENU, cursor at bottom.       .
CS + 8 (RIGHT) - continuous run.                        .
CS + 9 (GRAPH) - CLEAR SCREEN (hardware button).        .
CS + 0 (DELETE) - ESCAPE. Cancels line input.           .
To RUB OUT a character, use SS + 0 (underscore, "_").   .
SS + Q - CTRL+D, cancels the AUTO command.              .
SS + W - "clear screen" code, useable in Basic programs..
SS + E - "cursor home" code, useable in Basic programs. .
Some extra characters are available with SS.            .
                                                        .
   Control keys for disassembler (available in MENU):   .
SPACE or EDIT - leave disassembler.                     .
M - set display address.                                .
ENTER - change memory content.                          .
CS + SS (EXT MODE) - switches between assembler and hex..
A, X, Y, S, C, P - set A, X, Y, S, PC or P register.    .
CS + 5 (LEFT) - step by single instruction.             .
CS + 6 (DOWN) - move to next instruction.               .
CS + 7 (UP) - move to previous byte.                    .
CS + 8 (RIGHT) - move to next byte.                     .
                                                        .
               System monitor commands:                 .
               ------------------------                 .
System monitor prompt is "\".                           .
X in following text stands for a HEX digit (0-9,A-F).   .
XXXX stands for address (X, XX, XXX or XXXX).           .
XX stands for byte (X or XX).                           .
XXXX - sets the address, lists its content.             .
XXXX XXXX - lists content of given single addresses.    .
XXXX.XXXX - lists content from address "." to address.  .
.XXXX - lists from last used start address to XXXX.     .
XXXX:XX XX - stores data from given address.            .
:XX XX - stores data from last used start address.      .
XXXXR - runs the code from given address.               .
R - runs the code from last used start address.         .
"Online" correcion - typing XXXX:yyyyXX is as XXXX:XX.  .
                                                        .
               Apple Basic commands:                    .
               ---------------------                    .
Basic prompt is ">". Return to monitor using RESET.     .
Cold start (deletes program) is on E000 or E2B0.        .
Warm start (leaves program untouched) is on E2B3.       .
   expr = arithmetic expression                         .
   var = variable (numeric, array, or string)           .
   val = number (-32767 to 32767 inclusive)             .
                                                        .
Variables:   Name:                      Example:        .
----------   ---------------            ---------       .
numeric      letter                     A    N          .
          or letter + number            A1   N6         .
array        letter                     A()  N()        .
          or letter + number            A1() N6()       .
string       letter                     A$   T$         .
  *  first element of array, A(1), is identical to A *  .
  * A$(a,b) or A$(a) are substrings (from, to [end]) *  .
                                                        .
Expressions:                                            .
-expr        negative value of expr.                    .
NOT expr     0 if expr non-zero, 1 if expr is zero.     .
expr * expr  product.                                   .
expr / expr  truncated quotient.                        .
expr + expr  sum.                                       .
expr - expr  difference.                                .
expr = expr  1 if equal (true), 0 if false.             .
expr > expr  1 if first is greater than second.         .
expr < expr  1 if first is less than second.            .
expr >= expr 1 if first greater than or equal to second..
expr >= expr 1 if first is less than or equal to second..
expr # expr  1 if unequal. The same as expr <> expr.    .
expr AND expr 1 if neither equals 0.                    .
expr OR expr  1 unless both are zero.                   .
expr MOD expr remainder left after dividing.            .
var$ = var$  compares strings, 1 if identical.          .
var$ # var$  compares strings, 1 if different.          .
                                                        .
Functions:                                              .
ABS (expr)   absolute (positive) value of expr.         .
SGN (expr)   0 if expr 0, 1 if positive, -1 if negative..
PEEK (expr)  reads content of memory address (decimal). .
RND (expr)   gives random number between 0 and expr.    .
LEN (var$)   returns number of characters in a string.  .
                                                        .
Commands:                                               .
HIMEM = (expr) sets high memory boundary for program use.
               (decimal). Initializes to 4096.          .
LOMEM = (expr) sets low memory boundary for program use .
               (decimal). Initializes to 2048.          .
AUTO val1,val2 starts supplying line numbers from val1  .
               with step val2 (or 10, if val2 ommited). .
               To terminate, press CTRL+D (SS+Q on ZX). .
CLR            clears variables, arrays, pending FOR and.
               GOSUB statements.                        .
DEL val1,val2  erases program lines from val1 to val2.  .
LIST val1,val2 displays all program statements on lines .
               from val1 to val2, or line val1, or in   .
               entire program, if both are ommited.     .
RUN val1       does CLR, then executes program from line.
               val1, or from the beginning.             .
SCR            scratches (deletes) entire program.      .
                                                        .
Statements:                                             .
Denoted with "C" can be used also as commands.          .
C LET var=expr evaluates expr and assigns value to var. .
               LET can be ommited (var=expr).           .
INPUT item     prints a message and "?", awaits the user.
               to input value for variable. Multi item  .
               input must contain items separated.      .
               INPUT A : INPUT A,B,C$,D(4)              .
               INPUT "ENTER A,A$,B(3)",A,A$,B(3)        .
C PRINT item   item may be variable, expression or      .
               message to be printed, separated by ","  .
               (moves to next column) or ";" (prints    .
               with no spaces).                         .
               PRINT "A$=";a$,2*48                      .
C TAB (expr)   prints the number of spaces.             .
FOR var=expr1 TO expr2 STEP expr3                       .
NEXT var       repeats commands between FOR and NEXT,   .
               var value starts at expr1, and with step .
               expr3 reaches expr2, then leaves cycle.  .
C IF (expr) THEN statement                              .
  IF (expr) THEN line number                            .
               if expr is false, next statement after IF.
               is executed, if expr is true, statement  .
               or line number after THEN is executed.   .
C GOTO expr    branches to the given line number.       .
GOSUB expr                                              .
RETURN         GOSUB branches to the given line number, .
               RETURN skips back to the line following  .
               most recently executed GOSUB. Can nested..
C DIM var1 (expr), var2 (expr)                          .
               sets the dimensions of array or string.  .
C REM text     Introduces a comment, without affecting  .
               program execution.                       .
END            stops execution of the program.          .
C POKE expr1,expr2                                      .
               stores the value expr2 to memory location.
               expr1 (decimal).                         .
C CALL expr    jumps to given memory location. Links    .
               Basic with machine code subroutines. RTS .
               (return from subroutine) returns control .
               back to Basic.                           .
                                                        .
                     Error messages:                    .
                     ---------------                    .
*** SYNTAX ERR syntactic or typing error.               .
*** >32767 ERR value entered or calculated was less than.
               -32767 or greater than 32767.            .
*** >255 ERR   value restricted to range 0 to 255 was   .
               outside that range.                      .
***BAD BRANCH ERR attempt to branch to non-existant line.
***BAD RETURN ERR attempt to execute more RETURNs than  .
               previously executed GOSUBs.              .
***BAD NEXT ERR attempt to execute NEXT without         .
               corresponding FOR.                       .
*** >8 GOSUBS ERR more than 8 nested GOSUBs.            .
*** >8 FORS ERR more than 8 nested FOR loops.           .
*** END ERR    last statement executed was not END.     .
*** MEM FULL ERR memory needed has exceeded the memory  .
               size available.                          .
*** TOO LONG ERR too many nested parentheses.           .
*** DIM ERR    string was previously DIMensioned.       .
*** RANGE ERR  range of substring was larger than DIM or.
               smaller than 1.                          .
*** STR OVFL ERR number of characters assigned exceeded .
               DIMensioned value.                       .
*** STRING ERR illegal string operation executed.       .
RETYPE LINE    illegal data entered in response to INPUT.
               statement. Illegal item is requested to  .
               be retyped.                              .
\   results when more than 128 consecutive characters   .
    were entered.                                       .
                                                        .
                     Memory map:                        .
                     -----------                        .
0000 zero page 0024-002B monitor system variables       .
               004A-00FF Basic system variables         .
0100 1st page  0100-01FF stack                          .
0200           0200-027F input line buffer              .
               0280-07FF free RAM                       .
0800           0800-0FFF default space for Basic program.
1000           1000-3FFF free RAM                       .
4000           4000-7FFF free RAM (ZX 128), or mirror of.
                         lower RAM 0000-3FFF (ZX 48)    .
--------------------[ end of RAM ]----------------------.
8000           8000-9FFF unused space                   .
A000 expansion A000-AFFF expansion area A, unused       .
B000 expansion B000-BFFF expansion area B, unused       .
C000 expansion C100-C1FF cassette interface + tape ROM  .
D000 hardware  D010      keyboard PIA control register  .
     controls  D011      keyboard PIA data              .
               D012      terminal PIA control register  .
               D013      terminal PIA data              .
-------------------[ ROM starts here ]------------------.
E000           E000-EFFF Basic ROM                      .
F000           F000-FEFF unused space                   .
               FF00-FFFF Monitor ROM                    .
                                                        .