mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 12:26:58 +02:00
+ implemented console output in the ZX Spectrum RTL. Writeln('Hello, world!'); now works!!! :)
git-svn-id: branches/z80@45129 -
This commit is contained in:
parent
368f4412c4
commit
d970112f26
@ -35,6 +35,13 @@ end;
|
||||
|
||||
function do_write(h:thandle;addr:pointer;len : longint) : longint;
|
||||
begin
|
||||
do_write:=len;
|
||||
while len>0 do
|
||||
begin
|
||||
PrintChar(PChar(addr)^);
|
||||
Inc(addr);
|
||||
Dec(len);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
@ -83,4 +90,5 @@ end;
|
||||
|
||||
function do_isdevice(handle:THandle):boolean;
|
||||
begin
|
||||
do_isdevice:=true;
|
||||
end;
|
||||
|
@ -53,7 +53,7 @@ function KeyPressed: Boolean;
|
||||
implementation
|
||||
|
||||
const
|
||||
LineEnding = #13#10;
|
||||
LineEnding = #13;
|
||||
{ LFNSupport is a variable here, defined below!!! }
|
||||
DirectorySeparator = '\';
|
||||
DriveSeparator = ':';
|
||||
@ -76,7 +76,7 @@ const
|
||||
CtrlZMarksEOF: boolean = true; (* #26 is considered as end of file *)
|
||||
|
||||
sLineBreak = LineEnding;
|
||||
DefaultTextLineBreakStyle : TTextLineBreakStyle = tlbsCRLF;
|
||||
DefaultTextLineBreakStyle : TTextLineBreakStyle = tlbsCR;
|
||||
|
||||
var
|
||||
__heapsize: Word;external name '__heapsize';
|
||||
@ -267,7 +267,6 @@ end;
|
||||
|
||||
procedure SysInitStdIO;
|
||||
begin
|
||||
(* TODO: doesn't work yet...
|
||||
OpenStdIO(Input,fmInput,StdInputHandle);
|
||||
OpenStdIO(Output,fmOutput,StdOutputHandle);
|
||||
OpenStdIO(ErrOutput,fmOutput,StdErrorHandle);
|
||||
@ -275,7 +274,6 @@ begin
|
||||
OpenStdIO(StdOut,fmOutput,StdOutputHandle);
|
||||
OpenStdIO(StdErr,fmOutput,StdErrorHandle);
|
||||
{$endif FPC_STDOUT_TRUE_ALIAS}
|
||||
*)
|
||||
end;
|
||||
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user