Specifications

11
In the DMA I/O test routine, the channel is initialized by clearing the status register and loading the byte transfer value
in the byte counter register. The channel is then started, and DMA takes place when the DREQN1 pin of MC68340
goes low. DMA read takes place first where values are written to the FIFOs. DMA write takes place later where values
are read back from the FIFOs.
MC340BUG Library
A Library is also included with the software package. The MC340BUG library provides basic I/O functions that use
the M340BUG debug system calls. System calls use Trap #15 for I/O functions. Therefore Trap #15 is not available
for user programs. The library was created using Microtec’s Librarian. This library package is only useful if you are
developing programs using Microtec Research Software Development Tools.
Description of Library Functions
ERASLN()
NEWLN()
getchar()
putchar()
Purpose Erase the line at the present cursor position
Parameters NONE
Return Type void
Example ERASLN();
Purpose Skip a line
Parameters NONE
Return Type void
Example NEWLN();
Purpose Read a character from the input port
Parameters NONE
Return Type char
Example c = getchar();
Purpose Write a character to the output port
Parameters character to be written
Return Type void
Example putchar('a'); putchar(chr) where chr = 'z';










