Mercurial > hg-old > index.cgi
comparison lwlink/link.c @ 204:048ebb85f6ef
Added 8 bit external references for base page addressing mode
author | lost |
---|---|
date | Sun, 29 Mar 2009 14:52:28 +0000 |
parents | 857cb407229e |
children | 42df94f30d82 |
comparison
equal
deleted
inserted
replaced
203:2c1afbdb2de0 | 204:048ebb85f6ef |
---|---|
354 } | 354 } |
355 else | 355 else |
356 { | 356 { |
357 // put the value into the relocation address | 357 // put the value into the relocation address |
358 rval = lw_expr_get_value(rl -> expr); | 358 rval = lw_expr_get_value(rl -> expr); |
359 sectlist[sn].ptr -> code[rl -> offset] = (rval >> 8) & 0xff; | 359 if (rl -> flags & RELOC_8BIT) |
360 sectlist[sn].ptr -> code[rl -> offset + 1] = rval & 0xff; | 360 { |
361 sectlist[sn].ptr -> code[rl -> offset] = rval & 0xff; | |
362 } | |
363 else | |
364 { | |
365 sectlist[sn].ptr -> code[rl -> offset] = (rval >> 8) & 0xff; | |
366 sectlist[sn].ptr -> code[rl -> offset + 1] = rval & 0xff; | |
367 } | |
361 } | 368 } |
362 } | 369 } |
363 } | 370 } |
364 | 371 |
365 if (symerr) | 372 if (symerr) |