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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.6/] [tools/] [asm-11/] [tests/] [test_0110_op_gg.mac] - Rev 40

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

; $Id: test_0110_op_gg.mac 501 2013-03-30 13:53:39Z mueller $
;
; test opcodes with two general operands
;
        .asect
        .blkw   400 

a:      .word   0               ;;!! 001000: 000000
b:      .word   0               ;;!! 001002: 000000
pa:     .word   a               ;;!! 001004: 001000
pb:     .word   b               ;;!! 001006: 001002

        const = 400

; all src modes to reg dst
p1:
        add     r1,r0           ;;!! 060100
        add     @r2,r0          ;;!! 061200
        add     (r3),r0         ;;!! 061300
        add     (r4)+,r0        ;;!! 062400
        add     @(r5)+,r0       ;;!! 063500
        add     -(r1),r0        ;;!! 064100
        add     @-(r2),r0       ;;!! 065200
        add     1234(r3),r0     ;;!! 066300 001234
        add     @1234(r4),r0    ;;!! 067400 001234
        add     a,r0            ;;!! 066700 177736
        add     @pa,r0          ;;!! 067700 177736
        add     @#a,r0          ;;!! 063700 001000
        add     #const,r0       ;;!! 062700 000400

; all reg src to all dst modes
p2:
        add     r0,r1           ;;!! 060001
        add     r0,@r2          ;;!! 060012
        add     r0,(r3)         ;;!! 060013
        add     r0,(r4)+        ;;!! 060024
        add     r0,@(r5)+       ;;!! 060035
        add     r0,-(r1)        ;;!! 060041
        add     r0,@-(r2)       ;;!! 060052
        add     r0,1234(r3)     ;;!! 060063 001234
        add     r0,@1234(r4)    ;;!! 060074 001234
        add     r0,a            ;;!! 060067 177670
        add     r0,@pa          ;;!! 060077 177670
        add     r0,@#a          ;;!! 060037 001000

; pc relative addressing

c:      .word   0               ;;!! 001120: 000000
d:      .word   0               ;;!! 001122: 000000
        add     c,d             ;;!! 001124: 066767 177770 177770
        add     f,e             ;;!! 001132: 066767 000004 000000
e:      .word   0               ;;!! 001140: 000000
f:      .word   0               ;;!! 001142: 000000

; some mixed cases
p3:
        add     r1,@r2          ;;!! 060112
        add     (r3),(r4)+      ;;!! 061324
        add     @(r5)+,-(r1)    ;;!! 063541
        add     @-(r2),1234(r3) ;;!! 065263 001234
        add     @1234(r4),a     ;;!! 067467 001234 177614
        add     @pa,@#a         ;;!! 067737 177614 001000
        add     #1000,b         ;;!! 062767 001000 177602

; all 'gg' type opcodes, random modes
p4:
        mov     @r2,(r3)        ;;!! 011213
        cmp     (r4)+,@(r5)+    ;;!! 022435
        bit     -(r1),@-(r2)    ;;!! 034152
        bic     1234(r3),@1234(r4) ;;!! 046374 001234 001234
        bis     a,@pa           ;;!! 056777 177560 177562
        movb    @#a,(r3)        ;;!! 113713 001000
        cmpb    @(r5)+,@-(r2)   ;;!! 123552
        bitb    @1234(r4),@pa   ;;!! 137477 001234 177546
        bicb    -(r1),1234(r3)  ;;!! 144163 001234
        bisb    a,@#b           ;;!! 156737 177532 001002
        
        .end

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

powered by: WebSVN 2.1.0

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