Cosmac Elf 2000 User's Manual
Total Page:16
File Type:pdf, Size:1020Kb
COSMAC ELF 2000 USER'S MANUAL Sixth Edition Copyright © 2004-2006 by Spare Time Gizmos. Visit our web site at www.SpareTimeGizmos.com Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 published by the Free Software Foundation; with no invariant sections; with the front cover text “Portions Copyright © 2004-2006 by Spare Time Gizmos” and our URL, and with no back cover text. A copy of this license may be obtained from http://www.gnu.org/licenses/fdl.txt. CONTENTS 1 OVERVIEW ................................................................................................................................. 1 1.1 REGULATORY WARNING..................................................................................................... 2 1.2 SAFETY WARNING ............................................................................................................. 2 1.3 WARRANTY ....................................................................................................................... 2 2 ASSEMBLY.................................................................................................................................. 5 2.1 ERRATA ............................................................................................................................ 5 2.2 PART SELECTION............................................................................................................... 5 2.3 OPTIONAL SUBSYSTEMS .................................................................................................... 7 2.4 SOCKETS AND SOLDERING ................................................................................................. 9 2.5 ASSEMBLY HINTS ............................................................................................................ 10 2.6 SWITCH PANEL ................................................................................................................ 10 2.7 HEX KEYPAD ................................................................................................................... 12 2.8 MOUNTING RAILS ............................................................................................................. 14 2.9 FINAL CHECKOUT ............................................................................................................ 14 3 HARDWARE DESCRIPTION ......................................................................................................... 16 3.1 CONNECTORS ................................................................................................................. 16 3.2 JUMPERS ........................................................................................................................ 17 3.3 BOOTSTRAP FLAG ....................................................................................................... 19 3.4 RECONFIGURING THE GAL............................................................................................... 19 3.5 SERIAL PORT .................................................................................................................. 20 4 SOFTWARE DESCRIPTION.......................................................................................................... 21 4.1 MONITOR FEATURES........................................................................................................ 21 4.2 SETTING THE JUMPERS FOR THE MONITOR ....................................................................... 21 4.3 POWER ON SELF TEST (POST) ....................................................................................... 22 4.4 SERIAL CONSOLE AUTO BAUD.......................................................................................... 22 4.5 VIDEO CONSOLE EMULATION ........................................................................................... 23 4.6 MONITOR DATA ............................................................................................................... 23 4.7 STARTUP OPTIONS .......................................................................................................... 24 4.8 USING THE MONITOR BREAKPOINT FEATURE .................................................................... 24 4.9 CROSS ASSEMBLING AND DOWNLOADING PROGRAMS ....................................................... 25 5 MONITOR COMMAND REFERENCE.............................................................................................. 29 5.1 COMMAND REFERENCE.................................................................................................... 29 5.2 B[OOT]............................................................................................................................ 29 5.3 BAS[IC], ASM, AND FOR[TH]........................................................................................... 29 5.4 CALL <ADDR> AND RUN <ADDR> ................................................................................... 30 5.5 CONT[INUE] ................................................................................................................... 30 5.6 E[XAMINE] <ADDR> AND E[XAMINE] <ADDR> <ADDR> ........................................................ 30 5.7 D[EPOSIT] <ADDR> <DATA> [<DATA> ...]........................................................................... 31 5.8 IN[PUT] <PORT> .............................................................................................................. 31 5.9 OUT[PUT] <PORT> <DATA> ............................................................................................. 31 5.10 SHOW COMMANDS......................................................................................................... 31 5.11 SET COMMANDS ............................................................................................................. 34 5.12 TES [T] COMMANDS ........................................................................................................ 35 5.13 HEL[P]............................................................................................................................ 36 5.14 CLS................................................................................................................................ 36 5.15 LOADING INTEL HEX RECORDS ....................................................................................... 36 5.16 SEDIT............................................................................................................................ 36 6 EDITOR AND ASSEMBLER.......................................................................................................... 39 6.1 EDITOR COMMANDS......................................................................................................... 39 6.2 ASSEMBLER LINE FORMAT: .............................................................................................. 39 6.3 EXAMPLES ...................................................................................................................... 40 7 BASIC..................................................................................................................................... 41 7.1 INTRODUCTION ................................................................................................................ 41 7.2 ENTERING PROGRAMS ..................................................................................................... 41 7.3 EXPRESSIONS ................................................................................................................. 43 7.4 BUILT IN FUNCTIONS ........................................................................................................ 44 Page i CONTENTS 7.5 PROGRAM STATEMENTS .................................................................................................. 46 7.6 ADVANCED TECHNIQUES.................................................................................................. 53 7.7 ERROR CODES ................................................................................................................ 55 8 FORTH ..................................................................................................................................... 57 8.1 STACK REPRESENTATION................................................................................................. 57 8.2 ARITHMETIC OPERATORS................................................................................................. 57 8.3 CONTROL OPERATORS .................................................................................................... 57 8.4 VARIABLES ...................................................................................................................... 57 8.5 FUNCTION DEFINITION ...................................................................................................... 58 8.6 STACK OPERATORS ......................................................................................................... 58 8.7 OTHER FUNCTIONS.......................................................................................................... 58 8.8 EXTENDED FUNCTIONS .................................................................................................... 58 8.9 A BASIC FORTH TUTORIAL ............................................................................................... 59 8.10 DEFINITIONS OF EXTENDED FUNCTIONS............................................................................ 63 9