Changeset 7cabd49 in thomson for code/C/HxCHost/pff/diskio.c
- Timestamp:
- Mar 19, 2012, 7:51:49 AM (12 years ago)
- Branches:
- main
- Children:
- fe55aa5
- Parents:
- cc8f3af
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/C/HxCHost/pff/diskio.c
rcc8f3af r7cabd49 96 96 97 97 DRESULT disk_writep ( 98 const BYTE* buff,/* Pointer to the data to be written, NULL:Initiate/Finalize write operation */ 98 const BYTE* buff, 99 /* Pointer to the data to be written, 100 * NULL:Initiate/Finalize write operation */ 99 101 DWORD sc /* Sector number (LBA) or Number of bytes to send */ 100 102 ) 101 103 { 102 104 static WORD ptr; 103 static char *wrbuf[256];105 static char wrbuf[256]; 104 106 // Separate buffer because we need to use map_sector, and it kills secbuf 105 107 … … 114 116 for(;ptr < 512; ++ptr) 115 117 { 116 *(wrbuf + ptr)= 0;118 wrbuf[ptr] = 0; 117 119 } 118 120 … … 126 128 for(int j = 0; j <sc;++j) 127 129 { 128 *(char*)(wrbuf+ptr) = *(char*)(ptr++ + buff); 130 wrbuf[ptr] = *(char*)(j+buff); 131 ++ptr; 129 132 } 133 mon_putc(' '); 130 134 } 131 135
Note:
See TracChangeset
for help on using the changeset viewer.