Rev 539 | Blame | Compare with Previous | Last modification | View Log | Download
# file opened: tricky_syntax.asm1 0000 OPT -Wrdlow ; test various tricky cases of syntax, enable rdlow warning2 0000 CE 07 adc a , ( ( 3 ) + ( 4 ) )tricky_syntax.asm(3): warning[rdlow]: Reading memory at low address: 73 0002 3A 07 00 ld a , ( ( 3 ) + ( 4 ) ) // extra warning about if low address is ok4 0005 3E 07 ld a , ( 3 ) + ( 4 )5 0007 3E 07 ld a , ( 3 ) | ( 4 )6 0009 3A 07 00 ld a , ( 3 | 4 ) // rdlow-ok. (warning suppressed by comment)tricky_syntax.asm(7): warning[rdlow]: Reading memory at low address: 77 000C 3A 07 00 ld a,((3|4)) // fake (should NOT suppress warning about low address)8 000F 3A 07 00 ld a,(+(3|4)) //rdlow-ok (should suppress)9 0012 3E 07 ld a,+((3|4))10 001411 0014 ; test all IXY variants recognized by parser12 0014 DD 7C DD 7C ld a,hx, a,xh, a,ixh, a,HX, a,XH, a,IXH, a,high ix, a,high IX, a,HIGH ix, a,HIGH IX12 0018 DD 7C DD 7C12 001C DD 7C DD 7C12 0020 DD 7C DD 7C12 0024 DD 7C DD 7C13 0028 DD 7D DD 7D ld a,lx, a,xl, a,ixl, a,LX, a,XL, a,IXL, a,low ix, a,low IX, a,LOW ix, a,LOW IX13 002C DD 7D DD 7D13 0030 DD 7D DD 7D13 0034 DD 7D DD 7D13 0038 DD 7D DD 7D14 003C FD 7C FD 7C ld a,hy, a,yh, a,iyh, a,HY, a,YH, a,IYH, a,high iy, a,high IY, a,HIGH iy, a,HIGH IY14 0040 FD 7C FD 7C14 0044 FD 7C FD 7C14 0048 FD 7C FD 7C14 004C FD 7C FD 7C15 0050 FD 7D FD 7D ld a,ly, a,yl, a,iyl, a,LY, a,YL, a,IYL, a,low iy, a,low IY, a,LOW iy, a,LOW IY15 0054 FD 7D FD 7D15 0058 FD 7D FD 7D15 005C FD 7D FD 7D15 0060 FD 7D FD 7D16 0064 DD E5 DD E5 push ix, IX17 0068 FD E5 FD E5 push iy, IY18 006C19 006C E9 E9 DD E9 jp (hl), hl, (ix), ix, (iy), iy ; valid19 0070 DD E9 FD E919 0074 FD E920 0076 ; invalidtricky_syntax.asm(21): error: Label not found: hl21 0076 C3 00 00 jp ((hl))tricky_syntax.asm(22): error: Label not found: ix22 0079 C3 00 00 jp ((ix))tricky_syntax.asm(23): error: Label not found: iy23 007C C3 00 00 jp ((iy))24 007F25 007F ; ld r16,nnnn vs ld r16,(nnnn) heuristics in default syntax mode26 007F 01 34 12 01 ld bc, $1230 + 4 , bc, ($1230) + (4) , bc,+($1230 + 4)26 0083 34 12 01 3426 0087 1227 0088 ED 4B 34 12 ld bc,($1230 + 4) , bc,(($1230) + (4)) , bc, [$1230 + 4] , bc,[($1230 + 4)]27 008C ED 4B 34 1227 0090 ED 4B 34 1227 0094 ED 4B 34 1228 009829 0098 11 34 12 11 ld de, $1230 + 4 , de, ($1230) + (4) , de,+($1230 + 4)29 009C 34 12 11 3429 00A0 1230 00A1 ED 5B 34 12 ld de,($1230 + 4) , de,(($1230) + (4)) , de, [$1230 + 4] , de,[($1230 + 4)]30 00A5 ED 5B 34 1230 00A9 ED 5B 34 1230 00AD ED 5B 34 1231 00B132 00B1 21 34 12 21 ld hl, $1230 + 4 , hl, ($1230) + (4) , hl,+($1230 + 4)32 00B5 34 12 21 3432 00B9 1233 00BA 2A 34 12 2A ld hl,($1230 + 4) , hl,(($1230) + (4)) , hl, [$1230 + 4] , hl,[($1230 + 4)]33 00BE 34 12 2A 3433 00C2 12 2A 34 1234 00C635 00C6 DD 21 34 12 ld ix, $1230 + 4 , ix, ($1230) + (4) , ix,+($1230 + 4)35 00CA DD 21 34 1235 00CE DD 21 34 1236 00D2 DD 2A 34 12 ld ix,($1230 + 4) , ix,(($1230) + (4)) , ix, [$1230 + 4] , ix,[($1230 + 4)]36 00D6 DD 2A 34 1236 00DA DD 2A 34 1236 00DE DD 2A 34 1237 00E238 00E2 FD 21 34 12 ld iy, $1230 + 4 , iy, ($1230) + (4) , iy,+($1230 + 4)38 00E6 FD 21 34 1238 00EA FD 21 34 1239 00EE FD 2A 34 12 ld iy,($1230 + 4) , iy,(($1230) + (4)) , iy, [$1230 + 4] , iy,[($1230 + 4)]39 00F2 FD 2A 34 1239 00F6 FD 2A 34 1239 00FA FD 2A 34 1240 00FE41 00FE 31 34 12 31 ld sp, $1230 + 4 , sp, ($1230) + (4) , sp,+($1230 + 4)41 0102 34 12 31 3441 0106 1242 0107 ED 7B 34 12 ld sp,($1230 + 4) , sp,(($1230) + (4)) , sp, [$1230 + 4] , sp,[($1230 + 4)]42 010B ED 7B 34 1242 010F ED 7B 34 1242 0113 ED 7B 34 1243 011744 0117 4E 23 46 2B ld bc,(hl), de,(hl) ; valid fake instructions44 011B 5E 23 56 2B45 011F DD 6E 01 DD ld hl,(ix+1), hl,(ix-128), hl,(ix+126)45 0123 66 02 DD 6E45 0127 80 DD 66 8145 012B DD 6E 7E DD45 012F 66 7F46 0131 FD 6E 01 FD ld hl,(iy+1), hl,(iy-128), hl,(iy+126)46 0135 66 02 FD 6E46 0139 80 FD 66 8146 013D FD 6E 7E FD46 0141 66 7F47 0143 ; invalidtricky_syntax.asm(48): error: Illegal instruction: ld hl,(hl)48 0143 ld hl,(hl)tricky_syntax.asm(49): error: Illegal instruction: ld sp,(hl)49 0143 ld sp,(hl)tricky_syntax.asm(50): error: Illegal instruction: ld ix,(hl)50 0143 ld ix,(hl)tricky_syntax.asm(51): error: Illegal instruction: ld iy,(hl)51 0143 ld iy,(hl)tricky_syntax.asm(52): error: Offset out of range52 0143 ld hl,(ix+127)tricky_syntax.asm(53): error: Offset out of range (-129)53 0143 ld hl,(ix-129)tricky_syntax.asm(54): error: Offset out of range54 0143 ld hl,(iy+127)tricky_syntax.asm(55): error: Offset out of range (-129)55 0143 ld hl,(iy-129)56 014357 0143 EB ex de,hl58 0144 EB ex hl,de59 0145 08 ex af60 0146 08 ex af,af61 0147 08 ex af,af'62 014863 0148 7D ld a , low hl63 0149 7D ld a,l64 014A 58 ld e , high bc64 014B 58 ld e,b65 014C 7D ld a , LOW hl65 014D 7D ld a,l66 014E 58 ld e , HIGH bc66 014F 58 ld e,b67 0150 3E 52 ld a , low h68 0152 h:69 0152 3E 54 ld a , low label70 0154 label:tricky_syntax.asm(71): error: Label not found: Lowtricky_syntax.asm(71): error: Unexpected: hl71 0154 3E 00 ld a , Low hl ; error72 0156 3E 01 ld a , high d73 0158 d:74 015875 0158 E3 ex (sp),hl ; #E376 0159 E3 ex hl,(sp) ; #E377 015A DD E3 ex (sp),ix ; #DDE378 015C DD E3 ex ix,(sp) ; #DDE379 015E FD E3 ex (sp),iy ; #FDE380 0160 FD E3 ex iy,(sp) ; #FDE381 0162 ; invalidtricky_syntax.asm(82): error: Illegal instruction: ex af,82 0162 ex af,tricky_syntax.asm(83): error: Illegal instruction: ex af,hl83 0162 ex af,hltricky_syntax.asm(84): error: Illegal instruction: ex af,(sp)84 0162 ex af,(sp)tricky_syntax.asm(85): error: Unexpected: ',af85 0162 08 ex af',af ; does leak `ex af,af` machine code, but also reports errortricky_syntax.asm(86): error: Illegal instruction: ex de,bc86 0163 ex de,bctricky_syntax.asm(87): error: Illegal instruction: ex hl,bc87 0163 ex hl,bctricky_syntax.asm(88): error: Illegal instruction: ex sp,hl88 0163 ex sp,hltricky_syntax.asm(89): error: Illegal instruction: ex (sp,hl89 0163 ex (sp,hltricky_syntax.asm(90): error: Illegal instruction: ex de,(sp)90 0163 ex de,(sp)tricky_syntax.asm(91): error: Illegal instruction: ex (sp),de91 0163 ex (sp),detricky_syntax.asm(92): error: Illegal instruction: ex hl,sp92 0163 ex hl,sptricky_syntax.asm(93): error: Illegal instruction: ex ix,sp93 0163 ex ix,sptricky_syntax.asm(94): error: Illegal instruction: ex iy,sp94 0163 ex iy,sp95 0163# file closed: tricky_syntax.asmValue Label------ - -----------------------------------------------------------0x0158 d0x0152 h0x0154 label