-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
drive.z80
51 lines (38 loc) · 766 Bytes
/
drive.z80
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
39
40
41
42
43
44
45
46
47
48
49
50
51
;; drive.z80 - Verify we can read / change the drive number
ORG 0x0100
; start
call show_drive
; change
ld a, 3
call set_drive
call show_drive
ld a, 0xff
call set_drive
call show_drive
;; Exit
ld c, 0x00
call 0x0005
;; Change to the drive in A
set_drive:
ld c, 0x0E
call 0x0005
ret
;; Get the current drive and show it
show_drive:
ld c, 0x19
call 0x0005
; A should have the drive number 0 means A, 1 for B, etc
add a,'A'
; Show drive
ld e,a
ld c, 0x02
call 0x0005
; Show ":"
ld e,':'
ld c, 0x02
call 0x0005
; newline
ld e, 0x0a
ld c, 0x02
call 0x0005
ret