- 27 -
Before the content of the floppy disk can be used, the disk must be mounted.
Type “MNT 0” to mount the floppy on drive 0. When the command completes
(could take ten or more seconds), type “DIR 0” at the prompt to see a direc-
tory of files on the disk.
Running a Program from Disk
Files starting with “#” are executable files. To run an executable file, sim-
ply type the filename without the leading “#” and press RETURN. For example,
the program “#PRIME” computes and displays prime numbers between 1 and 200.
To run the program, type “PRIME” and press RETURN.
Editing a Source File
Files staring with “&” are typically source files. To view or edit a source
file, run the editor by typing “EDIT filename” where filename is the name of
the source file without the leading “&”. For example, to edit the source file
for PRIME (&PRIME), type “EDIT PRIME 0” and press return. The trailing zero
is the drive number the file is on. If you forget to specify the drive num-
ber, you will be prompted to enter the drive number on a separate line.
The editor’s prompt is an asterisk (“*”). To view a file’s full content, type
“P” (for Print) and press RETURN. To exit the editor without saving changes,
type “Q” and press RETURN. To exit and save changes, type “E” followed by RE-
TURN. Refer to the Altair DOS user’s manual for more information about using
the editor (see “More Information,” below).
Assembling and Linking an Assembly Language Program
The file “&ECHO” is the source file for an assembly language program that
echoes typed characters back to the screen through serial port 2 (not the
main console port). You can view the source file by typing “EDIT ECHO 0” and
then pressing “P” at the editor’s prompt as detailed above for “PRIME.”
To assemble the program, type “ASM” and press RETURN. When prompted for the
file name, type “ECHO 0” (without the leading “&”) and press RETURN. The as-
sembler runs, then prompts if you want to assemble another program. Type “N”
and press return.
The assembler outputs a relocatable object file that must be run through the
linker before it can be executed. Object files are identified by a leading
“*”. Type “LINK” followed by RETURN to run the linker. The linker’s prompt is
an asterisk (“*”). At the prompt, type “L ECHO 0” to load the relocatable ob-
ject file for ECHO into memory. The default load address is octal 24000. Type
“E” at the next prompt to exit the linker.
At this point, the ECHO program is in memory at octal address 24000. Immedi-
ately use the “SAV” command to write the program from memory into an executa-
ble file:
1) Type “SAV ECHO 0” and press RETURN.
2) At the “ENTER LOW ADDRESS” prompt, type 24000 and press RETURN.
3) At the “ENTER HIGH ADDRESS” prompt, type 24100 and press RETURN.
4) At the “ENTER START ADDRESS” prompt, type 24000 and press RETURN.
The SAV command creates the executable file “#ECHO”. To use the ECHO program,
you’ll need to start a second instance of TeraTerm connected to serial port 2
on the Altair Clone. See the 8K BASIC demonstration for how to setup serial
port 2 for the cassette – the steps required to use the ECHO program are the
same.
Содержание 8800 Clone
Страница 1: ......