Monitor Initialization Code
C-43
M68VZ328ADS USER’S MANUAL
MOTOROLA
move.w
#239,LYMAX
move.b
#10,LVPW
move.b
#$08,LPICF
move.b
#$01,LPOLCF
move.b
#$00,LACDRC
move.b
#$02,LPXCD
move.b
#$14,LRRA
move.b
#$00,LPOSR
move.b
#$00,LCKCON
; disable LCDC
move.b
#$80,LCKCON
; enable LCDC, 0ws, 16-bit
;**********************************************************************
;
; Program Interrupt Controller
;
;**********************************************************************
move.b #$40,IVR
move.l #$007FFFFF,IMR
;enable NMI interrupt
;************************************************
;* Check switch
;*
;************************************************
ori.b
#$0F,PDSEL
move.b
#$03,PDDIR
move.b
#$FF,PDPUEN
move.b
PDDATA,D0
andi.b
#$0C,D0
cmp.b
#$0C,D0
;PD3=OFF and PD2=OFF
beq
MW_UART1
cmp.b
#$08,D0
;PD3=OFF and PD2=ON
beq
MW_UART2
cmp.b
#$04,D0
;PD3=ON
and PD2=OFF
beq
SDS_UART1
cmp.b
#$00,D0
;PD3=ON
and PD2=ON
beq
SDS_UART2
SDS_UART2
move.l
#$103403E,LSSA
jmp
$01030020
SDS_UART1
move.l
#$102403E,LSSA
jmp
$01020020
MW_UART2
move.l
#$101403E,LSSA
move.l$01010000, SP; otherwise boot alternate image
move.l$01010004, A0
jmp
(A0)
MW_UART1
move.l
#$100403E,LSSA
skip_all:
clr.l
d0
clr.l
d1
clr.l
d2
clr.l
d3
clr.l
d4
clr.l
d5
clr.l
d6
clr.l
d7
;**********************************************************************
;
; Runtime initialization
;
;**********************************************************************
.extern__start
JMP __start
; jump to MW startup code
C.2 INITIALIZATION CODE OF SDS MONITOR (MONITOR.H)
.option list="off"
****************************************************************************
*
CPU OPTIONS
****************************************************************************
opt
p=68000
Freescale Semiconductor, I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
nc.
..