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