diff --git a/sys/arch/acorn32/stand/BtNetBSD/pling.BtNetBSD/BtNetBSD b/sys/arch/acorn32/stand/BtNetBSD/pling.BtNetBSD/BtNetBSD index f0aa818b3b82..ba4fd94d2598 100644 --- a/sys/arch/acorn32/stand/BtNetBSD/pling.BtNetBSD/BtNetBSD +++ b/sys/arch/acorn32/stand/BtNetBSD/pling.BtNetBSD/BtNetBSD @@ -1,5 +1,5 @@ REM > BtNetBSD -REM $NetBSD: BtNetBSD,v 1.3 2002/02/11 19:00:07 reinoud Exp $ +REM $NetBSD: BtNetBSD,v 1.4 2002/03/10 01:28:19 reinoud Exp $ REM REM Copyright (c) 2000, 2001, 2002 Reinoud Zandijk REM Copyright (c) 1998, 1999, 2000 Ben Harris @@ -78,6 +78,14 @@ REM get kernel name file$ = LEFT$(args$, INSTR(args$, " ")-1) PRINT"Booting ";file$;" ";args$'' + +IF FNtolower(LEFT$(file$,9))="unixfs:$." THEN + kernelname$=MID$(file$, 10) +ELSE + kernelname$="netbsd" : REM RISC OS file namen zeggen niets XXX +ENDIF + + REM Get some space to mess with REM Declare a large array ... and then wipe it/map it in in the OS_Mem loop REM the difference is that RO4 won't map it in by default and @@ -502,14 +510,14 @@ DEF PROCload_kernel_aout(file%) REM update new header structure new_hdr%!16 = symsize% - + REM mark highest virtual address free in NetBSD's mapping vfreebase% = KERNEL_BASE + nbpp%*relocoff% REM `patch' symbol table stuff ssym% = 0 esym% = 0 - + PROCfinish_relocationtable ENDPROC @@ -671,7 +679,7 @@ DEF PROCnew_configuration_structure ; u_char machine_id[4] EQUD machineId% ; char kernelname[80] - EQUS LEFT$(file$+CHR$0+STRING$(80, " "), 80) + EQUS LEFT$(kernelname$+CHR$0+STRING$(80, " "), 80) ; char args[512] EQUS args$+CHR$0 ]: P% += 512 - LEN(args$+CHR$0): [ OPT opt% @@ -700,7 +708,7 @@ DEF PROCnew_configuration_structure EQUD 0 ; u_int MDFsize EQUD 0 - + ; u_int display_phys EQUD videomem_start% ; u_int display_start @@ -715,10 +723,10 @@ DEF PROCnew_configuration_structure EQUD FNvdu_var(9) ; acorn32 port needs log(bitsperpixel)/log(2) ; u_int framerate EQUD 56 ; XXX why? - + ; char reserved[512] ]: P% += 512: [ OPT opt% - + ; u_int pagesize EQUD nbpp% ; u_int drampages @@ -810,7 +818,7 @@ DEF PROCold_configuration_structure ;vrampages% EQUD totalvrampages% ;kernelname% - EQUS LEFT$(file$+CHR$0+STRING$(80, " "), 80) + EQUS LEFT$(kernelname$+CHR$0+STRING$(80, " "), 80) ;framerate% EQUD 56 ; XXXXX ;machine_id% @@ -1070,7 +1078,7 @@ DEF PROCget_memory_configuration loop% += 64 PROCtwirl ENDWHILE - + IF emulateDRAMsize% > 0 THEN REM emulate HACK DRAM0% = DRAM_addr%(0) @@ -1250,3 +1258,17 @@ DEF FNvdu_var(var%) DEF FNroundup(val%, size%) =val% + (size% - 1) AND NOT (size% - 1) + + +DEF FNtolower(name$) + LOCAL A$, Ch$, i% + FOR i%=1 TO LEN(name$) + Ch$ = LEFT$(name$,1) + IF Ch$>="A" AND Ch$<="Z" THEN + A$ += CHR$(ASC(Ch$)+ASC("a")-ASC("A")) + ELSE + A$ += Ch$ + ENDIF + name$ = MID$(name$, 2) + NEXT += A$