\ job.fs -- LCD Driver for C8051F300  -- 27Feb09 rjn

true  constant tethered
false constant turnkeyed

\ -----[ configure for 300 processor ]
	$200  constant start        \ Reset vector.  Bootloader at $0000.
	$20B  constant TIM0         \ timer 0 interrupt
	$20D  constant rom-start    \ Start of code, T0 interrupt reserved
	$2000 constant target-size  \ 8K flash
\
\ -----[ load MyForth system ]
include source/common/loader.fs
\ 
\ -----[ define SFRs, generate bootloader image ]
include chip/sfr300.fs
include chip/bootloader300.fs
\ 
rom-start org
\ 
\ -----[ Choose an interpreter ]
tethered [if] include AMR/tether.fs
       [else] include myforth/standalone.fs [then]
\ 
\ -----[ load the application ] 
include myforth/debug.fs	\ Comes before application, useful tools.
include lcd.fs		\ lcd driver
include common/interactive.fs  \ Should come _after_ application for efficiency.
\ 
\ -----[ patch the reset vector ]
turnkeyed [if]	\ Turnkeyed with go.
	start interrupt : cold stacks go ;
[else]	        \ Testing with quit.
	start interrupt : cold stacks quit ;
[then]
\ 
\ -----[ select tethered or standalone ]
true [if] ( tethered)  \ For interactive testing, entering numbers.
	:m # number emit-s m;
	:m ## [ dup 8 rshift $ff and swap $ff and ] # # m;
[else] ( standalone)  
        headers ] here [ dict org heads ##p! org ] [then]
\ 
\ -----[ report build statistics ]
report
save
[ .( Host stack= ) .s cr
