Changes

Jump to: navigation, search

SYMBiFACE II:IDE routines

26 bytes removed, 00:07, 26 August 2006
;### IDEADR -> set address
;### Eingabe Input HL=Track, E=Sector, D=SDH (head, drive, mode), B=number of sectors;### Ausgabe Output CF=0 -> ok;### CF=1 -> A=error code (...);### Verändert Destroyed AF,BC
ideadr call ideadr0
ret c
;### IDECMD -> Send command
;### Eingabe Input A=Command;### Verändert Destroyed BC
idecmd ld bc,ideprtsta
out (c),a
;### IDERDY -> Wait, until IDE-drive is ready for command
;### Output CF=0 -> ok, CF=1 -> error (A=code);### Verändert Destroyed AF
iderdy push bc
push hl
;### IDEDRQ -> wait for "Data Request"
;### Output BC=Portnumber of the Status Register;### Verändert Destroyed AF
idedrq ld bc,ideprtsta
idedrq1 in a,(c)
;### IDERED -> read 512Bytes
;### Input HL=destination address;### Output HL=address behind destination;### Verändert Destroyed AF,BC
idered call idedrq
ld bc,ideprtdat
;### IDEWRT -> write 512Bytes
;### Input HL=source address;### Output HL=addresse behind source;### Verändert Destroyed AF,BC
idewrt call idedrq ;wait for ready
ld bc,ideprtdat ;bc=IDE data port
;### IDEERR -> check error status
;### Output CF=0 -> ok (A=0 everthing is fine, A=1 data needed to be corrected),;### CF=1 -> error (A=code, 6=error while read/write, 7=error while positioning, 8=abort, 9=unknown);### Verändert Destroyed BC
ideerr ld bc,ideprtsta
in a,(c)