?login_element?

Subversion Repositories NedoOS

Rev

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

  1.     OPT --zxnext --syntax=abfw : ORG $1234
  2.  
  3.     RELOCATE_START
  4.  
  5.     ASSERT 2 * relocate_count == relocate_size
  6.     ASSERT 12 == relocate_count
  7.     dw      relocate_count
  8.     dw      relocate_size
  9.  
  10. reloc1:
  11.     ; generate two relocation records:
  12.     ld      hl,reloc1,,bc,reloc2-reloc1,,de,reloc1+5,,sp,absolute1
  13.     jp      reloc1,,reloc2-reloc1,,reloc1+5,,absolute1
  14.     call    reloc1,,reloc2-reloc1,,reloc1+5,,absolute1
  15.     add     hl,reloc1,,bc,reloc2-reloc1,,de,reloc1+5,,hl,absolute1  ; Z80N extras
  16.     ld      hl,(reloc1),,bc,(reloc2-reloc1),,de,(reloc1+5),,sp,(absolute1)
  17.     ld      (reloc1),hl,,(reloc2-reloc1),bc,,(reloc1+5),de,,(absolute1),sp
  18.  
  19. reloc2:
  20.  
  21.     RELOCATE_END
  22.  
  23. absolute1:
  24.  
  25.     RELOCATE_TABLE
  26.     ; 39 12 ($1239) 3F 12 ($123F)   ; ld r16,imm16
  27.     ; 45 12 ($1245) 4B 12 ($124B)   ; jp
  28.     ; 51 12 ($1251) 57 12 ($1257)   ; call
  29.     ; 5E 12 ($125E) 66 12 ($1266)   ; add r16,imm16
  30.     ; 6D 12 ($126D) 75 12 ($1275)   ; ld r16,(mem16)
  31.     ; 7C 12 ($127C) 84 12 ($1284)   ; ld (mem16),r16
  32.  
  33.     ASSERT 0 == __ERRORS__
  34.     ASSERT 0 == __WARNINGS__
  35.