AN2616 Freescale Semiconductor / Motorola, AN2616 Datasheet - Page 57

no-image

AN2616

Manufacturer Part Number
AN2616
Description
Getting Started with HCS08 and CodeWarrior Using C
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Is Linux/Unix
support available?
MOTOROLA
Clear the error count, and set the word so that the upper and lower bytes are
unique:
Check using pointers to access the individual bytes of the word in the correct
order:
Check that, using union/structure, access to the individual bytes of the word is
correct:
The results should be 0.
Cosmic supports Linux, Solaris and HP/UX as well as supporting Windows:
Linux
SUN Solaris
SUN Solaris
HP-UX
HP-UX
Getting Started with HCS08 and CodeWarrior Using C
err=0;
t.w = 0x55aa;
p=(byte *)&t.w;
if(t.bytes.h!=*p)err|=1;
p++;
if(t.bytes.l!=*p)err|=2;
if(t.bytes.h!=0x55)err|=4;
if(t.bytes.l!=0xaa)err|=8;
Freescale Semiconductor, Inc.
Platform
For More Information On This Product,
Go to: www.freescale.com
CLXH08
CSSH08
ZSSH08SIM
CHPH08
ZHPH08SIM
//clear error count
//set word so high byte and low byte are different
Part No
//set pointer to address of word
//should be pointing to the high byte
//increment pointer to next byte
//should be pointing to the low byte
//check high byte accessed as structure
//check low byte accessed as structure
C Cross Compiler, Assembler, Linker and IDEA
package targeting Motorola’s 68HC08
microcontroller
C Cross Compiler, Assembler, Linker and IDEA
package targeting Motorola’s 68HC08
microcontroller
ZAP Debugger Simulator for 68HC08
C Cross Compiler, Assembler, Linker and IDEA
package targeting Motorola’s 68HC08
microcontroller
ZAP Debugger Simulator for 68HC08
Description
Frequently Asked Questions
AN2616
57

Related parts for AN2616