19
IV.
Machine Language Programming
VIP Machine Coding
For a complete description of machine language
instructions, refer to the User
Manual for the CDP1802
COSMAC Microprocessor MPM201A
. Your
COSMAC VIP computer incorporates the following
special machine-language input and output instructions:
CODE
OPERATION
69
6B
61
62
63
64
Turn display on (Bus -> MX,D)
Input port byte + MX,D (Optional)
Turn display off (MX -> Bus,RX+1)
MX(LSD) -> Hex keyboard latch,
RX+1
MX -> Output port, RX+1 (Optional)
MX -> Bus,RX+l
One 64 instruction is always executed by the
Operating System. It can also be used in expanded
systems if desired. Instructions 65, 66, 67, 6A, 6C, 6D,
6E, and 6F are also available for use in expanded
systems.
The External Flag lines are used as follows:
FLAG
EF1
EF2
EF3
EF4
USE
Generated by the video interface
(CDPI861)
Serial data from cassette player
Hex key pressed signal
Not used in basic system
EF4 can be used for system expansion. EF3 can also
be used in expanded systems if no key will be depressed
at the same time that an external device is using EF3.
EF1 can only be used by an external device when the
display is turned off. EF2 should not be used in
expanded systems.
The latched Q line output performs several functions
in the COSMAC VIP system. When set, it holds the Q
light on and generates a continuous speaker tone. Ile Q
line is also used for serial output data to a cassette
recorder. You can use the Q output line as a control
signal in an expanded system if you avoid conflicts with
its normal functions.
You can store a machine language program starting at
location 0000. It will be executed when you flip the
RUN switch up. Initially P=0, X=0, R0=0000, Q=0, and
R1=0XFF, where 0X= last page of on-card RAM. (0X =
07 in 2048-byte RAM system). The operating system
uses the last 84 bytes of on-card RAM. You should
avoid using these last 84 RAM bytes when writing
machine language programs. With a 2048-byte RAM,
locations 07AC-07FF would be reserved for use by the
operating system. Note that Rl initially contains the
address of the last on-card RAM byte. Your machine
language program can use Rl to determine the amount of
RAM in your system when required.
Putting Machine Coding and
CHIP-8 Language Together
The operating system and the CHIP-8 language
interpreter use a video display format that is 64 bits wide
by 32 bits high. This 256-byte display can easily be
modified by writing your own video refresh interrupt
routine as explained in the CDP1861 data sheet provided
in Appendix G. Display formats up to 64 bits wide by
128 bits high are possible with no hardware
modification. The 4096-bit picture program in Appendix
D uses a machine language refresh interrupt routine that
provides a format 64 bits wide by 64 bits high.
Содержание CDP18S711
Страница 1: ......
Страница 36: ...Appendix C CHIP 8 Interpreter 37 CHIP 8 Operating System Standard Digit Display Format ...
Страница 42: ...68 RCA COSMAC VIP Instruction Manual Fig E 1 Microprocessor and Display Interface Circuits ...
Страница 43: ...Fig E 2 ROM Circuits and Expansion Interface Appendix E Logic Diagrams 69 ...
Страница 45: ...Appendix E Logic Diagram s 71 Fig E 4 RAM Circuits ...
Страница 46: ...Fig E 5 Power Supply Circuit and Byte Input Output Interface 72 RCA COSMAC VIP Instruction Manuel ...
Страница 47: ...Fig E 5 Power Supply Circult and Byte Input Output Interface 72 RCA COSMAC VIP Instruction Manual ...
Страница 49: ...74 RCA COSMAC VIP Instruction Manual ...
Страница 50: ......
Страница 52: ......
Страница 54: ......