Lazarus

Programming => General => Topic started by: toncho11 on October 04, 2020, 11:19:59 pm

Title: Problems compiling with 8086 fpc
Post by: toncho11 on October 04, 2020, 11:19:59 pm
I compile with: ppcross8086.exe ibmlogo.pas

I have two problems:

- Error: Identifier not found "SetUseACP"
- Error: Code segment "_TEXT" too large (exceeds 64k by 83965 bytes)

Code is:

Code: Pascal  [Select][+][-]
  1. uses
  2.  
  3.   Crt,
  4.   classes, sysutils, strutils;
  5.  
  6. var
  7.    Line1 : string;
  8.    c : string;
  9.  
  10. Begin
  11.  
  12. SetUseACP(False);
  13.  
  14. TextColor(LightBlue);
  15.  
  16. c:=chr(219);
  17.  
  18. Line1:='   77777777777777  7777777777777777777     777777777777         777777777777';
  19.  
  20. Line1 := StringReplace(Line1, '7', c, [ rfReplaceAll ]);
  21.  
  22. ClrScr;
  23. writeln(Line1);
  24.  
  25. readln();
  26. end.
Title: Re: Problems compiling with 8086 fpc
Post by: Bart on October 04, 2020, 11:33:53 pm
I answered the first question in your prevous thread about StringReplace (https://forum.lazarus.freepascal.org/index.php/topic,51657.msg379721/topicseen.html#new).

Bart
Title: Re: Problems compiling with 8086 fpc
Post by: toncho11 on October 05, 2020, 09:14:36 am
I got it.

If you have "classes" unit in your code it will never compile with the 8086 fpc.
Title: Re: Problems compiling with 8086 fpc
Post by: PascalDragon on October 05, 2020, 09:21:17 am
To use the Classes unit you need to use another memory model (https://wiki.freepascal.org/DOS#Supported_memory_models). The default is Small.
TinyPortal © 2005-2018