home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 1 / crawlyvol1.bin / program / compiler / nasm20b / nasm_src / fix.c < prev    next >
C/C++ Source or Header  |  1993-01-19  |  1KB  |  44 lines

  1. /* ---------------------------------------------------------------------- */
  2. /*                   Copyright (C) 1991 by Natürlich!                     */
  3. /*                      This file is copyrighted!                         */
  4. /*                Refer to the documentation for details.                 */
  5. /* ---------------------------------------------------------------------- */
  6. #include "defines.h"
  7. #include "nasm.h"
  8. #include "debug.h"
  9. #include NMALLOC_H
  10. #include "code.h"
  11. #include "fix.h"
  12. #include "labels.h"
  13. #include "seg.h"
  14.  
  15. make_mallocer( fix, FIXMAX, fix_alloc)    /* that's all */
  16.  
  17. #if ! VERSION
  18.  
  19. void  fix_up( ex, ip, type)
  20. expr huge   *ex;
  21. imm huge    *ip;
  22. {                                                     
  23.    extern seg huge   *sp;                             
  24.    fix huge   *q = fix_alloc();                
  25.  
  26.    q->poof.block = sp;                            
  27.    q->index      = calc_index();         
  28.    q->imm        = ip;
  29.    ex->fix       = type;                          
  30.    ex->zonk.fixp = q;                             
  31. }
  32.  
  33. void  fix_lup( ex, p)
  34. expr  *ex;
  35. label *p;
  36. {
  37.    fix huge   *q = fix_alloc();
  38.  
  39.    q->poof.label = p;
  40.    ex->fix       = FIX_LABEL;
  41.    ex->zonk.fixp = q;
  42. }
  43. #endif
  44.