2 ; Oliver Schmidt, 2012-09-04
4 ; unsigned char getfirstdevice (void);
5 ; unsigned char __fastcall__ getnextdevice (unsigned char device);
8 .export _getfirstdevice
11 .import opencmdchannel
12 .import closecmdchannel
16 ;------------------------------------------------------------------------------
23 ;------------------------------------------------------------------------------
32 ; [open|close]cmdchannel already call isdisk internally but they
33 ; interpret a non-disk as a no-op while we need to interpret it
39 ; [open|close]cmdchannel don't call into the Kernal at all if they
40 ; only [in|de]crement the reference count of the shared cmdchannel
41 ; so we need to explicitly initialize ST here
52 ; As we had to reference ST above anyway we can as well do so
53 ; here too (instead of calling READST)
57 ; Either the Kernal calls above were successfull or there was
58 ; already a cmdchannel to the device open - which is a pretty
59 ; good indication of its existence ;-)