?login_element?

Subversion Repositories NedoOS

Rev

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

  1.     ORG $1000
  2.  
  3.     RELOCATE_START
  4.  
  5.     dw      relocate_count
  6.     dw      relocate_size
  7.  
  8. label1:
  9.     call    label1
  10.  
  11.     DISP    $2000
  12.     jp      label1      ; should relocate but at the $100x address ($1008)
  13.  
  14.     RELOCATE_END        ; error (inner-DISP is still open)
  15.  
  16.     DISP    $3000       ; DISP inside DISP, will get ignored
  17.     ENT                 ; end the inner-DISP
  18.     RELOCATE_END        ; end first relocation block
  19.  
  20.     DISP    $3000       ; outer-DISP
  21.     nop
  22. label2:
  23.     call    label2
  24.     RELOCATE_START
  25.     call    label3      ; should relocate at $300x address ($3005)
  26.     ENT                 ; error - trying to end outer-DISP inside relocation
  27.     RELOCATE_END        ; end relocation block
  28.     ENT                 ; end outer-block
  29.  
  30.     RELOCATE_START
  31.     call    label2
  32. label3:
  33.     call    label3      ; classic relocation
  34.     RELOCATE_END
  35.  
  36.     RELOCATE_TABLE
  37.  
  38.     ASSERT 2*relocate_count == relocate_size
  39.     ASSERT 4 == relocate_count
  40.     ASSERT 2 == __ERRORS__
  41.     ASSERT 1 == __WARNINGS__
  42.