mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-30 12:20:19 +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;
|
function do_write(h:thandle;addr:pointer;len : longint) : longint;
|
||||||
begin
|
begin
|
||||||
|
do_write:=len;
|
||||||
|
while len>0 do
|
||||||
|
begin
|
||||||
|
PrintChar(PChar(addr)^);
|
||||||
|
Inc(addr);
|
||||||
|
Dec(len);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -83,4 +90,5 @@ end;
|
|||||||
|
|
||||||
function do_isdevice(handle:THandle):boolean;
|
function do_isdevice(handle:THandle):boolean;
|
||||||
begin
|
begin
|
||||||
|
do_isdevice:=true;
|
||||||
end;
|
end;
|
||||||
|
@ -53,7 +53,7 @@ function KeyPressed: Boolean;
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
const
|
const
|
||||||
LineEnding = #13#10;
|
LineEnding = #13;
|
||||||
{ LFNSupport is a variable here, defined below!!! }
|
{ LFNSupport is a variable here, defined below!!! }
|
||||||
DirectorySeparator = '\';
|
DirectorySeparator = '\';
|
||||||
DriveSeparator = ':';
|
DriveSeparator = ':';
|
||||||
@ -76,7 +76,7 @@ const
|
|||||||
CtrlZMarksEOF: boolean = true; (* #26 is considered as end of file *)
|
CtrlZMarksEOF: boolean = true; (* #26 is considered as end of file *)
|
||||||
|
|
||||||
sLineBreak = LineEnding;
|
sLineBreak = LineEnding;
|
||||||
DefaultTextLineBreakStyle : TTextLineBreakStyle = tlbsCRLF;
|
DefaultTextLineBreakStyle : TTextLineBreakStyle = tlbsCR;
|
||||||
|
|
||||||
var
|
var
|
||||||
__heapsize: Word;external name '__heapsize';
|
__heapsize: Word;external name '__heapsize';
|
||||||
@ -267,7 +267,6 @@ end;
|
|||||||
|
|
||||||
procedure SysInitStdIO;
|
procedure SysInitStdIO;
|
||||||
begin
|
begin
|
||||||
(* TODO: doesn't work yet...
|
|
||||||
OpenStdIO(Input,fmInput,StdInputHandle);
|
OpenStdIO(Input,fmInput,StdInputHandle);
|
||||||
OpenStdIO(Output,fmOutput,StdOutputHandle);
|
OpenStdIO(Output,fmOutput,StdOutputHandle);
|
||||||
OpenStdIO(ErrOutput,fmOutput,StdErrorHandle);
|
OpenStdIO(ErrOutput,fmOutput,StdErrorHandle);
|
||||||
@ -275,7 +274,6 @@ begin
|
|||||||
OpenStdIO(StdOut,fmOutput,StdOutputHandle);
|
OpenStdIO(StdOut,fmOutput,StdOutputHandle);
|
||||||
OpenStdIO(StdErr,fmOutput,StdErrorHandle);
|
OpenStdIO(StdErr,fmOutput,StdErrorHandle);
|
||||||
{$endif FPC_STDOUT_TRUE_ALIAS}
|
{$endif FPC_STDOUT_TRUE_ALIAS}
|
||||||
*)
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user