?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1.     ORG $1000
  2.     RELOCATE_START
  3.     ASSERT 2 * relocate_count == relocate_size
  4.     ASSERT 1 == relocate_count
  5.     dw      relocate_count
  6.     dw      relocate_size
  7.  
  8. reloc1:
  9.  
  10. equRel      EQU     reloc1 + $0203
  11. equNoRel    EQU     reloc2 - reloc1
  12. equAbs      EQU     absolute1
  13. equNoRel2   EQU     reloc1 * 3  ; can't be easily relocated by "+offset" - silent drop of flag
  14.  
  15.     ld      hl,equRel           ; to be relocated
  16.     ld      de,equNoRel         ; not affected by relocation
  17.     ld      bc,equAbs           ; not affected by relocation
  18.     ld      hl,equRel*2         ; affected but not relocated (invalid difference) (warning)
  19.     ld      de,equRel*2         ; reldiverts-ok ; suppressed warning
  20.     ld      bc,equNoRel2        ; not affected by relocation
  21.  
  22. reloc2:
  23.     RELOCATE_END
  24.  
  25. ; no relocation area (no warnings, no relocation data)
  26.     ORG $17DC
  27. absolute1:
  28.     ld      hl,equRel
  29.     ld      de,equNoRel
  30.     ld      bc,equAbs
  31.     ld      hl,equRel*2
  32.     ld      bc,equNoRel2
  33.  
  34.     RELOCATE_TABLE
  35.  
  36.     ASSERT 0 == __ERRORS__
  37.     ASSERT 1 == __WARNINGS__
  38.