From: Tony v. d. H. <to...@us...> - 2004-05-03 15:04:19
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Source/Core/oslib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13995/!OsLib/Source/Core/oslib Modified Files: .cvsignore OSChangeDynamicAreaNoFail.asm OSReadVarValSize.asm Added Files: AMUmakefile GNUmakefile Make,fd7 Modules Removed Files: !Clean,fd7 !Make,fd7 !copysrc Makefile,fe1 Log Message: merged Unix-Build back into trunk (20040503-1) Index: .cvsignore =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Source/Core/oslib/.cvsignore,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** .cvsignore 29 Dec 2003 11:40:18 -0000 1.5 --- .cvsignore 3 May 2004 15:03:27 -0000 1.6 *************** *** 17,20 **** --- 17,21 ---- *.o *.o,* + *.o32 *.o32,* *.s --- !copysrc DELETED --- --- !Clean,fd7 DELETED --- --- NEW FILE: GNUmakefile --- # OSLib/Source/Core/oslib/GNUmakefile TV 20040119 # # SOURCEDIR = ../.. TARGET = Core include Modules include ${SOURCEDIR}/GNUmakefile.source #------------------------------------------------------------------------ #.PHONY: ${OSLIB32} ${OSLIB} REPLACE = \ l/OSHeap/0x00010.001.o \ l/OSHeap/0x00010x.001.o \ l/OS/0x00020.000.o \ l/OS/0x00020x.000.o \ l/OS/0x00020.001.o \ l/OS/0x00020x.001.o #------------------------------------------------------------------------ ${OSLIB}: ${LIBS} ${HDRS} ${OBJS} -${LIBFILE} -d ${OSLIB} ${REPLACE} ${LIBFILE} -i ${OSLIB} ${OBJS} ${OSLIB32}: ${LIBS32} ${HDRS} ${OBJS32} -${LIBFILE} -d ${OSLIB32} ${REPLACE} ${LIBFILE} -i ${OSLIB32} ${OBJS32} #------------------------------------------------------------------------ #------------------------------------------------------------------------ --- NEW FILE: Modules --- #Source/Core/oslib/Modules # # modules containing SWIs SWIMODULES += \ BlendTable \ Buffer \ Cache \ ColourMap \ ColourTrans \ Debugger \ DMA \ FPEmulator \ HAL \ IIC \ InverseTable \ MessageTrans \ OS \ OSByte \ OSHeap \ OSModule \ OSReadSysInfo \ OSSpriteOp \ OSWord \ PCI \ Podule \ Portable \ ScreenBlanker \ ScreenModes \ ServiceInternational \ SharedCLibrary \ Sound \ Squash \ Territory # modules with no SWIs MODULES += \ Shell # modules defined other than by SWI definition CMODULES += \ OSChangeDynamicAreaNoFail \ OSHeapResizeNoFail \ OSReadVarValSize \ XOSChangeDynamicAreaNoFail \ XOSHeapResizeNoFail \ XOSReadVarValSize Index: OSReadVarValSize.asm =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Source/Core/oslib/OSReadVarValSize.asm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** OSReadVarValSize.asm 28 Mar 2004 10:34:00 -0000 1.6 --- OSReadVarValSize.asm 3 May 2004 15:03:27 -0000 1.7 *************** *** 1,91 **** ! ;os_read_var_val_size - return length of a variable ! ; Initial Release 23-Mar-99 Tony van der Hoff ! ! ;OSLib---efficient, type-safe, transparent, extensible, ! ; register-safe A P I coverage of RISC O S ! ; ! ; OSLib is free software; you can redistribute it and/or modify ! ;it under the terms of the GNU General Public Licence as published by ! ;the Free Software Foundation; either version 1, or (at your option) ! ;any later version. ! ; ! ; OSLib is distributed in the hope that it will be useful, ! ;but WITHOUT ANY WARRANTY; without even the implied warranty of ! ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! ;GNU General Public License for more details. ! ; ! ; You should have received a copy of the GNU General Public Licence ! ;along with this programme; if not, write to the Free Software ! ;Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. ! ! ; This code works around the RO3 infelicity which causes OS_ReadVarVal to return an error ! ; when R2 bit 31 is set to read the variable length. The object code is patched into the ! ; library at build time by the MakeFile ! ! GET oslib/Types.Hdr ! ! EXPORT os_read_var_val_size ! ! AREA |SWI$$Code|, CODE, READONLY, PIC ! ! ; os_Read_var_val_size ! ; APCS Compliant ! ;Entry R0 (a1) -> name of a variable (may be wildcarded) ! ; R1 (a2) -> context pointer for wildcarded names ! ; R2 (a3) = variable type (os_VARTYPE_EXPANDED or 0) ! ; R3 (a4) -> integer to contain result = NOT length of variable value; 0 if not found ! ; R4 (v1) -> integer to contain variable type ! ;Exit R = updated context pointer ! ; ! ; C Prototype: ! ;extern int os_read_var_val_size ( ! ; char const *var, ! ; int context, ! ; os_var_type var_type, ! ; int *used, ! ; os_var_type *var_type_out); ! ! ; C prototype: int xos_read_var_val_size( char const *name, ! ; int *context, ! ; os_var_type var_type ! ; ); ! ; ! ; ! ! os_read_var_val_size ROUT ! STMFD SP!, {A4, V1} ! MOV R4, A3 ; variable type ! MOV R3, A2 ; context in ! MOV R2, #&80000000 ; check variable ! MOV R1, #0 ; unused ! SWI &20023 ; XOS_ReadVarVal ! BVC %90 ; no error ! ! ;Ignore error if RO 3 or later ! STMFD SP!, {R0, R2} ; keep results ! MOV R0, #129 ; Get OS version ! MOV R1, #0 ! MOV R2, #&FF ! SWI &6 ; OS_Byte ! LDMFD SP!, {R0, R2} ; restore state ! CMP R1, #&A3 ; test for RISC O S 3 ! SWILO &2B ; RO2 - call OS_GenerateError ! ! 90 LDR IP, [SP, #0] ; Result pointer ! TEQ IP, #0 ! STRNE R2, [IP] ; update result ! LDR IP, [SP, #8] ; var-type out pointer ! TEQ IP, #0 ! STRNE R4, [IP] ; update var type ! MOV R, R3 ; new context ! ! 99 ADD SP, SP, #4 ; flatten stack ! LDMFD SP!, {V1} ; restore state ! ! [ {CONFIG} = 32 ! MOV PC, LR ! | ! MOVS PC, LR ; exit ! ] ! ! END --- 1,91 ---- ! ;os_read_var_val_size - return length of a variable ! ; Initial Release 23-Mar-99 Tony van der Hoff ! ! ;OSLib---efficient, type-safe, transparent, extensible, ! ; register-safe A P I coverage of RISC O S ! ; ! ; OSLib is free software; you can redistribute it and/or modify ! ;it under the terms of the GNU General Public Licence as published by ! ;the Free Software Foundation; either version 1, or (at your option) ! ;any later version. ! ; ! ; OSLib is distributed in the hope that it will be useful, ! ;but WITHOUT ANY WARRANTY; without even the implied warranty of ! ;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! ;GNU General Public License for more details. ! ; ! ; You should have received a copy of the GNU General Public Licence ! ;along with this programme; if not, write to the Free Software ! ;Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, U S A. ! ! ; This code works around the RO3 infelicity which causes OS_ReadVarVal to return an error ! ; when R2 bit 31 is set to read the variable length. The object code is patched into the ! ; library at build time by the MakeFile ! ! GET oslib/Types.Hdr ! ! EXPORT os_read_var_val_size ! ! AREA |SWI$$Code|, CODE, READONLY, PIC ! ! ; os_Read_var_val_size ! ; APCS Compliant ! ;Entry R0 (a1) -> name of a variable (may be wildcarded) ! ; R1 (a2) -> context pointer for wildcarded names ! ; R2 (a3) = variable type (os_VARTYPE_EXPANDED or 0) ! ; R3 (a4) -> integer to contain result = NOT length of variable value; 0 if not found ! ; R4 (v1) -> integer to contain variable type ! ;Exit R = updated context pointer ! ; ! ; C Prototype: ! ;extern int os_read_var_val_size ( ! ; char const *var, ! ; int context, ! ; os_var_type var_type, ! ; int *used, ! ; os_var_type *var_type_out); ! ! ; C prototype: int xos_read_var_val_size( char const *name, ! ; int *context, ! ; os_var_type var_type ! ; ); ! ; ! ; ! ! os_read_var_val_size ROUT ! STMFD SP!, {A4, V1} ! MOV R4, A3 ; variable type ! MOV R3, A2 ; context in ! MOV R2, #&80000000 ; check variable ! MOV R1, #0 ; unused ! SWI &20023 ; XOS_ReadVarVal ! BVC %90 ; no error ! ! ;Ignore error if RO 3 or later ! STMFD SP!, {R0, R2} ; keep results ! MOV R0, #129 ; Get OS version ! MOV R1, #0 ! MOV R2, #&FF ! SWI &6 ; OS_Byte ! LDMFD SP!, {R0, R2} ; restore state ! CMP R1, #&A3 ; test for RISC O S 3 ! SWILO &2B ; RO2 - call OS_GenerateError ! ! 90 LDR IP, [SP, #0] ; Result pointer ! TEQ IP, #0 ! STRNE R2, [IP] ; update result ! LDR IP, [SP, #8] ; var-type out pointer ! TEQ IP, #0 ! STRNE R4, [IP] ; update var type ! MOV R, R3 ; new context ! ! 99 ADD SP, SP, #4 ; flatten stack ! LDMFD SP!, {V1} ; restore state ! ! [ {CONFIG} = 32 ! MOV PC, LR ! | ! MOVS PC, LR ; exit ! ] ! ! END Index: OSChangeDynamicAreaNoFail.asm =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Source/Core/oslib/OSChangeDynamicAreaNoFail.asm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** OSChangeDynamicAreaNoFail.asm 28 Mar 2004 10:34:00 -0000 1.4 --- OSChangeDynamicAreaNoFail.asm 3 May 2004 15:03:27 -0000 1.5 *************** *** 2,6 **** ; os_change_dynamic_area_no_fail - Extend or shrink dynamic area without throwing error if ; the change was only partially performed ! ; Initial Release 08-Nov-01 Tony van der Hoff ; Bug fix 21-Dec-01 TV --- 2,6 ---- ; os_change_dynamic_area_no_fail - Extend or shrink dynamic area without throwing error if ; the change was only partially performed ! ; Initial Release 08-Nov-01 Tony van der Hoff ; Bug fix 21-Dec-01 TV --- NEW FILE: Make,fd7 --- | OSLib.Source.Core.oslib.!Make TV 20031228 | SetEval Make$Dir Obey$Dir SetEval OSLib$Slot 2*1024 Do WIMPSlot -min <OSLib$Slot>K Do WIMPSlot -max <OSLib$Slot>K AMU -D -f <Make$Dir>.Makefile -desktop %0 --- NEW FILE: AMUmakefile --- # OSLib.Source.Core.oslib.Makefile TV 20031228 # include ${MAKEFILEDIR}.Modules #include the global definitions afther the local ones # to allow the latter to be recognised include <OSLib$SourceDir>.AMUmakefile/inc # local targets .PHONY: core libs libs32 core: all @echo libs: ${OSLIB} @echo libs32: ${OSLIB32} @echo REPLACE = \ l.OSHeap.0x00010.o.001 \ l.OSHeap.0x00010x.o.001 \ l.OS.0x00020.o.000 \ l.OS.0x00020x.o.000 \ l.OS.0x00020.o.001 \ l.OS.0x00020x.o.001 ${OSLIB}: ${OBJS} ${LIBS} ${HDRS} -${LIBFILE} -d ${OSLIB} ${REPLACE} ${LIBFILE} -i -o ${OSLIB} ${OBJS} ${OSLIB32}: ${OBJS32} ${LIBS32} ${HDRS} -${LIBFILE} -d ${OSLIB32} ${REPLACE} ${LIBFILE} -i -o ${OSLIB32} ${OBJS32} --- !Make,fd7 DELETED --- --- Makefile,fe1 DELETED --- |