mirror of
https://github.com/wfjm/w11.git
synced 2026-04-26 04:08:17 +00:00
- tools/bin
- asm-11
- add .if, .if(f|t|tf), .endc, .rept, .endr, .mexit directives
- add .error, .print, .mcall, .mdelete directives
- add .narg, .nchr, .ntype directives
- rewrite macro definition and call argument parsing & handling
- add -L option (to set .mcall pathlist)
- add auto-generated ...top label
- add flag (MRmrd) column in output format
- asm-11_expect
- add simple substitution mechanism (for macro testing)
- handle new flag column in output format
- tools/asm-11
- tests(-err): many tests added
- tests(-err)/Makefile: distclean target added
- mlib: macro library, accessed by .mcall
90 lines
3.4 KiB
Plaintext
90 lines
3.4 KiB
Plaintext
; $Id: test_0110_op_gg.mac 1353 2023-01-23 18:13:53Z mueller $
|
|
; SPDX-License-Identifier: GPL-3.0-or-later
|
|
; Copyright 2013-2023 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
|
|
|
; test opcodes with two general operands
|
|
;
|
|
.asect
|
|
. = 1000
|
|
|
|
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 @(r4),r0 ;;!! 067400 000000
|
|
add a,r0 ;;!! 066700 177732
|
|
add @pa,r0 ;;!! 067700 177732
|
|
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,@(r4) ;;!! 060074 000000
|
|
add r0,a ;;!! 060067 177660
|
|
add r0,@pa ;;!! 060077 177660
|
|
add r0,@#a ;;!! 060037 001000
|
|
|
|
; pc relative addressing
|
|
|
|
c: .word 0 ;;!! 001130: 000000
|
|
d: .word 0 ;;!! 001132: 000000
|
|
add c,d ;;!! 001134: 066767 177770 177770
|
|
add f,e ;;!! 001142: 066767 000004 000000
|
|
e: .word 0 ;;!! 001150: 000000
|
|
f: .word 0 ;;!! 001152: 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 177604
|
|
add @pa,@#a ;;!! 067737 177604 001000
|
|
add #1000,b ;;!! 062767 001000 177572
|
|
|
|
; 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 177550 177552
|
|
sub @(r4),@(r5) ;;!! 167475 000000 000000
|
|
movb @#a,(r3) ;;!! 113713 001000
|
|
cmpb @(r5)+,@-(r2) ;;!! 123552
|
|
bitb @1234(r4),@pa ;;!! 137477 001234 177530
|
|
bicb -(r1),1234(r3) ;;!! 144163 001234
|
|
bisb a,@#b ;;!! 156737 177514 001002
|
|
|
|
; explicit pc offset addressing
|
|
p5: add 100(pc),r0 ;;!! 066700 000100
|
|
add @100(pc),r0 ;;!! 067700 000100
|
|
add r0,100(pc) ;;!! 060067 000100
|
|
add r0,@100(pc) ;;!! 060077 000100
|
|
|
|
.end
|