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

Subversion Repositories w11

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /w11/tags/w11a_V0.6/tools/asm-11/tests
    from Rev 22 to Rev 24
    Reverse comparison

Rev 22 → Rev 24

/test_0040_asci.mac
0,0 → 1,26
; $Id: test_0040_asci.mac 548 2014-01-12 09:48:47Z mueller $
;
; test .ascii/.asciz
;
CR = 015
LF = 012
;
.asect
.blkw 400
.ascii /foobar/ ;;!! 001000:
.asciz /fooba/ ;;!! 001006:
 
a0: .ascii /test/ ;;!! 001014:
a1: .asciz /test1/ ;;!! 001020:
 
a2: .ascii <CR><LF>/test/ ;;!! 001026:
a3: .asciz /test/<CR><LF> ;;!! 001034:
 
a4: .asciz <CR><LF>/retro/<CR><LF>|computing|
a5: .ascii /Hello World!/
a6: .asciz *Hello World!*<CR><LF>
a7: .asciz <040><041><042>
 
.even
.end
/Makefile
0,0 → 1,42
# $Id: Makefile 525 2013-07-06 12:19:39Z mueller $
#
# Revision History:
# Date Rev Version Comment
# 2013-03-22 496 1.0 Initial version
#---
#
MAC_all = $(wildcard *.mac)
LDA_all = $(MAC_all:.mac=.lda)
COF_all = $(MAC_all:.mac=.cof)
LST_all = $(MAC_all:.mac=.lst)
LDART_all = $(MAC_all:.mac=.ldart)
LSTRT_all = $(MAC_all:.mac=.lstrt)
#
include $(RETROBASE)/tools/make/generic_asm11.mk
#
.PHONY : def alllda allcof alllst allrt allexp clean cleanrt
#
def : alllda
#
alllda : $(LDA_all)
#
allcof : $(COF_all)
#
alllst : $(LST_all)
#
allrt : $(LSTRT_all)
#
allexp : $(LST_all)
@ asm-11_expect $^
#
clean :
@ rm -f $(LDA_all)
@ echo "Object files removed"
@ rm -f $(COF_all)
@ echo "Compound files removed"
@ rm -f $(LST_all)
@ echo "Listing files removed"
 
cleanrt :
@ rm -f $(LDART_all) $(LSTRT_all)
@ echo "RT-11 generated files removed"
/test_0100_op_g.mac
0,0 → 1,71
; $Id: test_0100_op_g.mac 501 2013-03-30 13:53:39Z mueller $
;
; test opcodes with one general operand
;
.asect
.blkw 400
;
a: .word 0 ;;!! 001000: 000000
pa: .word a ;;!! 001002: 001000
 
; all modes with one opcode
p1:
inc r1 ;;!! 005201
inc @r2 ;;!! 005212
inc (r3) ;;!! 005213
inc (r4)+ ;;!! 005224
inc @(r5)+ ;;!! 005235
inc -(r1) ;;!! 005241
inc @-(r2) ;;!! 005252
inc 1234(r3) ;;!! 005263 001234
inc @1234(r4) ;;!! 005274 001234
inc a ;;!! 005267 177742
inc @pa ;;!! 005277 177740
inc @#a ;;!! 005237 001000
 
; pc relative addressing
 
b: .word 0
inc b
inc c
c: .word 0
 
; all 'g' type opcodes, random modes
p2:
jmp @r2 ;;!! 000112
swab (r3) ;;!! 000313
clr (r4)+ ;;!! 005024
com @(r5)+ ;;!! 005135
dec -(r1) ;;!! 005341
neg @-(r2) ;;!! 005452
adc 1234(r3) ;;!! 005563 001234
sbc @1234(r4) ;;!! 005674 001234
tst a ;;!! 005767 177666
ror @pa ;;!! 006077 177664
rol @#a ;;!! 006137 001000
asr @r2 ;;!! 006212
asl (r3) ;;!! 006313
mfpi (r4)+ ;;!! 006524
mtpi @(r5)+ ;;!! 006635
sxt -(r1) ;;!! 006741
; csm @-(r2) ;;!!
; tstset 1234(r3) ;;!!
; wrtlck @1234(r4) ;;!!
clrb a ;;!! 105067 177640
comb @pa ;;!! 105177 177636
incb @#a ;;!! 105237 001000
decb @r2 ;;!! 105312
negb (r3) ;;!! 105413
adcb (r4)+ ;;!! 105524
sbcb @(r5)+ ;;!! 105635
tstb -(r1) ;;!! 105741
rorb @-(r2) ;;!! 106052
rolb 1234(r3) ;;!! 106163 001234
asrb @1234(r4) ;;!! 106274 001234
aslb a ;;!! 106367 177600
mtps @pa ;;!! 106477 177576
mfpd @#a ;;!! 106537 001000
mtpd @r2 ;;!! 106612
mfps (r3) ;;!! 106713
 
.end
/test_0050_iword.mac
0,0 → 1,27
; $Id: test_0050_iword.mac 502 2013-04-02 19:29:30Z mueller $
;
; test implicit .word
; when a statement does not start with pst symbol (opcode or directive)
; assume an implicit .word
;
.asect
.blkw 400
100 ;;!! 000100
200 ;;!! 000200
110,120 ;;!! 000110 000120
100, ;;!! 000100 000000
,200 ;;!! 000000 000200
, ;;!! 000000 000000
 
w1: 1000 ;;!! 001000
w2: 2000,2001,2002 ;;!! 002000 002001 002002
 
const = 10 ;;!! 000010
const ;;!! 000010
<const> ;;!! 000010
2*const ;;!! 000020
<3*const> ;;!! 000030
 
.even
.end
/test_0010_alloc.mac
0,0 → 1,48
; $Id: test_0010_alloc.mac 501 2013-03-30 13:53:39Z mueller $
;
; test basic label and allocation constructs
; .blkb
; .blkw
; .word
; .byte
; .even
; .odd
; normal and local labels
;
; .blkb and .blkw
;
 
.asect
 
zero: ;;!! 000000:
.blkb 1000
stkbot: .blkw 400 ;;!! 001000:
 
; .word and .byte
w0: .word 101 ;;!! 002000: 000101
w1: .word 102 ;;!! 002002: 000102
b0: .byte 1 ;;!! 002004: 001
b1: .byte 2 ;;!! 002005: 002
 
; .odd and .even
 
.odd
.byte 3 ;;!! 002007: 003
.byte 4 ;;!! 002010: 004
.even
.word 103 ;;!! 002012: 000103
 
; normal and local labels (only backward refs)
blk0: .word 0 ;;!! 002014: 000000
1$: .word blk0 ;;!! 002016: 002014
2$: .word 1$
3$: .word 2$
;
blk1: .word 0
1$: .word blk1
2$: .word 1$
3$: .word 2$
 
.end ;;!! 000001
/test_0110_op_gg.mac
0,0 → 1,78
; $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
/test_0030_alloc.mac
0,0 → 1,47
; $Id: test_0030_alloc.mac 501 2013-03-30 13:53:39Z mueller $
;
; test .word/.byte with expressions ect
;
.asect
.blkw 400
w0: .word 101 ;;!! 001000: 000101
w1: .word 102 ;;!! 001002: 000102
b0: .byte 1 ;;!! 001004: 001
b1: .byte 2 ;;!! 001005: 002
 
; .word/.byte with expressions
 
.word 100+77 ;;!! 000177
.byte 2+<4*10> ;;!! 042
.byte ^c0 ;;!! 377
 
.byte 'H,'e,'l,'l
.byte 'o,' ,'W,'o
.byte 'r,'l,'d,'!,0
.even
.word "He,"ll,"o
.word "Wo,"rl,"d!,0
 
.word w1-w0 ;;!! 000002
.byte <w1-w0>/2 ;;!! 001
.byte b1-b0 ;;!! 001
 
w2: .word . ;;!! 001052: 001052
.word w0+2 ;;!! 001002
.word w1-2 ;;!! 001000
 
; .word/.byte with empty ','
 
.word 1,2 ;;!! 000001 000002
.word w0,w1 ;;!! 001000 001002
.word w0, ;;!! 001000 000000
.word w0,, ;;!! 001000 000000 000000
.word ,w0 ;;!! 000000 001000
.word ,,w0 ;;!! 000000 000000 001000
.word ,w0, ;;!! 000000 001000 000000
.word , ;;!! 000000 000000
.word ,, ;;!! 000000 000000 000000
.word w0,,w1 ;;!! 001000 000000 001002
 
.end
/test_0130_op_n.mac
0,0 → 1,36
; $Id: test_0130_op_n.mac 501 2013-03-30 13:53:39Z mueller $
;
; test opcodes with no or numeric operands
;
.asect
.blkw 400
 
; no operands
p1:
halt ;;!! 000000
wait ;;!! 000001
rti ;;!! 000002
bpt ;;!! 000003
iot ;;!! 000004
reset ;;!! 000005
rtt ;;!! 000006
mfpt ;;!! 000007
nop ;;!! 000240
clc ;;!! 000241
clv ;;!! 000242
clz ;;!! 000244
cln ;;!! 000250
sec ;;!! 000261
sev ;;!! 000262
sez ;;!! 000264
sen ;;!! 000270
scc ;;!! 000277
; numeric operands
p2:
spl 5 ;;!! 000235
mark 13 ;;!! 006413
emt 170 ;;!! 104170
trap 77 ;;!! 104477
 
.end
/test_0140_op_o.mac
0,0 → 1,34
; $Id: test_0140_op_o.mac 501 2013-03-30 13:53:39Z mueller $
;
; test opcodes offset operands
;
.asect
.blkw 400
 
; branch
 
start: br start
bne start
beq start
bge 2$
blt 2$
bgt 2$
1$: ble 2$
 
2$: bpl 1$
bmi 1$
bhi 1$
blos 1$
bvc 1$
bvs 1$
bcc 1$
bhis 3$
bcs 3$
3$: blo 3$
 
; sob
 
loop: sob r1,loop
sob r2,loop
 
.end
/test_0200_fpp_1op.mac
0,0 → 1,36
; $Id: test_0200_fpp_1op.mac 501 2013-03-30 13:53:39Z mueller $
;
; test fpp opcodes with 0 or 1 operands
;
.asect
.blkw 400
 
a: .word 0,0
.word 0,0
pa: .word a
s: .word 0,0
ps: .word s
 
; 0 operand opcodes
 
cfcc ;;!! 170000
setf ;;!! 170001
setd ;;!! 170011
seti ;;!! 170002
setl ;;!! 170012
 
; 1 operand opcodes
 
ldfps s ;;!! 170167 177754
stfps @#s ;;!! 170237 001012
stst @ps ;;!! 170377 177750
clrf r0 ;;!! 170400
clrd @r1 ;;!! 170411
tstf (r2)+ ;;!! 170522
tstd @(r3)+ ;;!! 170533
absf -(r4) ;;!! 170644
absd @-(r5) ;;!! 170655
negf a(r1) ;;!! 170761 001000
negd @pa(r2) ;;!! 170772 001010
 
.end
/test_0210_fpp_2op.mac
0,0 → 1,51
; $Id: test_0210_fpp_2op.mac 503 2013-04-06 19:44:13Z mueller $
;
; test fpp opcodes with 2 operands
;
.asect
.blkw 400
 
a: .word 0,0
.word 0,0
pa: .word a
s: .word 0,0
ps: .word s
 
; 2 operand 'gr' opcodes
 
mulf a,r0 ;;!! 171067 177754
muld r5,r1 ;;!! 171105
modf @r1,r2 ;;!! 171611
modd (r2)+,r3 ;;!! 171722
addf @(r3)+,r0 ;;!! 172033
addd -(r4),r1 ;;!! 172144
ldf @-(r5),r2 ;;!! 172655
ldd a,r3 ;;!! 172767 177734
subf @pa,r0 ;;!! 173077 177740
subd 0(r1),r1 ;;!! 173161 000000
cmpf @6(r4),r2 ;;!! 173674 000006
cmpd r1,r3 ;;!! 173701
divf @pa,r0 ;;!! 174477 177722
divd r5,r1 ;;!! 174505
 
ldexp @r1,r0 ;;!! 176411
ldcif (r2)+,r1 ;;!! 177122
ldcid @(r2)+,r2 ;;!! 177232
ldclf -(r3),r3 ;;!! 177343
ldcld @-(r4),r0 ;;!! 177054
ldcdf a,r1 ;;!! 177567 177672
ldcfd @pa,r2 ;;!! 177677 177676
 
; 2 operand 'rg' opcodes
 
stf r0,a ;;!! 174067 177662
std r1,@pa ;;!! 174177 177666
stexp r2,@ps ;;!! 175277 177670
stcfi r3,(r1) ;;!! 175711
stcfl r0,(r2)+ ;;!! 175422
stcdi r1,@(r3)+ ;;!! 175533
stcdl r2,-(r4) ;;!! 175644
stcfd r3,@-(r4) ;;!! 176354
stcdf r0,@pa ;;!! 176077 177644
 
.end
/test_0120_op_rg.mac
0,0 → 1,22
; $Id: test_0120_op_rg.mac 501 2013-03-30 13:53:39Z mueller $
;
; test opcodes with 1 1/2 operands
;
.asect
.blkw 400
 
a: .word 0
pa: .word a
 
sub: rts pc ;;!! 001004: 000207
 
jsr pc,sub ;;!! 001006: 004767 177772
 
xor r1,a ;;!! 074167 177762
 
mul a,r2 ;;!! 070267 177756
div @pa,r2 ;;!! 071277 177754
ash #12,r3 ;;!! 072327 000012
ashc @#a,r4 ;;!! 073437 001000
 
.end
/zbug_0001.mac
0,0 → 1,23
; $Id: zbug_0001.mac 501 2013-03-30 13:53:39Z mueller $
;
; ISSUE: .ascii without label failed with Q
;
; REASON: .ascii requests next token with a different mask. The label handling
; in state 'start' looks ahead with default mask and does a pushback.
; --> That clashed !!
;
; FIX: look to directive names in 'start' and branch to 'oper' immediately in
; this case.
;
; SIDES: prevents also creation of labels with the name of a directive.
;
.asect
.blkw 400
.word 0
 
a1: .ascii /test/
.ascii /test/ ; failed with Q
a2: .ascii /test/
 
.end
/zbug_0002.mac
0,0 → 1,15
; $Id: zbug_0002.mac 501 2013-03-30 13:53:39Z mueller $
;
; ISSUE: phase error after fmt='-' type opcodes
;
; REASON: incdot(2) wasn't called in this case in pass 1.
;
.asect
.blkw 400
 
l1: nop
nop
nop
l2:
 
.end
/zbug_0003.mac
0,0 → 1,23
; $Id: zbug_0003.mac 502 2013-04-02 19:29:30Z mueller $
;
; for asm-11 prior rev 502
;
; ISSUE: '-2(r0)','@-2(r0) and '-sym(r0)',@-sym(r0) gives Q error
;
; REASON: confused in parser with '-(r0)' and '@-(r0)' modes
;
.asect
.blkw 400
 
mov -2(r0),r5
mov @-2(r0),r5
mov r5,-2(r0)
mov r5,@-2(r0)
 
off = 2
mov -off(r0),r5
mov @-off(r0),r5
mov r5,-off(r0)
mov r5,@-off(r0)
 
.end
/test_0180_pst.mac
0,0 → 1,61
; $Id: test_0180_pst.mac 502 2013-04-02 19:29:30Z mueller $
;
; test interaction pst <-> lst
;
.asect
.blkw 400
 
; defined constants based on opcodes
 
c1 = inc ;;!! 005200
c2 = inc + 67 ;;!! 005267
 
; use opcode values as constants
 
mov #mov,r1 ;;!! 012701 010000
mov #inc,r2 ;;!! 012702 005200
 
; combine opcodes, especially cc ops
; uses implicit .word mechanism, and that pst symbols can be used as constants
 
sec ;;!! 000261
sev ;;!! 000262
sez ;;!! 000264
sen ;;!! 000270
 
<sec!sev> ;;!! 000263
<sec!sev!sez> ;;!! 000267
<sec!sev!sez!sen> ;;!! 000277
; Note: sec!sev without <> will not work, the first sec will trigger operand
; parsing, and since sec doesn't have operands, flag an error
 
; using self-defined compound opcodes
 
scv = sec ! sev ;;!! 000263
scv ;;!! 000263
 
; not check pst - lst interference
; opcodes are always looked-up from pst
; symbols are looked-up first in lst, than in pst
 
; opcode name defined as const
cmp = 1234 ;;!! 001234
 
; instruction usage is unaltered, but usage as constant is redefined
 
cmp r0,r0 ;;!! 020000
mov #cmp,r0 ;;!! 012700 001234
mov #cmp+77,r0 ;;!! 012700 001333
 
; and label with an opcode name, same concept
 
clr r0 ;;!! 005000
clr @#mov ;;!! 005037 010000
clr @#cmp ;;!! 005037 001234
clr @#clr ;;!! 005037 001060
clr: clr @#mov ;;!! 001060: 005037 010000
clr @#cmp ;;!! 005037 001234
clr @#clr ;;!! 005037 001060
 
.end
/test_0020_expr.mac
0,0 → 1,62
; $Id: test_0020_expr.mac 501 2013-03-30 13:53:39Z mueller $
;
; test assignment and expressions
;
.asect
 
a1 = 100 ;;!! 000100
a2 == 110 ;;!! 000110
a3 =: 120 ;;!! 000120
a4 ==: 130 ;;!! 000130
 
; unary operators
 
u1 = +200 ;;!! 000200
u2 = -300 ;;!! 177500
u3 = +-300 ;;!! 177500
u4 = -+-300 ;;!! 000300
u5 = ^c300 ;;!! 177477
u6 = ^c-300 ;;!! 000277
 
; binary operators
 
b1 = 1100 + 100 ;;!! 001200
b2 = 1311 - 100 ;;!! 001211
b3 = 400 * 3 ;;!! 001400
b4 = 2000 / 4 ;;!! 000400
b5 = 1770 & 0077 ;;!! 000070
b6 = 1000 ! 100 ;;!! 001100
 
; radix prefixes and suffixes
 
r1 = 11 ;;!! 000011
r2 = 11. ;;!! 000013
r3 = ^b11 ;;!! 000003
r4 = ^o11 ;;!! 000011
r5 = ^d11 ;;!! 000013
r6 = 99. ;;!! 000143
r7 = ^d99 ;;!! 000143
;; r8 = ^x1234
 
; other prefixes
 
s1 = 'X ;;!! 000130
s2 = "XY ;;!! 054530
s3 = ^rabc ;;!! 003223
 
; long left-to-right expressions
 
e1 = 100 + 20 * 2 + 1 ;;!! 000241
e2 = 200 - 100 / 2 ;;!! 000040
e3 = 777 * 2 & 77 ;;!! 000076
 
; nested expressions
 
n1 = 400+200 ;;!! 000600
n2 = <400+200> ;;!! 000600
n3 = 400+ 2*100 ;;!! 040200
n4 = 400+<2*100> ;;!! 000600
n5 = 400+ 200-100 /2 ;;!! 000240
n6 = 400+<<200-100>/2> ;;!! 000440
 
.end
/.cvsignore
0,0 → 1,5
*.lda
*.cof
*.lst
*.ldart
*.lstrt
/.
. Property changes : Added: svn:ignore ## -0,0 +1,37 ## +*.dep_ghdl +*.dep_isim +*.dep_xst +work-obj93.cf +*.vcd +*.ghw +*.sav +*.tmp +*.exe +ise +xflow.his +*.ngc +*.ncd +*.pcf +*.bit +*.msk +isim +isim.log +isim.wdb +fuse.log +*_[sft]sim.vhd +*_tsim.sdf +*_xst.log +*_tra.log +*_twr.log +*_map.log +*_par.log +*_pad.log +*_bgn.log +*_svn.log +*_sum.log +*_[dsft]sim.log +*.lda +*.cof +*.lst +*.ldart +*.lstrt

powered by: WebSVN 2.1.0

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