; test.eal ; ***************************************************** ; example test data for the EAL assembler ; Author: Douglas W. Jones, Jun. 10, 2003 V0.0 (MP0) ; Revised: Douglas W. Jones, Jun. 25, 2003 V1.0 (MP1) ; ***************************************************** ; demonstrate basic assembly notation B 12 ; decimal byte B #C ; hex byte W 528 ; decimal word W #210 ; hex word W 2#1011111011101111 ; binary word #V1.0# W 4#23323233 ; base 4 word #V1.0# W 8#137357 ; octal word #V1.0# W 32#1FNF ; base 32 word #V1.0# W LB ; use of a defined label LA: ; a label on a line by itself LB: W LA ; a label on the same line W LC ; use of something defined later LC = 32 ; a definition W LC ; use of that definition LC = 64 ; a redefinition W LC ; use of the redefinition ; verify that underline works in identifiers A_B = 1 W A_B ; demo parenthesized expression parsing and evaluation W 1 W 1+1 W (1+1) + 1 W (1) + ((1)+1) + 1 ; demonstrate other operators W (1) - (2-3) - 4 ; should be -2 or FFFE W (4) & (6&7) & 12 ; should be 4 W (1) | (2|4) | 8 ; should be 15 or 000F W 1 + 2 - 3 | 4 & 5 ; should be 4 ; demonstrate that it works in other contexts A_B = 1 + 2 - 3 | 4 & 5 W A_B ; demonstrate what happens to errors B # ; missing hex number #V1.0# B #0G ; illegal hex digit B 9876543210 ; number way too large B 345 ; number too large W 65536 ; number too large B 0#00 ; illegal radix #V1.0# B 37#00 ; illegal radix #V1.0# B 2#30 ; illegal digit #V1.0# B 2# ; missing number #V1.0# B UNDEF ; undefined operand A_B = UNDEF ; undefined operand in definition B A_B ; indirectly undefined operand B (1 ; missing paren B 1) ; extra paren B 1 + ; missing operand B 1 + QQ ; undefined operand in expression