For the most part though, Laser DOS is a modified AppleDOS 3.3
Sector skew for AppleDOS is
Code: Select all
0 1 2 3 4 5 6 7 8 9 A B C D E F
0 7 E 6 D 5 C 4 B 3 A 2 9 1 8 F
Code: Select all
0 1 2 3 4 5 6 7 8 9 A B C D E F
0 7 E 6 D 5 C 4 B 3 A 2 9 1 8 F
Code: Select all
10 GOSUB 20000
20 GOSUB 10000
30 T = 17:S = 4
40 GOSUB 30000
50 GOSUB 40000
60 FOR B = 0 TO 255
70 PRINT CHR$ ( PEEK (BP + B));
80 NEXT B
90 END
10000 REM ********************
10010 REM * LASER DOS V1.0
10020 REM * I/O INITIALISE
10030 REM ********************
10040 FOR I = 20208 TO 20253
10050 POKE I,0
10060 NEXT I
10070 POKE 20246,96
10080 POKE 20247,1
10090 POKE 20248,255
10100 POKE 20249,17
10110 CALL 11031
10120 RETURN
19999 :
20000 REM ********************
20010 REM * LOAD SECTOR SWAPS
20020 REM ********************
20030 DIM TS(13)
20040 DATA 0,7,8,6,13,5,12,4,11,3,10,2,9,1
20050 FOR I = 0 TO 13
20060 READ A%
20070 TS(I) = A%
20080 NEXT I
20090 RETURN
29999 :
30000 REM *******************
30010 REM * READ SECTOR
30020 REM *******************
30030 POKE 20255,T
30040 POKE 20256,TS(S)
30050 POKE 20263,1
30060 CALL 11141
30070 RETURN
39999 :
40000 REM ********************
40010 REM * GET BUFFER POINTER
40020 REM ********************
40030 BP = PEEK (63) * 256
40040 BP = BP + PEEK (62)
40050 RETURN
Code: Select all
Offset Detail
---------------
$00 Table type - always $01
$01 Slot number - always $60 (AppleDOS slot $60, here used as X offset)
$02 Drive number - $01 or $02 - default to $01
$03 Volume number - $FF == any volume
$04 Track number - $00 to $27
$05 Sector number - $00 to $0D - Translated format
$06-$07 Device Character Table - set by ROM to $2FAC - see next
$08-$09 Buffer pointer - 256 byte data buffer
$0A Unused - always $00
$0B Byte count of partial sector ($00==256)
$0C Command codes $00 = SEEK, $01 = READ, $02 = WRITE, $04 = FORMAT
$0D Return codes $00 = No Error, $08 = Error initialising, $10 = Write Protect Error, $20 = Volume mismatch Error, $40 = Drive Error, $80 = Read Error
$0E Volume last accessed - Set by DIR
$0F Slot number of last access - always $60
$10 Drive number of last access
Device Characteristics Table at ROM $2FAC
Offset Detail
---------------
$00 Device type - ROM has $00 == Apple Disk II :)
$01 Phases per track - ROM has $01
$02-$03 Motor on time count - ROM has $D8EF - same as Apple Disk II :)
Code: Select all
5 REM *** Open and write to file TEST"
10 DISK "OPEN TEST"
20 DISK "WRITE TEST"
30 PRINT "HOME": PRINT "DIR
40 DISK "CLOSE TEST"
55 REM *** Read back data as test
50 DISK "OPEN TEST"
60 DISK "READ TEST,B0"
70 INPUT A$
80 INPUT A$
90 DISK "CLOSE TEST"
Code: Select all
10010 PRINT CHR$ (5)"sssssssssssssssssssssssssssssssssssss" TAB( 34)"s";
10100 PRINT "s g g g g g g ebbd eded ebbl s";
10110 PRINT "s a a ebbd ebbd a a aaaa a s";
10120 PRINT "s aebc a a a a aebc afca a s";
10130 PRINT "s afd abba abba afd a a abbl s";
10140 PRINT "s a fd a a a a a fd a a a s";
10150 PRINT "s k h h k h k k h h k fbbl s";
10160 PRINT "s" TAB( 34)"s";
10200 PRINT "ssssssssssssssssssssssssssssssssssss"
10210 PRINT " (C) 1984 SALORA OY "
10220 PRINT "ssssssssssssssssssssssssssssssssssss"