]> cloudbase.mooo.com Git - z180-stamp.git/blobdiff - avr/z180-serv.c
Code clean up
[z180-stamp.git] / avr / z180-serv.c
index f55b7a8c681858e2610aacce0431c8ab04857285..0ce6b9bc51b587be5bb531bdf01cabde8b0a5d41 100644 (file)
@@ -399,6 +399,7 @@ static const FLASH char * const FLASH rc_messages[] = {
                        FSTR("Access byond disk size"),                         /* 04 */
                        FSTR("Write protect"),                                          /* 05 */
                        FSTR("No media"),                                                       /* 06 */
+                       FSTR("R/W address == 0 !!!!"),                          /* 07 */
                };
 
 void msg_cpm_result(uint8_t subf, uint8_t rc, int res)
@@ -530,6 +531,10 @@ void do_msg_cpm_rw(uint8_t subf, int len, uint8_t * msg)
        drv_debug(MIDDLE, PSTR(" T:%4d, S:%2d, cnt:%2d, lba: %.8lx, addr: %.5lx"),
                                track, sec, secs, pos, addr);
 
+       if (addr == 0) {
+               return msg_cpm_result(subf, 0x07, res);
+       }
+
        if (dowrite && dp->opt & DRV_OPT_RO) {
                return msg_cpm_result(subf, 0x05, res);
        }