mirror of
https://github.com/wfjm/w11.git
synced 2026-01-22 11:00:49 +00:00
- 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
63 lines
1.8 KiB
Plaintext
63 lines
1.8 KiB
Plaintext
; $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
|