From: <th...@us...> - 2002-12-02 17:24:18
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Source/Core/oslib In directory sc8-pr-cvs1:/tmp/cvs-serv7528/Source/Core/oslib Modified Files: OS.swi Log Message: Added OS_ReadLine32, OS_HeapSort32 and OS_SubstituteArgs32. Index: OS.swi =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Source/Core/oslib/OS.swi,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** OS.swi 28 Nov 2002 13:08:59 -0000 1.9 --- OS.swi 2 Dec 2002 17:24:15 -0000 1.10 *************** *** 609,614 **** "OS_CLI vector")); SWI OS_ReadLine = ! ( NUMBER 0xE "Reads a line from the input stream", ENTRY ( R0 = .Ref .String: buffer, --- 609,621 ---- "OS_CLI vector")); + TYPE OSReadLine_Flags = .Bits; + CONST OSReadLine_GivenEchoCharacter = OSReadLine_Flags: 0x40000000, + OSReadLine_SuppressInvalid = OSReadLine_Flags: 0x80000000, + OSReadLine_EchoCharacter = OSReadLine_Flags: 0xFF, + OSReadLine_EchoCharacterShift = .Int: 0; + SWI OS_ReadLine = ! ( NUMBER 0xE "Reads a line from the input stream - prefer OS_ReadLine32 ! on RISC O S 5+", ENTRY ( R0 = .Ref .String: buffer, *************** *** 627,631 **** SWI OS_ReadLineGivenEcho = ( NUMBER 0xE "Reads a line from the input stream, using the given echo ! character", ENTRY ( R0 # &40000000, --- 634,638 ---- SWI OS_ReadLineGivenEcho = ( NUMBER 0xE "Reads a line from the input stream, using the given echo ! character - use OS_ReadLine32 on RISC O S 5+", ENTRY ( R0 # &40000000, *************** *** 646,650 **** SWI OS_ReadLineSuppressInvalid = ( NUMBER 0xE "Reads a line from the input stream, not echoing invalid ! characters", ENTRY ( R0 # &80000000, --- 653,657 ---- SWI OS_ReadLineSuppressInvalid = ( NUMBER 0xE "Reads a line from the input stream, not echoing invalid ! characters - use OS_ReadLine32 on RISC O S 5+", ENTRY ( R0 # &80000000, *************** *** 664,668 **** SWI OS_ReadLineGivenEchoSuppressInvalid = ( NUMBER 0xE "Reads a line from the input stream, using the given echo ! character and not echoing invalid characters", ENTRY ( R0 # &C0000000, --- 671,676 ---- SWI OS_ReadLineGivenEchoSuppressInvalid = ( NUMBER 0xE "Reads a line from the input stream, using the given echo ! character and not echoing invalid characters - use OS_ReadLine3 ! on RISC O S 5+", ENTRY ( R0 # &C0000000, *************** *** 681,684 **** --- 689,709 ---- ) ); + SWI OS_ReadLine32 = + ( NUMBER 0x7D "Reads a line from the input stream - RISC O S 5+", + ENTRY + ( R0 = .Ref .String: buffer, + R1 = .Int: size, + R2 = .Char: min_char, + R3 = .Char: max_char, + R4 = OSReadLine_Flags: flags + ), + EXIT + ( R0?, + R1 = .Int: used, + R2?, + R3?, + FLAGS! + ) ); + SWI ReadLineV = *************** *** 690,694 **** R3 = .Char: max_char, R4 = .Char: echo, ! R9 # &0E "OS_ReadLine vector" ), EXIT --- 715,738 ---- R3 = .Char: max_char, R4 = .Char: echo, ! R9 # &0E "OS_ReadLine vector - use ReadLine32V on RISC O S 5+" ! ), ! EXIT ! ( R0?, ! R1 = .Int: used, ! R2?, ! R3?, ! FLAGS! ! ) ); ! ! SWI ! ReadLine32V = ! ( NUMBER 0x34, ! ENTRY ! ( R0 = .Ref .String: buffer, ! R1 = .Int: size, ! R2 = .Char: min_char, ! R3 = .Char: max_char, ! R4 = OSReadLine_Flags: flags, ! R9 # &0E "OS_ReadLine vector - RISC O S 5+" ), EXIT *************** *** 1424,1427 **** --- 1468,1474 ---- ); + TYPE OS_SubstituteArgsFlags = .Bits; + CONST OS_SubstituteArgsIgnoreExtras = OS_SubstituteArgsFlags: 0x80000000; + SWI OS_SubstituteArgs = ( NUMBER 0x43 "Substitutes command line arguments", *************** *** 1437,1440 **** --- 1484,1501 ---- ) ); + SWI OS_SubstituteArgs32 = + ( NUMBER 0x7E "Substitutes command line arguments - RISC O S 5+", + ENTRY + ( R0 -> .String: args, + R1 = .Ref .String: buffer, + R2 = .Int: size, + R3 -> .String: source, + R4 = .Int: source_size, + R5 = OS_SubstituteArgsFlags: flags + ), + EXIT + ( R2! = .Int: used + ) ); + SWI OS_PrettyPrint = ( NUMBER 0x44 "Writes a string with some formatting to all of the *************** *** 1581,1591 **** //Flags for OS_HeapSort (set in R1!) CONST ! OS_SortGivenWorkspace = .Bits: 0b100000000000000000000000000000, ! OS_SortBuildArray = .Bits: 0b1000000000000000000000000000000, ! OS_SortObjects = .Bits: 0b10000000000000000000000000000000; SWI OS_HeapSort = ! ( NUMBER 0x4F "Heap-sorts a list of objects", ENTRY ( R0 = .Int: count, --- 1642,1654 ---- //Flags for OS_HeapSort (set in R1!) + TYPE OS_HeapSortFlags; CONST ! OS_SortGivenWorkspace = OS_HeapSortFlags: 0b100000000000000000000000000000, ! OS_SortBuildArray = OS_HeapSortFlags: 0b1000000000000000000000000000000, ! OS_SortObjects = OS_HeapSortFlags: 0b10000000000000000000000000000000; SWI OS_HeapSort = ! ( NUMBER 0x4F "Heap-sorts a list of objects - prefer OS_HeapSort32 ! on RISC O S 5+", ENTRY ( R0 = .Int: count, *************** *** 1596,1599 **** --- 1659,1675 ---- R5 = .Int: object_size, R6 = .Ref Void: workspace + ) ); + + SWI OS_HeapSort32 = + ( NUMBER 0x7F "Heap-sorts a list of objects - RISC O S 5+", + ENTRY + ( R0 = .Int: count, + R1 = .Ref .Int: array, + R2 = OS_SortType: compare_fn, + R3 = .Ref .Data: handle, //should be int, like other handles + R4 = .Ref .Data: objects, + R5 = .Int: object_size, + R6 = .Ref Void: workspace, + R7 = OS_HeapSortFlags: flags ) ); |