|
@@ -1,3 +1,6 @@
|
|
|
|
+{ %OPT=-Sew }
|
|
|
|
+{ the -Sew causes the compilation to fail if the target supports only unsigned numbers as count for move/fillchar }
|
|
|
|
+
|
|
{ This unit tests the basic routines }
|
|
{ This unit tests the basic routines }
|
|
{ which are usually coded in assembler }
|
|
{ which are usually coded in assembler }
|
|
{ Mainly used in porting to other processors }
|
|
{ Mainly used in porting to other processors }
|
|
@@ -30,8 +33,6 @@ begin
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
procedure test_fillchar;
|
|
procedure test_fillchar;
|
|
var
|
|
var
|
|
i: integer;
|
|
i: integer;
|
|
@@ -63,6 +64,8 @@ procedure test_fillchar;
|
|
for i := 1 to MAX_TABLE do
|
|
for i := 1 to MAX_TABLE do
|
|
test(dst_arraybyte[i], DEFAULT_VALUE);
|
|
test(dst_arraybyte[i], DEFAULT_VALUE);
|
|
writeln('Passed!');
|
|
writeln('Passed!');
|
|
|
|
+{$ifndef CPUI8086}
|
|
|
|
+ { i8086 uses word as the count parameter for fillchar }
|
|
{ test negative fillchar count }
|
|
{ test negative fillchar count }
|
|
write('testing fillchar (negative count)...');
|
|
write('testing fillchar (negative count)...');
|
|
for i := 1 to MAX_TABLE do
|
|
for i := 1 to MAX_TABLE do
|
|
@@ -71,6 +74,7 @@ procedure test_fillchar;
|
|
for i := 1 to MAX_TABLE do
|
|
for i := 1 to MAX_TABLE do
|
|
test(dst_arraybyte[i], DEFAULT_VALUE);
|
|
test(dst_arraybyte[i], DEFAULT_VALUE);
|
|
writeln('Passed!');
|
|
writeln('Passed!');
|
|
|
|
+{$endif CPUI8086}
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
@@ -113,10 +117,13 @@ begin
|
|
for i:= 1 to MAX_TABLE do
|
|
for i:= 1 to MAX_TABLE do
|
|
test(dst_arraybyte[i], DEFAULT_VALUE);
|
|
test(dst_arraybyte[i], DEFAULT_VALUE);
|
|
writeln('Passed!');
|
|
writeln('Passed!');
|
|
|
|
+{$ifndef CPUI8086}
|
|
|
|
+ { i8086 uses word as the count parameter for fillchar }
|
|
{ negative move count }
|
|
{ negative move count }
|
|
write('testing move (negative count)...');
|
|
write('testing move (negative count)...');
|
|
move(src_arraybyte,dst_arraybyte,-12);
|
|
move(src_arraybyte,dst_arraybyte,-12);
|
|
writeln('Passed!');
|
|
writeln('Passed!');
|
|
|
|
+{$endif CPUI8086}
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|