1
0
mirror of https://github.com/wfjm/w11.git synced 2026-04-25 03:45:42 +00:00
Files
wfjm.w11/tools/asm-11/tests/test_0180_pst.mac
Walter F.J. Mueller 99de9893cb - interim release w11a_V0.562 (untagged)
- C++ and Tcl based backend server: many support classes for interfacing to 
  w11 system designs, and the associated Tcl bindings.
- add 'asm-11', a simple, Macro-11 syntax subset combatible, assembler. 
- use now doxygen 1.8.3.1, generate c++,tcl, and vhdl source docs
2013-04-13 17:13:15 +00:00

62 lines
1.9 KiB
Plaintext

; $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