OpenCores
URL https://opencores.org/ocsvn/6809_6309_compatible_core/6809_6309_compatible_core/trunk

Subversion Repositories 6809_6309_compatible_core

[/] [6809_6309_compatible_core/] [trunk/] [sim/] [instructions_test.asm] - Blame information for rev 5

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

Line No. Rev Author Line
1 4 ale500
 
2
; simple instruction excerciser
3 5 ale500
 
4
                ldd     #$AABB
5
                ldx     #$1234
6
                ldy     #$5678
7
                tfr     x,u     ; 16 bit transfer
8
                tfr     a,u     ; high to high
9
                tfr     b,u
10
                tfr     x,a     ; gets high byte
11
                tfr     x,b     ; gets low byte
12
 
13
 
14 4 ale500
                lda     #$02
15
                ldb     #$00
16
                sta     $0
17
                stb     $1
18
                ldx     $0      ; load saved value
19
                ldy     #$0
20
                cmpx    ,y      ; compare
21
                beq     test_push_pull
22
 
23
error:          bra     error
24
 
25
test_push_pull: lds     #$00ff
26
                pshs    a,b
27
                puls    x
28
                cmpx    ,y      ; compare again
29
                bne     error
30
 
31
                bsr     test_bsr
32
                bne     error   ; push/pull with sub don't work
33
                lbsr    test_lea
34
                bne     error
35
ok:             bra     ok
36
 
37
test_bsr:       pshs    y
38
                puls    y
39
                cmpx    0,y
40
                rts
41
 
42
test_lea:       leau    1,y
43
                leay    0,y
44
                rts

powered by: WebSVN 2.1.0

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