; Startup-sequence for OS 3.1 booting on hard disk
; We first make some assignments for DH2: since we have booted on DH0:
DH2:C/assign C: DH2:C
C:assign SYS: DH2:
C:assign S: SYS:S
C:assign LIBS: SYS:LIBS DH0:MUI/Libs DH0:Libs ; MUI libraries are included
C:assign DEVS: SYS:Devs
C:assign FONTS: SYS:Fonts
C:assign L: SYS:L

; The official OS 3.1 startup-sequence follows
C:SetPatch QUIET

C:Version >NIL:
C:AddBuffers >NIL: DF0: 15
FailAt 21

C:MakeDir RAM:T RAM:Clipboards RAM:ENV RAM:ENV/Sys
C:Copy >NIL: ENVARC: RAM:ENV ALL NOREQ

Resident >NIL: C:Assign PURE
Resident >NIL: C:Execute PURE

Assign >NIL: ENV: RAM:ENV
Assign >NIL: T: RAM:T
Assign >NIL: CLIPS: RAM:Clipboards
Assign >NIL: REXX: S:
Assign >NIL: PRINTERS: DEVS:Printers
Assign >NIL: KEYMAPS: DEVS:Keymaps
Assign >NIL: LOCALE: SYS:Locale
Assign >NIL: LIBS: SYS:Classes ADD
Assign >NIL: HELP: LOCALE:Help DEFER

BindDrivers
C:Mount >NIL: DEVS:DOSDrivers/~(#?.info)

IF EXISTS DEVS:Monitors
  IF EXISTS DEVS:Monitors/VGAOnly
    DEVS:Monitors/VGAOnly
  EndIF

  C:List >NIL: DEVS:Monitors/~(#?.info|VGAOnly) TO T:M LFORMAT "DEVS:Monitors/%s"
  Execute T:M
  C:Delete >NIL: T:M
EndIF

SetEnv Language "english"
SetEnv Workbench $Workbench
SetEnv Kickstart $Kickstart
UnSet Workbench
UnSet Kickstart

C:AddDataTypes REFRESH QUIET
C:IPrefs
C:ConClip

Path >NIL: RAM: C: SYS:Utilities SYS:Rexxc SYS:System S: SYS:Prefs SYS:WBStartup SYS:Tools SYS:Tools/Commodities

; For RTG mode
IF EXISTS SYS:Storage/Picasso96
  Assign Picasso96: "SYS:Storage/Picasso96"
EndIF

Resident Execute REMOVE
Resident Assign REMOVE

; We increase the stack size for clib2 (mandatory if libunix is used)
C:stack 16384
