?login_element?

Subversion Repositories NedoOS

Rev

Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download

  1. ; SYNTAX options "mM":
  2. ;   m      Switch off "Accessing low memory" warning globally
  3. ;   M      Alias "m" and "M" for "(hl)" to cover 8080-like syntax: ADD A,M
  4.  
  5. ; verify regular syntax works as expected with default options
  6.     ld      a,(123)             ; warning about low memory access
  7.     ld      a,(123)             ; ok ; warning suppressed
  8.     add     a,m                 ; label not found
  9.     add     a,(hl)              ; regular add instruction
  10.     OPT push --syntax=mM    ; test the syntax options "mM"
  11.     ld      a,(123)
  12.     ld      a,(123)             ; ok
  13.     add     a,m                 ; (hl) used
  14.     add     a,M                 ; (hl) used
  15.     add     a,(hl)              ; regular add instruction
  16.     OPT pop                 ; test push+pop of new options
  17.     ld      a,(123)             ; warning about low memory access
  18.     ld      a,(123)             ; ok ; warning suppressed
  19.     add     a,M                 ; label not found
  20.     add     a,(hl)              ; regular add instruction
  21.     ASSERT _WARNINGS == 2 && _ERRORS == 2
  22.