Posted Tue Aug 14, 2001 12:18 PM
Posted Tue Aug 14, 2001 1:01 PM
Posted Tue Aug 14, 2001 5:37 PM
Posted Tue Feb 3, 2009 8:19 PM
Posted Tue Feb 3, 2009 9:06 PM
Posted Tue Feb 3, 2009 9:29 PM
candle, on Tue Feb 3, 2009 9:19 PM, said:
Posted Wed Feb 4, 2009 4:45 AM
Posted Fri Feb 6, 2009 9:46 PM
Posted Fri Feb 6, 2009 10:44 PM
LDX #0; X=00 use IOCB #0 LDA #$FF STA $340; make CIO think IOCB #0 is closed LDA #<DEVNAME STA $344 LDA #>DEVNAME STA $345; DEVNAME contains text value of "E:" LDA #$C STA $34A STX $34B; AUX bytes = $C and 00. $C = Open for Input and Output LDA #3 STA $342; Command byte 3 = OPEN JSR $E456; perform call to CIO BMI ERROR; flags reflect Y (status/error code) from CIO ; ; status will be returned in Y Register, should be 01, ; any error condition Y should be >=$80 ; JMP CONTINUE; get on with rest of program DEVNAME .BYTE "E:",$9B ; ; Device name must be delimited by Return character ($9B) ;
Edited by Rybags, Fri Feb 6, 2009 10:45 PM.
Posted Fri Feb 6, 2009 10:54 PM
LDX #0; using IOCB #0 TAY; save A LDA #0 STA $348 STA $349; set Buffer Length to zero = only output what's in A LDA #$B; 11=PUT CHARACTERS TYA JSR $E456 BMI ERROR
Posted Sat Feb 7, 2009 4:06 AM
Posted Sat Feb 7, 2009 4:56 AM
Posted Sat Feb 7, 2009 7:59 AM
candle, on Wed Feb 4, 2009 5:45 AM, said:
Posted Sat Feb 7, 2009 9:03 AM
atariksi, on Tue Feb 3, 2009 10:29 PM, said:
Posted Sat Feb 7, 2009 12:54 PM
Posted Sat Feb 7, 2009 6:04 PM
Posted Sat Feb 7, 2009 6:33 PM
Rybags, on Sun Feb 8, 2009 1:04 AM, said:
Quote
Quote
Posted Sat Feb 7, 2009 6:42 PM
Posted Sat Feb 7, 2009 7:11 PM
Posted Sat Feb 7, 2009 7:18 PM
Posted Sat Feb 7, 2009 7:30 PM
candle, on Sat Feb 7, 2009 8:11 PM, said:
Posted Sat Feb 7, 2009 8:11 PM
//---------------------------------------------------------------------------
void SPI_DOut(byte b)
{
__asm {
mov al,b;
ror al,2;
mov b,al;
}
ClrPortBit(BasePort,6);
SetPortBit(BasePort,0);
SPI_Delay();
ClrPortBit(BasePort,0);
for (int i=0;i<8;i++) {
z=PortIn(BasePort);
__asm {
mov ah,z;
and ah,191;
mov al,b;
and al,64;
or ah,al;
mov z,ah;
}
PortOut(BasePort,z);
SetPortBit(BasePort,0);
SPI_Delay();
ClrPortBit(BasePort,0);
__asm {
mov al,b;
ror al,1;
mov b,al;
}
}
SetPortBit(BasePort,6);
SetPortBit(BasePort,0);
SPI_Delay();
ClrPortBit(BasePort,0);
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
void SPI_Delay()
{
// empty call for delay
}
as for hardware - i'm using spi-flash programmer that you may find on my web page (www.spiflash.org)
Posted Sat Feb 7, 2009 8:15 PM
Edited by candle, Sat Feb 7, 2009 8:23 PM.
Posted Sat Feb 7, 2009 8:36 PM
0 members, 0 guests, 0 anonymous users