Schrijver
| Disk error handling
|
etxmato msx friend Berichten: 14 | Geplaatst: 20 December 2005, 22:50   |
I did some more searching on the internet and tried out a few more things. I can't get disk handling diskkernel 2.x working the same as in 1.x with the above described procedure. i.e. not when I only use _DEFER. Again not sure how I'm suppose to get control back from the diskroutine.
Also found a statement on the following link: http://www.mail-archive.com/msx@stack.nl/msg16656.html
'... Maybe function 064h can only be used in the DOS environment and not in the Disk Basic environment. Answer: That is correct. Under Disk Basic environment you must hook in the classical way.'
Can anyone confirm this?
And if so anyone know how to catch the abort in disk basic environment? |
|
AuroraMSX
 msx master Berichten: 1227 | Geplaatst: 21 December 2005, 13:24   |
msd: Quote:
| I don't use openMSX. 
|
Shame on you! (unless you're on da real thang(TM) of course) ;-) |
|
msd msx professional Berichten: 607 | Geplaatst: 21 December 2005, 13:30   |
Yes I use da real thang(TM).
|
|
zeilemaker54 msx lover Berichten: 97 | Geplaatst: 21 December 2005, 13:39   |
May be you could use the DOS1 kernel style errorhandlers, because they are supported with DOS2 kernel.
(&HF323) = pointer to pointer of the diskerror handler (this sound a bit strange)
(&HF325) = pointer to pointer of the abort handler
So this code installs your own handlers:
ld hl,newerrptr
ld (0F323H),hl
ld hl,newabtptr
ld (0F325H),hl
ret
newerrptr: defw newerrhdl
newabtptr: defw newabthdl
newerrhdl:
; do your actions here
; you could set a flag indicating a error or something like that
; at the end the required action must be suplied in register C
; C = 0 ignore error (bdos function continues and returns to program)
; C = 1 retry
; C = 2 abort program (this
ret
newabthdl:
; do your actions here
; you could restore your stackpointer and continue in your program at a known place
ret
Be carefull: everything after newerrptr MUST be located in page 2 or page 3, because under DiskBasic environment, page 0 and 1 are inaccessable
Futhermore, your software is in page 1 I presume. But a the time both routines are called, the dos kernel is in page 1. So you have to concider this as well.
Hope this helps...
|
|
etxmato msx friend Berichten: 14 | Geplaatst: 21 December 2005, 18:19   |
Thanks a mill!
I had not heard of abort handler pointer at address F325! I will give this a try tonight; I have used F323 before so I think I know what to do.
My SW can be executed from any page; might need to do some changes but it sounds like the above should work.
Thanks again,
Cheers, Marcel.
|
|
etxmato msx friend Berichten: 14 | Geplaatst: 21 December 2005, 19:55   |
Hi Again,
Yes! Excellent. Pointer on F325 works!
I kept the old abort routine just put the correct pointer on F325.
Thanks, Marcel.
|
|
zeilemaker54 msx lover Berichten: 97 | Geplaatst: 11 April 2006, 15:59   |
oeps, wrong topic
|
|
|
|
|