Rev 539 | Blame | Compare with Previous | Last modification | View Log | Download
operators.asm(70): warning[opkeyword]: Label collides with one of the operator keywords, try capitalizing it or other name: absoperators.asm(71): warning[opkeyword]: Label collides with one of the operator keywords, try capitalizing it or other name: andoperators.asm(72): warning[opkeyword]: Label collides with one of the operator keywords, try capitalizing it or other name: highoperators.asm(73): warning[opkeyword]: Label collides with one of the operator keywords, try capitalizing it or other name: lowoperators.asm(74): warning[opkeyword]: Label collides with one of the operator keywords, try capitalizing it or other name: modoperators.asm(75): warning[opkeyword]: Label collides with one of the operator keywords, try capitalizing it or other name: noreloperators.asm(76): warning[opkeyword]: Label collides with one of the operator keywords, try capitalizing it or other name: notoperators.asm(77): warning[opkeyword]: Label collides with one of the operator keywords, try capitalizing it or other name: oroperators.asm(78): warning[opkeyword]: Label collides with one of the operator keywords, try capitalizing it or other name: shloperators.asm(79): warning[opkeyword]: Label collides with one of the operator keywords, try capitalizing it or other name: shroperators.asm(80): warning[opkeyword]: Label collides with one of the operator keywords, try capitalizing it or other name: xor# file opened: operators.asm1 0000 ; simple tests of each operator2 0000 34 12 CC ED DW +0x1234, -0x12343 0004 CB ED DW ~0x12344 0006 00 00 00 00 DW !0x1234, not 0x12345 000A 34 00 12 00 DW low 0x1234, high 0x12346 000E 83 46 C3 BB DW 0x123 + 0x4560, 0x123 - 0x45607 0012 A8 03 E8 02 DW 0x12 * 0x34, 0x3456 / 0x128 0016 06 00 06 00 DW 0x3456 % 0x12, 0x3456 mod 0x129 001A A0 91 A0 91 DW 0x1234 << 3, 0x1234 shl 310 001E 53 F7 53 F7 DW -17768 >> 3, -17768 shr 3 ; -17768 = 0xFFFFBA9811 0022 53 17 53 17 DW 0xBA98 >> 3, 0xBA98 shr 3 ; expressions are calculated in 32b! 0xBA98 => positiveoperators.asm(12): warning: value 0x1FFFF753 is truncated to 16bit value: 0xF75312 0026 53 F7 53 17 DW -17768 >>> 3, 0xBA98 >>> 3 ; first is 0xFFFFBA98u>>3 (warning!)13 002A 30 12 30 12 DW 0x1234 & 0x5678, 0x5678 and 0x123414 002E 4C 44 4C 44 DW 0x1234 ^ 0x5678, 0x5678 xor 0x123415 0032 7C 56 7C 56 DW 0x1234 | 0x5678, 0x5678 or 0x123416 0036 34 12 34 12 DW 0x1234 <? 0x5678, 0x5678 <? 0x123417 003A 78 56 78 56 DW 0x1234 >? 0x5678, 0x5678 >? 0x123418 003E FF 00 00 DB 0x1234 < 0x5678, 0x5678 < 0x1234, 0x1234 < 0x123419 0041 00 FF 00 DB 0x1234 > 0x5678, 0x5678 > 0x1234, 0x1234 > 0x123420 0044 FF 00 FF DB 0x1234 <= 0x5678, 0x5678 <= 0x1234, 0x1234 <= 0x123421 0047 00 FF FF DB 0x1234 >= 0x5678, 0x5678 >= 0x1234, 0x1234 >= 0x123422 004A 00 00 FF DB 0x1234 = 0x5678, 0x5678 = 0x1234, 0x1234 = 0x123423 004D 00 00 FF DB 0x1234 == 0x5678, 0x5678 == 0x1234, 0x1234 == 0x123424 0050 FF FF 00 DB 0x1234 != 0x5678, 0x5678 != 0x1234, 0x1234 != 0x123425 0053 FF 00 00 00 DB 0x0012 && 0x3400, 0 && 0x3400, 0x0012 && 0, 0 && 026 0057 FF FF FF 00 DB 0x0012 || 0x3400, 0 || 0x3400, 0x0012 || 0, 0 || 027 005B 0A 00 0E 00 DW (2 * 3) + 4, 2 * (3 + 4)28 005F 5F 00 DW $29 006130 0061 ; shifts vs 32bit evaluator, more (tricky) tests:operators.asm(31): warning: value 0x5E6891A0 is truncated to 16bit value: 0x91A0operators.asm(31): warning: value 0x5E6891A0 is truncated to 16bit value: 0x91A031 0061 A0 91 A0 91 DW 0xABCD1234 << 3, 0xABCD1234 shl 332 0065 53 F7 53 F7 DW -1164413356 >> 19, -1164413356 shr 19 ; -1164413356 = 0xBA98765433 0069 53 F7 53 F7 DW 0xBA987654 >> 19, 0xBA987654 shr 1934 006D 53 17 53 17 DW -1164413356 >>> 19, 0xBA987654 >>> 1935 007136 0071 ; simple error statesoperators.asm(37): error: Syntax error:37 0071 DB !operators.asm(37): error: Syntax error:37 0071 DB notoperators.asm(37): error: Syntax error:37 0071 DB ~operators.asm(37): error: Syntax error:37 0071 DB +operators.asm(37): error: Syntax error:37 0071 DB -operators.asm(37): error: Syntax error:37 0071 DB lowoperators.asm(37): error: Syntax error:37 0071 DB highoperators.asm(38): error: Syntax error:38 0071 DB 4 *operators.asm(38): error: Syntax error:38 0071 DB 5 /operators.asm(38): error: Syntax error:38 0071 DB 6 %operators.asm(38): error: Syntax error:38 0071 DB 7 modoperators.asm(39): error: Division by zero39 0071 00 DB 8 / 0operators.asm(39): error: Division by zero39 0072 00 DB 9 % 0operators.asm(39): error: Division by zero39 0073 00 DB 10 mod 0operators.asm(40): error: Syntax error:40 0074 DB 11 +operators.asm(40): error: Syntax error:40 0074 DB 12 -operators.asm(41): error: Syntax error:41 0074 DB 13 <<operators.asm(41): error: Syntax error:41 0074 DB 14 shloperators.asm(41): error: Syntax error:41 0074 DB 15 >>operators.asm(41): error: Syntax error:41 0074 DB 16 shroperators.asm(41): error: Syntax error:41 0074 DB 17 >>>operators.asm(42): error: Syntax error:42 0074 DB 18 &operators.asm(42): error: Syntax error:42 0074 DB 19 andoperators.asm(42): error: Syntax error:42 0074 DB 20 ^operators.asm(42): error: Syntax error:42 0074 DB 21 xoroperators.asm(42): error: Syntax error:42 0074 DB 22 |operators.asm(42): error: Syntax error:42 0074 DB 23 oroperators.asm(43): error: Syntax error:43 0074 DB 24 <?operators.asm(43): error: Syntax error:43 0074 DB 25 >?operators.asm(44): error: Syntax error:44 0074 DB 26 <operators.asm(44): error: Syntax error:44 0074 DB 27 >operators.asm(44): error: Syntax error:44 0074 DB 28 <=operators.asm(44): error: Syntax error:44 0074 DB 29 >=operators.asm(44): error: Syntax error:44 0074 DB 30 =operators.asm(44): error: Syntax error:44 0074 DB 31 ==operators.asm(44): error: Syntax error:44 0074 DB 32 !=operators.asm(45): error: Syntax error:45 0074 DB 33 &&operators.asm(45): error: Syntax error:45 0074 DB 34 ||operators.asm(45): error: ')' expectedoperators.asm(45): error: Syntax error:45 0074 DB (operators.asm(45): error: Syntax error: )45 0074 DB )46 007447 0074 DEVICE NONE48 0074 ORG 049 0000 34 12 DW 0x1234operators.asm(50): error: Unexpected: $50 0002 02 00 DW $$ ; error when not in device modeoperators.asm(51): error: [DW/DEFW/WORD] Syntax error: { 0 }51 0004 DW { 0 }operators.asm(52): error: [DW/DEFW/WORD] Syntax error: {b 0 }52 0004 DW {b 0 }53 0004 DEVICE ZXSPECTRUM4854 0004 ORG 055 0000 34 12 DW 0x123456 0002 00 00 DW $$ ; should be OK57 0004 34 12 DW { 0 }58 0006 34 00 DW {b 0 }59 000860 0008operators.asm(61): warning: ?<symbol> operator is deprecated and will be removed in v2.x: ?not61 0008 21 25 00 ld hl,?not ; deprecated, use "@not" with full global name, or don't use keywords for label names at all62 000B63 000B ; new in v1.18.0operators.asm(64): warning: value 0x100 is truncated to 8bit value: 0x00operators.asm(64): warning: value 0x100 is truncated to 8bit value: 0x0064 000B 10 10 20 20 DB abs 16,abs -16,abs(32),abs(-32), abs ( 128 ) , abs ( -128 ),abs(256),abs(-256)64 000F 80 80 00 00operators.asm(65): warning: value 0x10000 is truncated to 16bit value: 0x0000operators.asm(65): warning: value 0x10000 is truncated to 16bit value: 0x000065 0013 10 00 10 00 DW abs 16,abs -16,abs(32),abs(-32), abs ( 128 ) , abs ( -128 ),abs(65536),abs(-65536)65 0017 20 00 20 0065 001B 80 00 80 0065 001F 00 00 00 0066 002367 0023 25 00 DW @abs ; fallback parsing of "abs" as label removed in v1.20.0 (requires @abs now)68 002569 0025 ; check all operator keywords to warn about their usage as labels70 0025 abs:71 0025 and:72 0025 high:73 0025 low:74 0025 mod:75 0025 norel:76 0025 not:77 0025 or:78 0025 shl:79 0025 shr:80 0025 @xor: ; also global prefix "@" shouldn't matter, should still warn about it!81 002582 0025 ; Capitalized variant is ok. It's actually ok also all-caps variant, which should NOT be ok,83 0025 ; but whoever uses label like XOR is beyond any good taste and I don't care about him.84 0025 Abs:85 0025 And:86 0025 High:87 0025 Low:88 0025 Mod:89 0025 Norel:90 0025 Not:91 0025 Or:92 0025 Shl:93 0025 Shr:94 0025 Xor:95 0025# file closed: operators.asmValue Label------ - -----------------------------------------------------------0x0025 X Abs0x0025 abs0x0025 X And0x0025 and0x0025 X High0x0025 high0x0025 X Low0x0025 low0x0025 X Mod0x0025 mod0x0025 X Norel0x0025 norel0x0025 X Not0x0025 not0x0025 X Or0x0025 or0x0025 X Shl0x0025 shl0x0025 X Shr0x0025 shr0x0025 X Xor0x0025 xor