Error handling in TR-DOS
ZXNet echo conference «real.speccy»
From Waldemar Krigen → To All 4 December 2002
ў╚ў, All!
Please help in any way you can:
Has anyone encountered the handling of the READ ONLY (WRITE PROTECT) error when calling
the system interpreter with function #0B (file creation)?
In Fedin’s book on TR-DOS it is written about a bug in the handling of this particular error (the code is not installed errors in the battery).
How to “bypass” this?
That seems to be all. Packeda!
deadie.horrorsoft.cpu [real][6912][hrwI][ampack] i speccy
From Kirill Frolov → To All 5 December 2002
04 Dec 02 16:27, Waldemar Krigen wrote to All:
WK> Has anyone encountered error handling READ ONLY (WRITE PROTECT)
WK> when
WK> calling the system interpreter with function #0B (file creation)? In Fedin's book on TR-DOS, Fedin writes about a bug in the processing of this particular error (the error code in the battery is not set). How to "bypass" this
WK>?
The error code is stored in some TR-DOS variable. Before the call, put it in
it, and then check it.
From Vassili Klimov → To All 6 December 2002
WK> Has anyone encountered the processing of the READ ONLY (WRITE PROTECT) error when
WK> calling the system interpreter with function #0B (file creation)?
WK> In Fedin's book on TR-DOS it is written about a bug in the processing of precisely
WK> this error (the error code is not set in the battery).
WK> How is this “bypass”?
I, to be honest, don’t quite understand, but usually they handle all errors like this: at address 23746 (I don’t remember in hex...) they put a jumper on their own
handler, there they check the address lying on the stack, and if it is equal to
3435dec (CLS), then they call their own handler. It looks something like this:
org 23746:jp test
org xyz
ld (error+1),sp:jp #3d13
test ex (sp),hl:push af:ld a,h:cp clsH: jr nz,exit:ld a,l:cp clsL:jr z,error
exit pop af:ex (sp),hl:ret
error ld sp,#3131:ld a,(err_code)
etc. I advise you to watch, for example, real commander, it’s done exactly like that.
pokedova Waldemar
jtn\\4d