?login_element?

Subversion Repositories NedoOS

Rev

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

  1.     org $3000
  2.     relocate_start
  3.  
  4. test1   equ     $           ; should have isRelocatable flag
  5. test2   equ     $ + 23      ; should have isRelocatable flag
  6. test3   equ     $ - test1   ; size of code = no relocation
  7.  
  8.         dw      relocate_count
  9.         dw      relocate_size
  10.  
  11.         ld      hl,test1    ; to be relocated
  12.         ld      de,test2    ; to be relocated
  13.         ld      bc,test3    ; no relocation
  14.         ld      sp,noRel1   ; no relocation
  15.  
  16.     relocate_table
  17.  
  18.     relocate_end
  19.  
  20. noRel1  equ     $
  21.     ; no relocation outside of the block
  22.         ld      hl,test1
  23.         ld      de,test2
  24.         ld      bc,test3
  25.         ld      sp,noRel1   ; no relocation
  26.  
  27.     ASSERT 2 == relocate_count
  28.     ASSERT 0 == __ERRORS__
  29.     ASSERT 0 == __WARNINGS__
  30.