B-14
K
A
DAK
AMX 68000 Target Guide
cjcfout8 cjcfout8cjcfout16 cjcfout16cjcfout32 cjcfout32
Purpose Write to an 8, 16 or 32-Bit Output Port
Used by n Task n ISP n Timer Procedure n Restart Procedure n Exit Procedure
Setup Prototype in file
CJZZZTF.H or macro in file
CJZZZCC.H.
#include "CJZZZ.H"
void CJ_CCPP cjcfout8(void *port, CJ_T32 data);
void CJ_CCPP cjcfout16(void *port, CJ_T32 data);
void CJ_CCPP cjcfout32(void *port, CJ_T32 data);
Description port is the address of an 8, 16 or 32-bit memory-mapped device output
port.
data is the 8, 16 or 32-bit value to be output to the port.
Interrupts o Disabled o Enabled o Restored
Returns Nothing
Cjcfout8 outputs the least significant 8 bits of data to the port.
Cjcfout16 outputs the least significant 16 bits of data to the port.
Cjcfout32 outputs the full 32 bits of data to the port.
Example #include "CJZZZ.H"
/* Console status register */
#define CONSTAT ((CJ_T8 *)0xFFFA002DL)
/* Console data register */
#define CONDATA ((CJ_T8 *)0xFFFA002FL)
void CJ_CCPP conout(char ch) {
/* Wait for ready */
while ( (cjcfin8(CONSTAT) & 0x80) == 0 )
;
/* Write character */
cjcfout8(CONDATA, (CJ_T32)ch);
}
See Also cjcfin8, cjcfin16, cjcfin32