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
    from Rev 22 to Rev 24
    Reverse comparison

Rev 22 → Rev 24

/tests/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
/tests/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"
/tests/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
/tests/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
/tests/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
/tests/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
/tests/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
/tests/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
/tests/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
/tests/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
/tests/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
/tests/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
/tests/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
/tests/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
/tests/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
/tests/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
/tests/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
/tests/.cvsignore
0,0 → 1,5
*.lda
*.cof
*.lst
*.ldart
*.lstrt
tests 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 Index: tests-err/Makefile =================================================================== --- tests-err/Makefile (nonexistent) +++ tests-err/Makefile (revision 24) @@ -0,0 +1,32 @@ +# $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) +LSTERR_all = $(MAC_all:.mac=.lsterr) +LDART_all = $(MAC_all:.mac=.ldart) +LSTRT_all = $(MAC_all:.mac=.lstrt) +# +include $(RETROBASE)/tools/make/generic_asm11.mk +# +.PHONY : def alllst allrt allexp clean cleanrt +# +def : alllst +# +alllst : $(LSTERR_all) +# +allrt : $(LSTRT_all) +# +allexp : $(LSTERR_all) + @ asm-11_expect $^ +# +clean : + @ rm -f $(LSTERR_all) + @ echo "Listing files removed" + +cleanrt : + @ rm -f $(LDART_all) $(LSTRT_all) + @ echo "RT-11 generated files removed" Index: tests-err/testerr_0200_Aerror_branch.mac =================================================================== --- tests-err/testerr_0200_Aerror_branch.mac (nonexistent) +++ tests-err/testerr_0200_Aerror_branch.mac (revision 24) @@ -0,0 +1,69 @@ +; $Id: testerr_0200_Aerror_branch.mac 501 2013-03-30 13:53:39Z mueller $ +; +; test A error code (Assembly error) +; case: range of branch or sob exceeded +; + .asect + .blkw 400 + +; range of branch (-128...+127) + +; short range back +bb1: br bb1 + +; 2nd longest back branch +bb2: nop + .blkw 125. + br bb2 + +; longest back branch +bb3: nop + .blkw 126. + br bb3 + +; too long back branch +bb4: nop + .blkw 127. + br bb4 ;;!! A + +; short range forward + br bf1 +bf1: nop + +; 2nd longest forward branch + br bf2 + .blkw 126. +bf2: nop + +; longest forward branch + br bf3 + .blkw 127. +bf3: nop + +; too long forward branch + br bf4 ;;!! A + .blkw 128. +bf4: nop + +; range of sob (-63 ... 0) + +; short range sob + +s1: sob r1,s1 + +; 2nd longest sob +s2: nop + .blkw 60. + sob r2,s2 + +; longest sob +s3: nop + .blkw 61. + sob r3,s3 + +; too long sob +s4: nop + .blkw 62. + sob r4,s4 ;;!! A + + .end Index: tests-err/testerr_0110_Nerror.mac =================================================================== --- tests-err/testerr_0110_Nerror.mac (nonexistent) +++ tests-err/testerr_0110_Nerror.mac (revision 24) @@ -0,0 +1,32 @@ +; $Id: testerr_0110_Nerror.mac 501 2013-03-30 13:53:39Z mueller $ +; +; test N error code (Number error) +; + .asect + .blkw 400 + +; octal, implicit + + .word 7 + .word 8 ;;!! N + .word 9 ;;!! N + +; octal, explicit ^o + + .word ^o7 + .word ^o8 ;;!! N + .word ^o9 ;;!! N + +; binary via ^b + + .word ^b101 + .word ^b2 ;;!! N + .word ^b3 ;;!! N + .word ^b4 ;;!! N + .word ^b5 ;;!! N + .word ^b6 ;;!! N + .word ^b7 ;;!! N + .word ^b8 ;;!! N + .word ^b9 ;;!! N + + .end Index: tests-err/testerr_0100_Berror.mac =================================================================== --- tests-err/testerr_0100_Berror.mac (nonexistent) +++ tests-err/testerr_0100_Berror.mac (revision 24) @@ -0,0 +1,29 @@ +; $Id: testerr_0100_Berror.mac 501 2013-03-30 13:53:39Z mueller $ +; +; test B error code (bounding error) +; + .asect + .blkw 400 + +; word align code + +t1: inc r0 +1$: .byte 0 +2$: + inc r1 ;;!! B + +; word align .word + +t2: .word 0 +1$: .byte 1 +2$: + .word 2 ;;!! B + +; word align .blkw + +t3: .blkw 2 +1$: .blkb 3 +2$: + .blkw 2 ;;!! B + + .end Index: tests-err/testerr_0020_muldef_label.mac =================================================================== --- tests-err/testerr_0020_muldef_label.mac (nonexistent) +++ tests-err/testerr_0020_muldef_label.mac (revision 24) @@ -0,0 +1,23 @@ +; $Id: testerr_0020_muldef_label.mac 501 2013-03-30 13:53:39Z mueller $ +; +; test multiple defined label response +; + .asect + +; for normal labels + +zero: .word zero ;;!! DM +one: .word one +zero: .word 0 ;;!! M + .word zero ;;!! D + +; for local labels (in scope) + +blk1: .word 0 +1$: .word 1 ;;!! M +2$: .word 2 +1$: .word 3 ;;!! M + .word 1$ ;;!! D + .word 2$ + + .end Index: tests-err/testerr_0130_Terror_inst.mac =================================================================== --- tests-err/testerr_0130_Terror_inst.mac (nonexistent) +++ tests-err/testerr_0130_Terror_inst.mac (revision 24) @@ -0,0 +1,21 @@ +; $Id: testerr_0130_Terror_inst.mac 501 2013-03-30 13:53:39Z mueller $ +; +; test T error code (Truncation) +; truncation in instruction fields +; + .asect + .blkw 400 + + spl 7 + spl 17 ;;!! T + + mark 77 + mark 100 ;;!! T + + trap 377 + trap 400 ;;!! T + + emt 377 + emt 400 ;;!! T + + .end Index: tests-err/testerr_0140_Terror_expr.mac =================================================================== --- tests-err/testerr_0140_Terror_expr.mac (nonexistent) +++ tests-err/testerr_0140_Terror_expr.mac (revision 24) @@ -0,0 +1,11 @@ +; $Id: testerr_0140_Terror_expr.mac 501 2013-03-30 13:53:39Z mueller $ +; +; test T error code (Truncation) +; truncation in expressions +; + .asect + .blkw 400 + +; not yet implemented... + + .end Index: tests-err/testerr_0010_undef_label.mac =================================================================== --- tests-err/testerr_0010_undef_label.mac (nonexistent) +++ tests-err/testerr_0010_undef_label.mac (revision 24) @@ -0,0 +1,26 @@ +; $Id: testerr_0010_undef_label.mac 501 2013-03-30 13:53:39Z mueller $ +; +; test undefined label response +; + .asect + +; for normal labels + +zero: .word zero + .word one ;;!! U + .word two ;;!! U + +; for local labels (in scope) + +blk1: .word 0 +1$: .word blk1 + .word 1$ + .word 2$ ;;!! U + +; for local labels (out-of-scope) + +blk2: .word 0 +2$: .word 1$ ;;!! U + .word 2$ + + .end Index: tests-err/testerr_0120_Terror_const.mac =================================================================== --- tests-err/testerr_0120_Terror_const.mac (nonexistent) +++ tests-err/testerr_0120_Terror_const.mac (revision 24) @@ -0,0 +1,45 @@ +; $Id: testerr_0120_Terror_const.mac 501 2013-03-30 13:53:39Z mueller $ +; +; test T error code (Truncation) +; truncation of too large constants +; + .asect + .blkw 400 + +; octal, implicit + + .word 123456 + .word 177777 + .word 1234567 ;;!! T + +; octal, explicit ^o + + .word ^o123456 + .word ^o177777 + .word ^o1234567 ;;!! T + +; decimal, implicit trailing . + + .word 65535. + .word 65536. ;;!! T + .word 65537. ;;!! T + +; decimal, explicit ^d + + .word ^d65535 + .word ^d65536 ;;!! T + .word ^d65537 ;;!! T + +; binary + + .word ^b111111111111111 + .word ^b1111111111111111 + .word ^b11111111111111111 ;;!!T + +; hex + + .word ^xfff + .word ^xffff + .word ^x1ffff ;;!! T + + .end Index: tests-err/.cvsignore =================================================================== --- tests-err/.cvsignore (nonexistent) +++ tests-err/.cvsignore (revision 24) @@ -0,0 +1,3 @@ +*.lsterr +*.ldart +*.lstrt Index: tests-err/testerr_0150_Terror_fpp.mac =================================================================== --- tests-err/testerr_0150_Terror_fpp.mac (nonexistent) +++ tests-err/testerr_0150_Terror_fpp.mac (revision 24) @@ -0,0 +1,67 @@ +; $Id: testerr_0150_Terror_fpp.mac 501 2013-03-30 13:53:39Z mueller $ +; +; test T error code (trunction) +; fpp cases: fpp ac reg>3 +; + .asect + .blkw 400 + +a: .word 0,0 + .word 0,0 + +; r0:r3 ok as fpp ac +; r4:r7 forbidden as fpp ac + +; test with gr type opcode, here addf + + addf a,r0 + addf a,r1 + addf a,r2 + addf a,r3 + + addf a,r4 ;;!! T + addf a,r5 ;;!! T + addf a,sp ;;!! T + addf a,pc ;;!! T + +; test with rg type opcode, here stf + + stf r0,a + stf r1,a + stf r2,a + stf r3,a + + stf r4,a ;;!! T + stf r5,a ;;!! T + stf sp,a ;;!! T + stf pc,a ;;!! T + +; for fsrc and fdst only register 0-5 +; are allowed, but the assembler doesn't +; check for this. + +; test with mulf + + mulf r0,r0 + mulf r1,r0 + mulf r2,r0 + mulf r3,r0 + mulf r4,r0 + mulf r5,r0 + + mulf sp,r0 ; ok, but traps + mulf pc,r0 ; ok, but traps + +; test with stf + + stf r0,r0 + stf r0,r1 + stf r0,r2 + stf r0,r3 + stf r0,r4 + stf r0,r5 + + stf r0,sp ; ok, but traps + stf r0,pc ; ok, but traps + + .end Index: tests-err =================================================================== --- tests-err (nonexistent) +++ tests-err (revision 24)
tests-err Property changes : Added: svn:ignore ## -0,0 +1,35 ## +*.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 +*.lsterr +*.ldart +*.lstrt Index: w11/sys/dl11/noboot.mac =================================================================== --- w11/sys/dl11/noboot.mac (nonexistent) +++ w11/sys/dl11/noboot.mac (revision 24) @@ -0,0 +1,31 @@ +; $Id: noboot.mac 521 2013-05-20 22:16:45Z mueller $ +; +; Boot blocker, when loaded and started at 0, writes +; This is not a hardware bootable disk +; + RCSR = 177560 + RBUF = 177562 + XCSR = 177564 + XBUF = 177566 +; + CR = 015 + LF = 012 +; +; starts at 0 ! +; + .asect + . = 0 +; +start: mov #text, r0 +1$: tstb (r0) + beq 3$ +2$: tstb @#XCSR + bpl 2$ + movb (r0)+,@#XBUF + br 1$ +3$: halt +; + . = 100 +text: .asciz /This is not a hardware bootable disk/ +; + .end Index: w11/sys/dl11/Makefile =================================================================== --- w11/sys/dl11/Makefile (nonexistent) +++ w11/sys/dl11/Makefile (revision 24) @@ -0,0 +1,30 @@ +# $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) +# +include $(RETROBASE)/tools/make/generic_asm11.mk +# +.PHONY : alllda allcof alllst clean +# +def : alllda +# +alllda : $(LDA_all) +# +allcof : $(COF_all) +# +alllst : $(LST_all) +# +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" Index: w11/sys/dl11/simple_out.mac =================================================================== --- w11/sys/dl11/simple_out.mac (nonexistent) +++ w11/sys/dl11/simple_out.mac (revision 24) @@ -0,0 +1,34 @@ +; $Id: simple_out.mac 503 2013-04-06 19:44:13Z mueller $ +; +; simple output test for DL11 interface +; + RCSR = 177560 + RBUF = 177562 + XCSR = 177564 + XBUF = 177566 +; + CR = 015 + LF = 012 +; +; transfer vector +; + .asect + . = 200 + jmp start +; +; test code +; + . = 1000 +; +start: mov #start,sp + mov #hw, r0 +1$: tstb (r0) + beq start +2$: tstb @#XCSR + bpl 2$ + movb (r0)+,@#XBUF + br 1$ +; +hw: .asciz /Hello world!/ +; + .end Index: w11/sys/dl11/simple_echo.mac =================================================================== --- w11/sys/dl11/simple_echo.mac (nonexistent) +++ w11/sys/dl11/simple_echo.mac (revision 24) @@ -0,0 +1,38 @@ +; $Id: simple_echo.mac 504 2013-04-13 15:37:24Z mueller $ +; +; simple echo test for DL11 interface +; + RCSR = 177560 + RBUF = 177562 + XCSR = 177564 + XBUF = 177566 +; + CR = 015 + LF = 012 +; +; transfer vector +; + .asect + . = 200 + jmp start +; +; test code +; + . = 1000 +; +start: mov #start,sp +; +1$: tstb @#RCSR ; input ready ? + bpl 1$ ; if not poll + movb @#RBUF,r0 ; get input char +2$: tstb @#XCSR ; output ready ? + bpl 2$ ; if not poll + movb r0,@#XBUF ; echo received char + cmpb #CR,r0 ; was it CR ? + bne 1$ ; if not, wait for next input +3$: tstb @#XCSR ; output ready ? + bpl 3$ + movb #LF,@#XBUF ; send LF + br 1$ +; + .end Index: w11/sys/dl11/.cvsignore =================================================================== --- w11/sys/dl11/.cvsignore (nonexistent) +++ w11/sys/dl11/.cvsignore (revision 24) @@ -0,0 +1,5 @@ +*.lda +*.cof +*.lst +*.ldart +*.lstrt Index: w11/sys/dl11 =================================================================== --- w11/sys/dl11 (nonexistent) +++ w11/sys/dl11 (revision 24)
w11/sys/dl11 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 Index: w11/sys =================================================================== --- w11/sys (nonexistent) +++ w11/sys (revision 24)
w11/sys Property changes : Added: svn:ignore ## -0,0 +1,32 ## +*.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 Index: w11 =================================================================== --- w11 (nonexistent) +++ w11 (revision 24)
w11 Property changes : Added: svn:ignore ## -0,0 +1,32 ## +*.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 Index: . =================================================================== --- . (nonexistent) +++ . (revision 24)
. Property changes : Added: svn:ignore ## -0,0 +1,32 ## +*.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

powered by: WebSVN 2.1.0

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