?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download

  1.     DEVICE NONE         ; set "none" explicitly, to avoid "global device" feature
  2.     SLOT $4000          ;; warning about non-device mode
  3.     MMU $4000, 1        ;; warning about non-device mode
  4.     DEVICE ZXSPECTRUM128
  5.  
  6.     ; mark banks content with values for checking results
  7.     MMU 0, 0, 0 : DW '00'
  8.     MMU 0, 1, 0 : DW '11'
  9.     MMU 0, 2, 0 : DW '22'
  10.     MMU 0, 3, 0 : DW '33'
  11.     MMU 0, 4, 0 : DW '44'
  12.     MMU 0, 5, 0 : DW '55'
  13.     MMU 0, 6, 0 : DW '66'
  14.     MMU 0, 7, 0 : DW '77'
  15.     ; remap ZX128 to banks 0:1:2:3
  16.     MMU 0 3, 0
  17.     ASSERT '00' == {$0000} && '11' == {$4000} && '22' == {$8000} && '33' == {$C000}
  18.  
  19.     ; test SLOT with valid values
  20.     SLOT $0000 : PAGE 4
  21.     SLOT $4000 : PAGE 5
  22.     SLOT $8000 : PAGE 6
  23.     SLOT $C000 : PAGE 7
  24.     ASSERT '44' == {$0000} && '55' == {$4000} && '66' == {$8000} && '77' == {$C000}
  25.  
  26.     ; test MMU with valid values
  27.     MMU $0000 w, 1
  28.     MMU $4000 w, 2
  29.     MMU $8000 w, 3
  30.     MMU $C000 w, 4
  31.     ASSERT '11' == {$0000} && '22' == {$4000} && '33' == {$8000} && '44' == {$C000}
  32.  
  33.     MMU $0000 $C000, 2
  34.     ASSERT '22' == {$0000} && '33' == {$4000} && '44' == {$8000} && '55' == {$C000}
  35.  
  36.     ; test with invalid value (address of start of slot must be exact)
  37.     SLOT $1000
  38.     SLOT 4
  39.     MMU $1000, 0
  40.     MMU 4, 0
  41.