Checking Apple DOS From BASIC
How can an Apple II BASIC program check to see which operating system is running?
There are quite a few differences between DOS 3.3 and ProDOS, but with a little care, a BASIC program can run under either operating system. You can tell which system is active by PEEKing memory location 48640. This is the start of the BASIC System Global Page in ProDOS, and contains operating system variables which a BASIC programmer might want to read or change. Since the page begins with a machine language JMP (jump) instruction, this first byte has a value of 76 under ProDOS. When you use DOS 3.3, the same byte contains 208. Here's a simple routine that does what you want:
10 IF PEEK(48640)=76 THEN PRINT "PRODOS INSTALLED":GOTO 30 20 PRINT "DOS 3.3 INSTALLED" 30 REM PROGRAM CONTINUES HERE