?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download

  1.     ; correct syntax
  2.     DEFDEVICE LikeZx48, $4000, 4, 0, 1, 2, 3
  3.     DEFDEVICE LikeZxNext, $2000, 96
  4.  
  5.     ; correct syntax, but not defined in first pass - gets silently ignored
  6.     IF 1 < __PASS__
  7.         DEFDEVICE tooLateId, $4000, 4
  8.     ENDIF
  9.  
  10.     ; invalid syntax, missing arguments
  11.     DEFDEVICE
  12.     DEFDEVICE invalidId
  13.     DEFDEVICE invalidId,
  14.     DEFDEVICE invalidId, $10000
  15.     DEFDEVICE invalidId, $10000,
  16.  
  17.     ; invalid arguments
  18.     DEFDEVICE invalidId, $10001, 256
  19.     DEFDEVICE invalidId, 255, 256
  20.     DEFDEVICE invalidId, $10000, 0
  21.     DEFDEVICE invalidPage, $4000, 4, 1, 4, 2, 3
  22.  
  23.     ; re-definition of already defined ID
  24.     DEFDEVICE LIKEZX48, $4000, 8, 2, 3, 4, 5
  25.  
  26.     ; try to switch to mis-defined devices (errors expected)
  27.     DEVICE tooLateId
  28.     DEVICE invalidId
  29.  
  30.     ; try to switch to valid user defined devices
  31.     DEVICE LIKEZX48
  32.     DEVICE LIKEZXNEXT
  33.  
  34.     ; MMU when it runs out of pages
  35.     DEVICE LIKEZX48
  36.     MMU 0 3, 2
  37.     MMU 0 n, 3, $3FFF
  38.     DB $01
  39.     ; error about no more pages to map
  40.     ;(even when there is no byte emit... because address wrap-around happens any way for listing at least)
  41.  
  42.     ; older SLOT/PAGE
  43.     SLOT 4
  44.     PAGE 4
  45.  
  46.     DEVICE LIKEZX48, $8765  ; ramtop warning
  47.  
  48.     ; non-divisible slot size are technically possible, but they may cause few glitches here and there
  49.     DEFDEVICE weirdSlotSz, $E000, 4
  50.  
  51.     DEVICE weirdslotsz
  52.     ORG $0000 : ASSERT 0 == $$
  53.     ORG $E000 : ASSERT 1 == $$
  54.     SLOT 0 : PAGE 2 : ORG $0000 : ASSERT 2 == $$
  55.     SLOT 1 : PAGE 1 : ORG $E000 : ASSERT 1 == $$
  56.     SLOT 2
  57.     MMU $E000, 3, $FFFE
  58.     ASSERT 3 == $$
  59.     nop
  60.     ld a,1
  61. long_ptr_label:
  62.     ; due to weird slot size, this doesn't report 64ki boundary crossing and works a bit like --longptr mode
  63.     ASSERT $10001 == $ && 3 == $$
  64.     ; but trying to set such ORG directly will end with truncated ORG back to slot 0
  65.     ORG $10001
  66. truncated_label:
  67.     ASSERT 2 == $$
  68.