mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 12:39:24 +02:00
+ added write/writeln helpers in the RTL for writing longints/longwords on 16/8-bit CPUs
git-svn-id: branches/i8086@24006 -
This commit is contained in:
parent
44ef72e1a4
commit
697de721ef
@ -358,6 +358,12 @@ procedure fpc_write_text_int64(len : longint;var t : text;i : int64); compilerpr
|
|||||||
procedure fpc_write_text_qword_iso(len : longint;var t : text;q : qword); compilerproc;
|
procedure fpc_write_text_qword_iso(len : longint;var t : text;q : qword); compilerproc;
|
||||||
procedure fpc_write_text_int64_iso(len : longint;var t : text;i : int64); compilerproc;
|
procedure fpc_write_text_int64_iso(len : longint;var t : text;i : int64); compilerproc;
|
||||||
{$endif CPU64}
|
{$endif CPU64}
|
||||||
|
{$if defined(CPU16) or defined(CPU8)}
|
||||||
|
procedure fpc_write_text_longword(len : longint;var t : text;q : longword); compilerproc;
|
||||||
|
procedure fpc_write_text_longint(len : longint;var t : text;i : longint); compilerproc;
|
||||||
|
procedure fpc_write_text_longword_iso(len : longint;var t : text;q : longword); compilerproc;
|
||||||
|
procedure fpc_write_text_longint_iso(len : longint;var t : text;i : longint); compilerproc;
|
||||||
|
{$endif CPU16 or CPU8}
|
||||||
{$ifndef FPUNONE}
|
{$ifndef FPUNONE}
|
||||||
Procedure fpc_Write_Text_Float(rt,fixkomma,Len : Longint;var t : Text;r : ValReal); compilerproc;
|
Procedure fpc_Write_Text_Float(rt,fixkomma,Len : Longint;var t : Text;r : ValReal); compilerproc;
|
||||||
Procedure fpc_Write_Text_Float_Iso(rt,fixkomma,Len : Longint;var t : Text;r : ValReal); compilerproc;
|
Procedure fpc_Write_Text_Float_Iso(rt,fixkomma,Len : Longint;var t : Text;r : ValReal); compilerproc;
|
||||||
|
@ -893,6 +893,61 @@ end;
|
|||||||
|
|
||||||
{$endif CPU64}
|
{$endif CPU64}
|
||||||
|
|
||||||
|
{$if defined(CPU16) or defined(CPU8)}
|
||||||
|
procedure fpc_write_text_longword(len : longint;var t : text;q : longword); iocheck; compilerproc;
|
||||||
|
var
|
||||||
|
s : string;
|
||||||
|
begin
|
||||||
|
if (InOutRes<>0) then
|
||||||
|
exit;
|
||||||
|
str(q,s);
|
||||||
|
write_str(len,t,s);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure fpc_write_text_longint(len : longint;var t : text;i : longint); iocheck; compilerproc;
|
||||||
|
var
|
||||||
|
s : string;
|
||||||
|
begin
|
||||||
|
if (InOutRes<>0) then
|
||||||
|
exit;
|
||||||
|
str(i,s);
|
||||||
|
write_str(len,t,s);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure fpc_write_text_longword_iso(len : longint;var t : text;q : longword); iocheck; compilerproc;
|
||||||
|
var
|
||||||
|
s : string;
|
||||||
|
begin
|
||||||
|
if (InOutRes<>0) then
|
||||||
|
exit;
|
||||||
|
str(q,s);
|
||||||
|
{ default value? }
|
||||||
|
if len=-1 then
|
||||||
|
len:=11
|
||||||
|
else if len<length(s) then
|
||||||
|
len:=length(s);
|
||||||
|
write_str_iso(len,t,s);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure fpc_write_text_longint_iso(len : longint;var t : text;i : longint); iocheck; compilerproc;
|
||||||
|
var
|
||||||
|
s : string;
|
||||||
|
begin
|
||||||
|
if (InOutRes<>0) then
|
||||||
|
exit;
|
||||||
|
str(i,s);
|
||||||
|
{ default value? }
|
||||||
|
if len=-1 then
|
||||||
|
len:=11
|
||||||
|
else if len<length(s) then
|
||||||
|
len:=length(s);
|
||||||
|
write_str_iso(len,t,s);
|
||||||
|
end;
|
||||||
|
{$endif CPU16 or CPU8}
|
||||||
|
|
||||||
{$ifndef FPUNONE}
|
{$ifndef FPUNONE}
|
||||||
Procedure fpc_Write_Text_Float(rt,fixkomma,Len : Longint;var t : Text;r : ValReal); iocheck; compilerproc;
|
Procedure fpc_Write_Text_Float(rt,fixkomma,Len : Longint;var t : Text;r : ValReal); iocheck; compilerproc;
|
||||||
var
|
var
|
||||||
|
Loading…
Reference in New Issue
Block a user