Simple Hello World for 68HC11 bootstrap mode
This 68HC11 bootstrap program acts as a simple server for uploading a program in external memory. It supports only two commands:Implementation Notes:
Source file: hello.c
- This program must not be linked with a startup file. It implements the startup entry point.
- The
_startfunction must be at beginning of this file. By doing so, it will be mapped at address 0 by the linker and we avoid to have some jump to call it (since the boot will jump there).- It must be compiled with -mshort -Os -fomit-frame-pointer to make sure it fits in less than 240 bytes (keep a few bytes at end for the stack).
- It must be compiled with -msoft-reg-count=0 or =1 to reduce the use of soft-registers (since they are mapped in RAM in .page0).
- The soft registers must be located at beginning of the .page0. This will clobber the beginning of the
_startfunction. We don't care because this clobbers some initialisation part.
Copyright (C) 1999, 2000, 2001, 2002, 2003 Stéphane Carrez, France
Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.