Code Generation
Application
-C08|-CS08|-CRS08
None
-C08
The Assembler supports three different HC08-derived cores. The HC08 itself ( -C08), the enhanced HCS08 (-CS08), and the RS08 ( -CRS08).
The HCS08 family supports additional addressing modes for the CPHX, LDHX, and STHX instructions and also a new BGND instruction. All these enhancements are allowed when the -CS08 option is specified. All instructions and addressing modes available for the HC08 are also available for the HCS08 so that this core remains binary compatible with its predecessor.
The RS08 family does not support all instructions and addressing modes of the HC08. Also, the encoding of the supported instructions is not binary compatible.
| Instruction | Addr. mode | Description |
|---|---|---|
| LDHX | EXT IX IX1 IX2 SP1 | load from a 16-bit absolute address load HX via 0,X load HX via 1,X...255,X load HX via old HX+ any offset load HX from stack |
| STHX | EXT SP1 | store HX to a 16-bit absolute address store HX to stack |
| CPHX | EXT SP1 | compare HX with a 16-bit address compare HX with the stack |
| BGND | enter the Background Debug Mode |