si_prc.pp 887 B

123456789101112131415161718192021222324252627282930313233343536
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 2020 by Free Pascal development team
  4. This file contains startup code for the ZX Spectrum
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. unit si_prc;
  12. {$SMARTLINK OFF}
  13. interface
  14. implementation
  15. var
  16. stktop: word; external name '__stktop';
  17. procedure PascalMain; external name 'PASCALMAIN';
  18. { this *must* always remain the first procedure with code in this unit }
  19. procedure _start; assembler; nostackframe; public name 'start';
  20. asm
  21. ld (stktop), sp
  22. jp PASCALMAIN
  23. end;
  24. end.