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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.6/] [tools/] [asm-11/] [tests/] [test_0180_pst.mac] - Blame information for rev 40

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

Line No. Rev Author Line
1 19 wfjm
; $Id: test_0180_pst.mac 502 2013-04-02 19:29:30Z mueller $
2
;
3
; test interaction pst <-> lst
4
;
5
        .asect
6
        .blkw   400
7
 
8
; defined constants based on opcodes
9
 
10
        c1 = inc                ;;!! 005200
11
        c2 = inc + 67           ;;!! 005267
12
 
13
; use opcode values as constants
14
 
15
        mov     #mov,r1         ;;!! 012701 010000
16
        mov     #inc,r2         ;;!! 012702 005200
17
 
18
; combine opcodes, especially cc ops
19
; uses implicit .word mechanism, and that pst symbols can be used as constants
20
 
21
        sec                     ;;!! 000261
22
        sev                     ;;!! 000262
23
        sez                     ;;!! 000264
24
        sen                     ;;!! 000270
25
 
26
                       ;;!! 000263
27
                   ;;!! 000267
28
               ;;!! 000277
29
 
30
; Note: sec!sev without <> will not work, the first sec will trigger operand
31
;       parsing, and since sec doesn't have operands, flag an error
32
 
33
; using self-defined compound opcodes
34
 
35
        scv = sec ! sev         ;;!! 000263
36
        scv                     ;;!! 000263
37
 
38
; not check pst - lst interference
39
; opcodes are always looked-up from pst
40
; symbols are looked-up first in lst, than in pst
41
 
42
; opcode name defined as const
43
        cmp = 1234              ;;!! 001234
44
 
45
; instruction usage is unaltered, but usage as constant is redefined
46
 
47
        cmp     r0,r0           ;;!! 020000
48
        mov     #cmp,r0         ;;!! 012700 001234
49
        mov     #cmp+77,r0      ;;!! 012700 001333
50
 
51
; and label with an opcode name, same concept
52
 
53
        clr     r0              ;;!! 005000
54
        clr     @#mov           ;;!! 005037 010000
55
        clr     @#cmp           ;;!! 005037 001234
56
        clr     @#clr           ;;!! 005037 001060
57
clr:    clr     @#mov           ;;!! 001060: 005037 010000
58
        clr     @#cmp           ;;!! 005037 001234
59
        clr     @#clr           ;;!! 005037 001060
60
 
61
        .end

powered by: WebSVN 2.1.0

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