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

Subversion Repositories rf6809

[/] [rf6809/] [trunk/] [software/] [boot/] [dramtest.asm] - Blame information for rev 21

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 16 robfinch
; ============================================================================
2
;        __
3
;   \\__/ o\    (C) 2013-2022  Robert Finch, Waterloo
4
;    \  __ /    All rights reserved.
5
;     \/_//     robfinch@opencores.org
6
;       ||
7
;
8
;
9
; BSD 3-Clause License
10
; Redistribution and use in source and binary forms, with or without
11
; modification, are permitted provided that the following conditions are met:
12
;
13
; 1. Redistributions of source code must retain the above copyright notice, this
14
;    list of conditions and the following disclaimer.
15
;
16
; 2. Redistributions in binary form must reproduce the above copyright notice,
17
;    this list of conditions and the following disclaimer in the documentation
18
;    and/or other materials provided with the distribution.
19
;
20
; 3. Neither the name of the copyright holder nor the names of its
21
;    contributors may be used to endorse or promote products derived from
22
;    this software without specific prior written permission.
23
;
24
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25
; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26
; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27
; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
28
; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29
; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
30
; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31
; CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
32
; OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
;
35
; ============================================================================
36
;
37
OPT include "d:\cores2022\rf6809\software\boot\mon_equates.asm"
38
OPT include "d:\cores2022\rf6809\software\boot\io_equates.asm"
39
 
40
        org             $FFD400
41
 
42
; Local RAM test routine
43
; Checkerboard testing.
44
; There is 70kB of local RAM
45
; Does not use any RAM including no stack
46
 
47
dramtest:
48
        ldy             #$10000                 ; DRAM starts here
49
        lda             #1
50
        sta             LEDS
51
        ldu             #$AAA555
52
        swi
53
        fcb             MF_CRLF
54
dramtest1:
55
        deca
56
        bne             dramtest4
57
        tfr             y,d
58
        swi
59
        fcb             MF_DisplayWordAsHex
60
        ldb             #CR
61
        swi
62
        fcb             MF_OUTCH
63
dramtest4:
64
        stu             ,y++
65
        cmpy    #$E00000                ; DRAM ends here
66
        blo             dramtest1
67
        ; now readback values and compare
68
        ldy             #$10000
69
        lda             #1
70
        swi
71
        fcb             MF_CRLF
72
dramtest3:
73
        deca
74
        bne             dramtest5
75
        tfr             y,d
76
        swi
77
        fcb             MF_DisplayWordAsHex
78
        ldb             #CR
79
        swi
80
        fcb             MF_OUTCH
81
dramtest5:
82
        cmpu    ,y++
83
        bne             dramerr
84
        cmpy    #$E00000
85
        blo             dramtest3
86
        lda             #2
87
        sta             LEDS
88
        swi
89
        fcb             MF_Monitor
90
dramerr:
91
        lda             #$80
92
        sta             LEDS
93
        ldx             #TEXTSCR
94
        ldb             COREID
95
        abx
96
        lda             #'F'
97
        sta             ,x
98
        swi
99
        fcb             MF_Monitor

powered by: WebSVN 2.1.0

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