-
Notifications
You must be signed in to change notification settings - Fork 2
/
DOS33LR.S
38 lines (36 loc) · 889 Bytes
/
DOS33LR.S
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
;qboot DOS 3.3 relocated launcher support
;copyright (c) Peter Ferrie 2016
;assemble using ACME
!cpu 6502
!to "dos33l",plain
;place on sector 1
*=$BF00
firsttrk = $d1 ;user-defined, first track to read
stx sectors
sta address
- sty index + 1
lda xlatsec, y
sta sector
lda #>iocb
ldy #<iocb
jsr $bd00
index ldy #0
iny
tya
and #$0f
tay
bne +
inc track
+ inc address
dec sectors
bne -
rts
sectors !byte $d1
xlatsec !byte 0, 7, $e, 6, $d, 5, $c, 4, $b, 3, $a, 2, 9, 1, 8, $f
iocb !byte 1, $60, 1, 0
track !byte firsttrk
sector !byte $d1
!byte <dct, >dct, 0
address !byte $d1
!byte 0, 0, 1, 0, 0, $60, 1
dct !byte 1, $ef, $d8, 0