?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download

  1.     DEVICE ZXSPECTRUMNEXT
  2.  
  3.     ORG $8004-12
  4.     DB  $12
  5.     DS  11, 0
  6.     jr  $       ; bank 2, $8004
  7.  
  8.     ORG $C004-12
  9.     DB  $12
  10.     DS  11, 0
  11.     jr  $       ; bank 0, $C004
  12.  
  13.     MMU 0, 10*2, $0004
  14.     jr  $       ; bank 10, $C004 (the taint ahead is already there)
  15.  
  16.     MMU 0 7, 100 ; map the Z80 address space to completely unrelated pages
  17.  
  18. ;; OPEN <filename>[,<startAddress>[,<stackAddress>[,<entryBank 0..111>[,<fileVersion 2..3>]]]]
  19.     ; warning about ROM area
  20.     SAVENEX OPEN "savenexStackWarnings.nex", $8004, $0001 : SAVENEX CLOSE
  21.     SAVENEX OPEN "savenexStackWarnings.nex", $8004, $4009 : SAVENEX CLOSE
  22.  
  23.     ; byte-check warnings (valid + tainted for various slot/banks)
  24.     SAVENEX OPEN "savenexStackWarnings.nex" : SAVENEX CLOSE     ; PC=0, SP=0xFFFE
  25.  
  26.     ; check if wrap-around from $0000 targets correct bank (0 or entryBank) during check
  27.     SAVENEX OPEN "savenexStackWarnings.nex", $C004, $0000 : SAVENEX CLOSE
  28.     MMU 0, 0*2+1, $1FFF : DB $23    ; taint end of Bank0
  29.     SAVENEX OPEN "savenexStackWarnings.nex", $C004, $0000 : SAVENEX CLOSE   ; warning
  30.  
  31.     SAVENEX OPEN "savenexStackWarnings.nex", $C004, $0000, 10 : SAVENEX CLOSE
  32.     MMU 0, 10*2+1, $1FFF : DB $34   ; taint end of Bank10
  33.     SAVENEX OPEN "savenexStackWarnings.nex", $C004, $0000, 10 : SAVENEX CLOSE   ; warning
  34.  
  35.     ; check other more regular crossings+taints of banks
  36.     SAVENEX OPEN "savenexStackWarnings.nex", $8004, $400B : SAVENEX CLOSE
  37.     MMU 0, 5*2, $000A : DB $45
  38.     SAVENEX OPEN "savenexStackWarnings.nex", $8004, $400B : SAVENEX CLOSE   ; warning
  39.     SAVENEX OPEN "savenexStackWarnings.nex", $8004, $400A : SAVENEX CLOSE
  40.     MMU 0, 5*2, $0000 : DB $56
  41.     SAVENEX OPEN "savenexStackWarnings.nex", $8004, $400A : SAVENEX CLOSE   ; warning
  42.  
  43.     SAVENEX OPEN "savenexStackWarnings.nex", $8004, $8004 : SAVENEX CLOSE
  44.     MMU 0, 2*2, $0003 : DB $67
  45.     SAVENEX OPEN "savenexStackWarnings.nex", $8004, $8004 : SAVENEX CLOSE   ; warning
  46.     SAVENEX OPEN "savenexStackWarnings.nex", $8004, $8003 : SAVENEX CLOSE
  47.     MMU 0, 5*2+1, $1FFF : DB $78
  48.     SAVENEX OPEN "savenexStackWarnings.nex", $8004, $8003 : SAVENEX CLOSE   ; warning
  49.  
  50.     SAVENEX OPEN "savenexStackWarnings.nex", $C004, $C004 : SAVENEX CLOSE
  51.     MMU 0, 0*2, $0003 : DB $89
  52.     SAVENEX OPEN "savenexStackWarnings.nex", $C004, $C004 : SAVENEX CLOSE   ; warning
  53.     SAVENEX OPEN "savenexStackWarnings.nex", $C004, $C003 : SAVENEX CLOSE
  54.  
  55.     SAVENEX OPEN "savenexStackWarnings.nex", $C004, $C004, 10 : SAVENEX CLOSE
  56.     MMU 0, 10*2, $0003 : DB $9A
  57.     SAVENEX OPEN "savenexStackWarnings.nex", $C004, $C004, 10 : SAVENEX CLOSE   ; warning
  58.     SAVENEX OPEN "savenexStackWarnings.nex", $C004, $C003, 10 : SAVENEX CLOSE
  59.  
  60.     MMU 0, 2*2+1, $1FFF : DB $AB    ; taints both entryBank==0 and entryBank==10
  61.     SAVENEX OPEN "savenexStackWarnings.nex", $C004, $C003 : SAVENEX CLOSE   ; warning
  62.     SAVENEX OPEN "savenexStackWarnings.nex", $C004, $C003, 10 : SAVENEX CLOSE   ; warning
  63.     SAVENEX OPEN "savenexStackWarnings.nex", $C004, $C003, 10 ; suppress: nexstack-ok
  64.     SAVENEX CLOSE
  65.  
  66.     ASSERT 12 == __WARNINGS__
  67.