Comment = Compiled LIB file, no comment included

Copyright = Mcs Electronics/Vögel Franz Josef
Www = Http://Www.mcselec.com / http://members.aon.at/voegel
Email = Avr@mcselec.com
Comment = Mmc Driver For Avr-dos Compiler Library
Libversion = 2.00
Date = 25 April 2005
Statement = No Source Code From The Library May Be Distributed In Any Form Unless You Have Permision From The Author
Statement = For support please check http://members.aon.at/voegel for contact address
History = No Known Bugs.
[_mmc]
_mmc_send_command:
*BASIC: Reset Mmc_cs                                     ' reset Cs
   rcall _Byte2SPI
.OBJ 2F07
   rcall _Byte2SPI
.OBJ 2F06
   rcall _Byte2SPI
.OBJ 2F05
   rcall _byte2spi
.OBJ 2F04
   rcall _byte2spi
_mmc_getresponse:
.OBJ 931F
.OBJ 932F
.OBJ 2711
.OBJ 2722
.OBJ 94E8
_mmc_getresponse1:
  rcall _Byte2SPI_255
.OBJ 3F0F
  brne _MMC_GetResponse2
.OBJ 5011
.OBJ 4020
  brne _MMC_GetResponse1
.OBJ 9468
_mmc_getresponse2:
.OBJ 912F
.OBJ 911F
.OBJ 2300
.OBJ 9508
_mmc_reset:
*BASIC: Set Mmc_cs                                       ' Set CS HIGH
.OBJ E01A
_mmc_reset_0:
   rcall _Byte2SPI_255
.OBJ 951A
   Brne _MMC_Reset_0
*BASIC: Reset Mmc_cs                                     ' Reset Cs to LOW
.OBJ E400
   rcall _Byte2SPI
   rcall _Byte2SPI_0
   rcall _Byte2SPI_0
   rcall _Byte2SPI_0
   rcall _Byte2SPI_0
.OBJ E905
   rcall _Byte2SPI
.OBJ E614
_mmc_reset1:
   rcall _MMC_GetResponse
.OBJ 3001
   breq _MMC_Reset2
.OBJ 951A
   brne _MMC_Reset1
 * Ldi R25 , Cperrdrivereset
   rjmp _MMC_Exit_Error
_mmc_reset2:
   rjmp _MMC_Exit_Standard
_mmc_init0:
.OBJ E01A
_mmc_init1:
*BASIC: Reset Mmc_cs                                     ' Reset CS
.OBJ E401
   rcall   _Byte2SPI
   rcall   _Byte2SPI_0
   rcall   _Byte2SPI_0
   rcall   _Byte2SPI_0
   rcall   _Byte2SPI_0
   rcall _MMC_GetResponse
   breq _MMC_Init3
_mmc_init2:
   rcall _MMC_Exit_Standard
*BASIC: Waitms 50
.OBJ 951A
   brne _MMC_Init1
 * Ldi R25 , Cperrdriveinit
   rjmp _MMC_Exit_Error
_mmc_init3:
   rjmp _MMC_Exit_Standard
*#IF cMMC_Soft = 1
_byte2spi_255:
.OBJ EF0F
   rjmp _Byte2SPI
_Byte2SPI_0:
.OBJ 2700
_Byte2SPI:
.OBJ 933F
.OBJ 932F
.OBJ 931F
.OBJ 2711
.OBJ E028
_Byte2SPI_Loop:
.OBJ F11
.OBJ F00
   brcs _Byte2SPI_1
 * cbi MMC_PortMOSI, bMMC_MOSI
   rjmp _Byte2SPI_Clock
_Byte2SPI_1:
 * sbi MMC_PortMOSI, bMMC_MOSI
_Byte2SPI_Clock:
 * in r19, MMC_PortMISO
 * sbi MMC_PortSCK, bMMC_SCK
.OBJ 0
.OBJ 0
.OBJ 0
 * cbi MMC_PortSCK, bMMC_SCK
 * sbrc r19, bMMC_MISO
.OBJ 9513
.OBJ 952A
   brne _Byte2SPI_Loop
.OBJ 2F01
.OBJ 911F
.OBJ 912F
.OBJ 913F
.OBJ 9508
*#ELSE
_byte2spi_255:
.OBJ EF0F
   rjmp _Byte2SPI
_byte2spi_0:
.OBJ 2700
_byte2spi:
 * Out Spdr , R16
_byte2spi2:
 * Sbis Spsr , 7
   rjmp _byte2spi2
 * In R16 , Spdr
.OBJ 9508
*#ENDIF
_shift_mmc:
.OBJ 2744
.OBJ 915D
.OBJ 916D
.OBJ 917D
.OBJ F55
.OBJ 1F66
.OBJ 1F77
.OBJ 9508
[_drivereadsector]
_drivereadsector:
_mmc_readsector:
   rcall _DriveClearErrorBytes
   rcall _Shift_MMC
.OBJ E501
   rcall _MMC_Send_Command
   breq _MMC_ReadSector1
 * Ldi R25 , Cperrdrivereadcommand
   rjmp _MMC_Exit_Error
_mmc_readsector1:
   rcall _MMC_GetResponse
.OBJ 3F0E
   breq _MMC_ReadSector2
 * Ldi R25 , Cperrdrivereadresponse
   rjmp _MMC_Exit_Error
_mmc_readsector2:
.OBJ E092
.OBJ 2788
_mmc_readsector3:
   rcall _byte2spi_255
.OBJ 9301
.OBJ 9701
   brne _MMC_ReadSector3
   rcall _byte2spi_255
   rcall _byte2spi_255
   rjmp _MMC_Exit_Standard
[_drivewritesector]
_drivewritesector:
_mmc_writesector:
   rcall _DriveClearErrorBytes
   rcall _Shift_MMC
.OBJ E508
   rcall _MMC_Send_Command
   breq _MMC_WriteSector1
 * Ldi R25 , Cperrdrivewritecommand
   rjmp _MMC_Exit_Error
_mmc_writesector1:
   rcall _byte2spi_255
.OBJ EF0E
   rcall _byte2spi
.OBJ E092
.OBJ 2788
_mmc_writesector2:
.OBJ 9101
   rcall _byte2spi
.OBJ 9701
   brne _MMC_WriteSector2
   rcall _byte2spi_255
   rcall _byte2spi_255
_mmc_writesector3:
   rcall _Byte2SPI_255
.OBJ 710F
   sts {gbDriveDebug}, r16
.OBJ 2711
.OBJ EF2F
_mmc_writesector4:
   rcall _DriveWaitUS10
   rcall _Byte2SPI_255
.OBJ 2300
   brne _MMC_WriteSector5
.OBJ 5011
.OBJ 4020
   brne _MMC_WriteSector4
 * Ldi R25 , Cperrdrivewriteresponse
   rjmp _MMC_Exit_Error
_mmc_writesector5:
   rjmp _MMC_Exit_Standard
[_driveinit]
_driveinit:
_mmc_init:
*#IF cMMC_Soft = 0
*BASIC: Spiinit
*#ENDIF
   rcall _DriveClearErrorBytes
   rcall _MMC_Reset
   brcc _DriveInit1
.OBJ 9508
_driveinit1:
   rjmp _MMC_Init0
[_drivereset]
_drivereset:
   rcall _DriveClearErrorBytes
   rjmp _MMC_Reset
[_drivecheck]
_drivecheck:
   rcall _DriveClearErrorBytes
.OBJ E081
   rjmp _MMC_Exit_Standard1
[_drivegetidentity]
_drivegetidentity:
   rcall _DriveClearErrorBytes
 * Ldi R25 , Cperrdrivenotsupported
   rjmp _driveSetError
_driveclearerrorbytes:
.OBJ 2799
.OBJ 9488
 * Sts {gbdriveerror} , R25
 * Sts {gbdrivestatusreg} , R25
 * Sts {gbdriveerrorreg} , R25
.OBJ 9508
_mmc_exit_standard:
*BASIC: Set Mmc_cs
   rcall _Byte2SPI_255
_mmc_exit_standard1:
.OBJ 2799
.OBJ 9488
.OBJ 9508
_mmc_exit_error:
   rcall _DriveSetError
*BASIC: Set Mmc_cs
   rcall _Byte2SPI_255
.OBJ 9408
.OBJ 9508
_driveseterror:
 * Sts {gbdriveerror} , R25
 * Sts {gbdrivestatusreg} , R16
.OBJ 9408
.OBJ 9508
_DriveWaitUS10:
* ldi r25, ( ( _XTAL * 10 ) / 3000000 )
_DriveWaitUS10a:
.OBJ 959A
  brne _DriveWaitUS10a
.OBJ 9508
[end]
