?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download

  1.     ; the implementation is providing alternate label values being offset by -0x0201
  2.     ; to their real value. This test does try relocation blocks near beginnging and end
  3.     ; of memory regions to verify that there is no connection between the -0x201 offset
  4.     ; and assembling results (there should not be).
  5.  
  6.     ORG     0
  7.     RELOCATE_START
  8. label1:     DW      label2
  9. label2:     ld      hl,label1
  10.             ld      de,(label1)
  11.             ld      bc,label2 - label1
  12.             call    label1
  13.             rst     $08
  14.  
  15.     RELOCATE_TABLE      ; first copy of relocate table
  16.  
  17.     ; try ORG within the same block, try end region of memory
  18.     ORG     $FFF8
  19. label3:     jp      label2
  20.             dw      label3 - label1
  21.             dw      label3
  22.         ; check crossing memory limit by instruction in relocation block
  23.         ; this emits "incosistent warning" because the table was already emitted
  24.         ; but with truncated 0x0000 value, while the new value to be inserted
  25.         ; is 0x10000
  26.             call    label3
  27.     RELOCATE_END
  28.  
  29.     ; second copy of relocation table, make it fill memory up to 64kiB boundary
  30.     ORG     $10000 - relocate_size
  31.     RELOCATE_TABLE
  32.  
  33.     ; third copy of relocation table, make it leak 1B beyond 0x10000
  34.     ORG     $10000 - relocate_size + 1
  35.     RELOCATE_TABLE
  36.