?login_element?

Subversion Repositories NedoOS

Rev

Rev 539 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1.     OPT -Wrdlow ; test various tricky cases of syntax, enable rdlow warning
  2.     adc     a , (   ( 3 ) + ( 4 )   )
  3.     ld      a , (   ( 3 ) + ( 4 )   )   // extra warning about if low address is ok
  4.     ld      a ,     ( 3 ) + ( 4 )
  5.     ld      a ,     ( 3 ) | ( 4 )
  6.     ld      a ,       ( 3 | 4 )         // rdlow-ok. (warning suppressed by comment)
  7.     ld      a,((3|4))       // fake (should NOT suppress warning about low address)
  8.     ld      a,(+(3|4))      //rdlow-ok (should suppress)
  9.     ld      a,+((3|4))
  10.  
  11.     ; test all IXY variants recognized by parser
  12.     ld      a,hx, a,xh, a,ixh, a,HX, a,XH, a,IXH, a,high ix, a,high IX, a,HIGH ix, a,HIGH IX
  13.     ld      a,lx, a,xl, a,ixl, a,LX, a,XL, a,IXL, a,low  ix, a,low  IX, a,LOW  ix, a,LOW  IX
  14.     ld      a,hy, a,yh, a,iyh, a,HY, a,YH, a,IYH, a,high iy, a,high IY, a,HIGH iy, a,HIGH IY
  15.     ld      a,ly, a,yl, a,iyl, a,LY, a,YL, a,IYL, a,low  iy, a,low  IY, a,LOW  iy, a,LOW  IY
  16.     push    ix, IX
  17.     push    iy, IY
  18.  
  19.     jp      (hl), hl, (ix), ix, (iy), iy        ; valid
  20.     ; invalid
  21.     jp      ((hl))
  22.     jp      ((ix))
  23.     jp      ((iy))
  24.  
  25.     ; ld r16,nnnn vs ld r16,(nnnn) heuristics in default syntax mode
  26.     ld      bc, $1230 + 4  , bc, ($1230) + (4)  , bc,+($1230 + 4)
  27.     ld      bc,($1230 + 4) , bc,(($1230) + (4)) , bc, [$1230 + 4] , bc,[($1230  +  4)]
  28.  
  29.     ld      de, $1230 + 4  , de, ($1230) + (4)  , de,+($1230 + 4)
  30.     ld      de,($1230 + 4) , de,(($1230) + (4)) , de, [$1230 + 4] , de,[($1230  +  4)]
  31.  
  32.     ld      hl, $1230 + 4  , hl, ($1230) + (4)  , hl,+($1230 + 4)
  33.     ld      hl,($1230 + 4) , hl,(($1230) + (4)) , hl, [$1230 + 4] , hl,[($1230  +  4)]
  34.  
  35.     ld      ix, $1230 + 4  , ix, ($1230) + (4)  , ix,+($1230 + 4)
  36.     ld      ix,($1230 + 4) , ix,(($1230) + (4)) , ix, [$1230 + 4] , ix,[($1230  +  4)]
  37.  
  38.     ld      iy, $1230 + 4  , iy, ($1230) + (4)  , iy,+($1230 + 4)
  39.     ld      iy,($1230 + 4) , iy,(($1230) + (4)) , iy, [$1230 + 4] , iy,[($1230  +  4)]
  40.  
  41.     ld      sp, $1230 + 4  , sp, ($1230) + (4)  , sp,+($1230 + 4)
  42.     ld      sp,($1230 + 4) , sp,(($1230) + (4)) , sp, [$1230 + 4] , sp,[($1230  +  4)]
  43.  
  44.     ld      bc,(hl), de,(hl)                    ; valid fake instructions
  45.     ld      hl,(ix+1), hl,(ix-128), hl,(ix+126)
  46.     ld      hl,(iy+1), hl,(iy-128), hl,(iy+126)
  47.     ; invalid
  48.     ld      hl,(hl)
  49.     ld      sp,(hl)
  50.     ld      ix,(hl)
  51.     ld      iy,(hl)
  52.     ld      hl,(ix+127)
  53.     ld      hl,(ix-129)
  54.     ld      hl,(iy+127)
  55.     ld      hl,(iy-129)
  56.  
  57.     ex      de,hl
  58.     ex      hl,de
  59.     ex      af
  60.     ex      af,af
  61.     ex      af,af'
  62.  
  63.    ld      a  ,  low  hl   : ld a,l
  64.    ld      e  ,  high  bc  : ld e,b
  65.    ld      a  ,  LOW  hl   : ld a,l
  66.    ld      e  ,  HIGH  bc  : ld e,b
  67.    ld      a  ,  low  h
  68. h:
  69.    ld      a  ,  low  label
  70. label:
  71.    ld      a  ,  Low  hl   ; error
  72.    ld      a  ,  high  d
  73. d:
  74.  
  75.    ex      (sp),hl     ; #E3
  76.    ex      hl,(sp)     ; #E3
  77.    ex      (sp),ix     ; #DDE3
  78.    ex      ix,(sp)     ; #DDE3
  79.    ex      (sp),iy     ; #FDE3
  80.    ex      iy,(sp)     ; #FDE3
  81.    ; invalid
  82.    ex      af,
  83.    ex      af,hl
  84.    ex      af,(sp)
  85.    ex      af',af      ; does leak `ex af,af` machine code, but also reports error
  86.     ex      de,bc
  87.     ex      hl,bc
  88.     ex      sp,hl
  89.     ex      (sp,hl
  90.     ex      de,(sp)
  91.     ex      (sp),de
  92.     ex      hl,sp
  93.     ex      ix,sp
  94.     ex      iy,sp
  95.