📄 ide_test.lst
字号:
C51 COMPILER V7.00 IDE_TEST 01/02/2004 02:44:04 PAGE 1
C51 COMPILER V7.00, COMPILATION OF MODULE IDE_TEST
OBJECT MODULE PLACED IN IDE_TEST.OBJ
COMPILER INVOKED BY: F:\Keil\C51\BIN\C51.EXE IDE_TEST.c OPTIMIZE(SIZE) BROWSE INTVECTOR(0X8000) DEBUG OBJECTEXTEND TABS(
-2)
stmt level source
1 /*
2 Copyright (C) 2003 Bart Bilos <boombox666@yahoo.com>.
3
4 Adapted from original work by Paul Stoffregen.
5 http://www.pjrc.com/tech/8051/ide/
6
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 as published by the Free Software Foundation; either version 2
10 of the License, or (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software Foundation,
19 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
21 */
22 #include <Dallas\REG320.H> /* Declaration for the 8051 Regs */
23 #include <stdio.h> /* prototype declarations for I/O functions */
24 #include "IDE_LIB.h" /* IDE working variables */
25 #include "timertick.h" /* timer subsystem */
26
27 // Small delay subroutine
28 void delay(unsigned int delay) {
29 1 unsigned int i,j;
30 1 for(i = 0; i < delay ;i++)
31 1 for(j = 0; j < 255 ;j++);
32 1 }
33
34 void init(void){
35 1 inittimer();
36 1 ide_hard_reset();
37 1 ide_init();
38 1 }
39
40 /*------------------------------------------------\
41 Test program to see if the IDE_8255 is functioning
42 ------------------------------------------------*/
43 void main (void) {
44 1 xdata char sector[512];
45 1 int seconden = getseconds();
46 1 long int sectoren=0,sects=0;
47 1 init();
48 1 printf(" IDE TEST PROGRAM \n");
49 1 for(sectoren = 0 ;sectoren < 0x60000 ;sectoren++) {
50 2 if(read_sector(sectoren,sector) != 0) {
51 3 printf("READ ERROR @ %ld ",sectoren);
52 3 }
53 2 P1 = sector[0];
54 2 sects++;
C51 COMPILER V7.00 IDE_TEST 01/02/2004 02:44:04 PAGE 2
55 2 sectoren++;
56 2 if((getseconds() - seconden) > 0){
57 3 printf(" %ld Kbs, %ld sectoren read \n",sects>>1,sects);
58 3 seconden = getseconds();
59 3 sects=0;
60 3 }
61 2 }
62 1 printf(" %ld sectors read total %ld MB read in %ld seconds ",sectoren,sectoren>>11,getseconds());
63 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 386 ----
CONSTANT SIZE = 120 ----
XDATA SIZE = ---- 512
PDATA SIZE = ---- ----
DATA SIZE = ---- 10
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -