1
0
mirror of https://github.com/wfjm/w11.git synced 2026-04-25 11:51:51 +00:00
Files
wfjm.w11/tools/asm-11/tests/test_0100_op_g.mac
wfjm 3b033ebfa8 major asm-11 update
- 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
2023-01-26 16:13:36 +01:00

84 lines
2.9 KiB
Plaintext

; $Id: test_0100_op_g.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 one general operand
;
.asect
. = 1000
;
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 @(r4) ;;!! 005274 000000
inc a ;;!! 005267 177736
inc @pa ;;!! 005277 177734
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 177662
ror @pa ;;!! 006077 177660
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 177634
comb @pa ;;!! 105177 177632
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 177574
mtps @pa ;;!! 106477 177572
mfpd @#a ;;!! 106537 001000
mtpd @r2 ;;!! 106612
mfps (r3) ;;!! 106713
; explicit pc offset addressing
inc 100(pc) ;;!! 005267 000100
inc @100(pc) ;;!! 005277 000100
dec @(pc) ;;!! 005377 000000
; phase error catcher
d: .word 0
.end