+ implemented console output in the ZX Spectrum RTL. Writeln('Hello, world!'); now works!!! :)

git-svn-id: branches/z80@45129 -
This commit is contained in:
nickysn 2020-04-26 22:18:23 +00:00
parent 368f4412c4
commit d970112f26
2 changed files with 10 additions and 4 deletions

View File

@ -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;

View File

@ -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