symi86.pas 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. {
  2. Copyright (c) 2014 by Florian Klaempfl
  3. Symbol table overrides for i386 and i8086
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  15. ****************************************************************************
  16. }
  17. unit symi86;
  18. {$i fpcdefs.inc}
  19. interface
  20. uses
  21. symtype,symdef,symsym;
  22. type
  23. { ti86absolutevarsym }
  24. ti86absolutevarsym = class(tabsolutevarsym)
  25. protected
  26. procedure ppuload_platform(ppufile: tcompilerppufile); override;
  27. procedure ppuwrite_platform(ppufile: tcompilerppufile); override;
  28. public
  29. absseg : boolean;
  30. end;
  31. implementation
  32. uses
  33. symconst;
  34. { ti86absolutevarsym }
  35. procedure ti86absolutevarsym.ppuload_platform(ppufile: tcompilerppufile);
  36. begin
  37. inherited;
  38. if abstyp=toaddr then
  39. absseg:=boolean(ppufile.getbyte)
  40. else
  41. absseg:=false;
  42. end;
  43. procedure ti86absolutevarsym.ppuwrite_platform(ppufile: tcompilerppufile);
  44. begin
  45. inherited;
  46. if abstyp=toaddr then
  47. ppufile.putbyte(byte(absseg));
  48. end;
  49. end.