OpenCores
URL https://opencores.org/ocsvn/eco32/eco32/trunk

Subversion Repositories eco32

[/] [eco32/] [trunk/] [monitor/] [monitor/] [boards/] [s3e-500/] [start.s] - Diff between revs 184 and 185

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 184 Rev 185
Line 1... Line 1...
;
;
; start.s -- ECO32 ROM monitor startup and support routines
; start.s -- ECO32 ROM monitor startup and support routines
;
;
 
 
 
        .set    CIO_CTL,0x00            ; set console to keyboard/display
 
;       .set    CIO_CTL,0x03            ; set console to serial line 0
 
 
        .set    dmapaddr,0xC0000000     ; base of directly mapped addresses
        .set    dmapaddr,0xC0000000     ; base of directly mapped addresses
        .set    stacktop,0xC0010000     ; monitor stack is at top of 64K
        .set    stacktop,0xC0010000     ; monitor stack is at top of 64K
 
 
        .set    PSW,0                    ; reg # of PSW
        .set    PSW,0                    ; reg # of PSW
        .set    V_SHIFT,27              ; interrupt vector ctrl bit
        .set    V_SHIFT,27              ; interrupt vector ctrl bit
Line 25... Line 28...
 
 
        .import _ecode
        .import _ecode
        .import _edata
        .import _edata
        .import _ebss
        .import _ebss
 
 
        .import dspinit
 
        .import dspoutchk
 
        .import dspout
 
 
 
        .import kbdinit
        .import kbdinit
        .import kbdinchk
        .import kbdinchk
        .import kbdin
        .import kbdin
 
 
 
        .import dspinit
 
        .import dspoutchk
 
        .import dspout
 
 
        .import ser0init
        .import ser0init
        .import ser0inchk
        .import ser0inchk
        .import ser0in
        .import ser0in
        .import ser0outchk
        .import ser0outchk
        .import ser0out
        .import ser0out
Line 59... Line 62...
 
 
        .export _bcode
        .export _bcode
        .export _bdata
        .export _bdata
        .export _bbss
        .export _bbss
 
 
 
        .export setcon
        .export cinchk
        .export cinchk
        .export cin
        .export cin
        .export coutchk
        .export coutchk
        .export cout
        .export cout
        .export sinchk
 
        .export sin
 
        .export soutchk
 
        .export sout
 
        .export dskcap
        .export dskcap
        .export dskio
        .export dskio
 
 
        .export getTLB_HI
        .export getTLB_HI
        .export getTLB_LO
        .export getTLB_LO
Line 96... Line 96...
;***************************************************************
;***************************************************************
 
 
        .code
        .code
        .align  4
        .align  4
 
 
reset:
startup:
        j       start
        j       start
 
 
interrupt:
interrupt:
        j       isr
        j       isr
 
 
Line 110... Line 110...
;***************************************************************
;***************************************************************
 
 
        .code
        .code
        .align  4
        .align  4
 
 
 
setcon:
 
        j       setcio
 
 
cinchk:
cinchk:
        j       kbdinchk
        j       cichk
;       j       ser0inchk
 
 
 
cin:
cin:
        j       kbdin
        j       ci
;       j       ser0in
 
 
 
coutchk:
coutchk:
        j       dspoutchk
        j       cochk
;       j       ser0outchk
 
 
 
cout:
cout:
        j       dspout
        j       co
;       j       ser0out
 
 
 
sinchk:
 
        j       ser0inchk
 
 
 
sin:
 
        j       ser0in
 
 
 
soutchk:
 
        j       ser0outchk
 
 
 
sout:
 
        j       ser0out
 
 
 
dskcap:
dskcap:
        j       dcap
        j       dcap
 
 
dskio:
dskio:
        j       dio
        j       dio
 
 
reserved1:
reserved10:
        j       reserved1
        j       reserved10
 
 
 
reserved11:
 
        j       reserved11
 
 
 
reserved12:
 
        j       reserved12
 
 
 
reserved13:
 
        j       reserved13
 
 
reserved2:
reserved14:
        j       reserved2
        j       reserved14
 
 
reserved3:
reserved15:
        j       reserved3
        j       reserved15
 
 
;***************************************************************
;***************************************************************
 
 
        .code
        .code
        .align  4
        .align  4
Line 204... Line 200...
        stw     $0,$8,0                   ; dst addr in $8
        stw     $0,$8,0                   ; dst addr in $8
        add     $8,$8,4                 ; upward
        add     $8,$8,4                 ; upward
clrtest:
clrtest:
        bltu    $8,$9,clrloop
        bltu    $8,$9,clrloop
 
 
        ; now do some useful work
        ; initialize I/O
        add     $29,$0,stacktop          ; setup monitor stack
        add     $29,$0,stacktop          ; setup monitor stack
        jal     dspinit                 ; init display
 
        jal     kbdinit                 ; init keyboard
        jal     kbdinit                 ; init keyboard
 
        jal     dspinit                 ; init display
        jal     ser0init                ; init serial line 0
        jal     ser0init                ; init serial line 0
        jal     ser1init                ; init serial line 1
        jal     ser1init                ; init serial line 1
        jal     dskinitctl              ; init disk (controller)
        jal     dskinitctl              ; init disk (controller)
        jal     dskinitser              ; init disk (serial line)
        jal     dskinitser              ; init disk (serial line)
 
        add     $4,$0,CIO_CTL            ; set console
 
        jal     setcio
 
 
 
        ; call main
        jal     main                    ; enter command loop
        jal     main                    ; enter command loop
 
 
        ; main should never return
        ; main should never return
        j       start                   ; just to be sure...
        j       start                   ; just to be sure...
 
 
Line 246... Line 246...
        tbwi
        tbwi
        jr      $31
        jr      $31
 
 
;***************************************************************
;***************************************************************
 
 
 
        .data
 
        .align  4
 
 
 
cioctl:
 
        .byte   0
 
 
 
        .code
 
        .align  4
 
 
 
        ; void setcon(Byte ctl)
 
setcio:
 
        stb     $4,$0,cioctl
 
        j       $31
 
 
 
        ; int cinchk(void)
 
cichk:
 
        ldbu    $8,$0,cioctl
 
        and     $8,$8,0x01
 
        bne     $8,$0,cichk1
 
        j       kbdinchk
 
cichk1:
 
        j       ser0inchk
 
 
 
        ; char cin(void)
 
ci:
 
        ldbu    $8,$0,cioctl
 
        and     $8,$8,0x01
 
        bne     $8,$0,ci1
 
        j       kbdin
 
ci1:
 
        j       ser0in
 
 
 
        ; int coutchk(void)
 
cochk:
 
        ldbu    $8,$0,cioctl
 
        and     $8,$8,0x02
 
        bne     $8,$0,cochk1
 
        j       dspoutchk
 
cochk1:
 
        j       ser0outchk
 
 
 
        ; void cout(char c)
 
co:
 
        ldbu    $8,$0,cioctl
 
        and     $8,$8,0x02
 
        bne     $8,$0,co1
 
        j       dspout
 
co1:
 
        j       ser0out
 
 
 
;***************************************************************
 
 
        .code
        .code
        .align  4
        .align  4
 
 
        ; int dskcap(int dskno)
        ; int dskcap(int dskno)
dcap:
dcap:

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.