⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fs.s

📁 uIP是免费的TCP/IP协议栈,我们将它移植到我们的AVR以太网开发板中
💻 S
📖 第 1 页 / 共 4 页
字号:
	.byte 0,128
	.byte 232,0
	.byte 0,0
	.byte 'D,7
	.byte 0,0
	.byte 32,58
	.byte 0,0
	.byte 0,'D
	.byte 7,0
	.byte 0,32
	.byte 58,0
	.byte 0,0
	.byte 209,1
	.byte 0,0
	.byte 32,58
	.byte 0,0
	.byte 128,129
	.byte 152,91
	.byte 2,224
	.byte 22,219
	.byte 245,161
	.byte 246,251
	.byte 33,244
	.byte 51,127
	.byte 183,57
	.byte 180,187
	.byte 'C,136
	.byte 159,190
	.byte 92,148
	.byte 'y,210
	.byte 252,234
	.byte 125,223
	.byte 'n,252
	.byte 201,37
	.byte 158,226
	.byte 185,191
	.byte 249,'u
	.byte 199,164
	.byte 248,145
	.byte 59,137
	.byte 1,232
	.byte 141,'w
	.byte 58,0
	.byte 0,0
	.byte 209,1
	.byte 'C,211
	.byte 215,213
	.byte 124,235
	.byte 2,0
	.byte 136,14
	.byte 0,190
	.byte 142,49
	.byte 175,180
	.byte 0,136
	.byte 14,0
	.byte 0,0
	.byte 209,1
	.byte 0,0
	.byte 136,14
	.byte 0,0
	.byte 0,209
	.byte 1,0
	.byte 0,136
	.byte 14,0
	.byte 0,64
	.byte 't,0
	.byte 0,0
	.byte 136,14
	.byte 0,0
	.byte 64,'t
	.byte 0,0
	.byte 0,162
	.byte 3,0
	.byte 0,96
	.byte 52,209
	.byte 17,130
	.byte 5,7
	.byte 0,0
	.byte 209,1
	.byte 'C,33
	.byte 'R,1
	.byte 0,'D
	.byte 7,0
	.byte 0,192
	.byte 'W,230
	.byte 150,0
	.byte 24,163
	.byte 162,204
	.byte 'Z,221
	.byte 254,244
	.byte 227,157
	.byte 213,'f
	.byte 127,126
	.byte 131,24
	.byte 175,60
	.byte 64,183
	.byte 219,191
	.byte 251,187
	.byte 'O,186
	.byte 255,226
	.byte 37,'O
	.byte 155,255
	.byte 167,225
	.byte 252,11
	.byte 251,93
	.byte 60,231
	.byte 223,190
	.byte 255,225
	.byte 202,'e
	.byte 177,62
	.byte 230,95
	.byte 61,255
	.byte 18,231
	.byte 3,'L
	.byte 141,'w
	.byte 58,0
	.byte 0,0
	.byte 209,1
	.byte 0,0
	.byte 136,14
	.byte 0,0
	.byte 0,209
	.byte 1,0
	.byte 0,136
	.byte 14,0
	.byte 0,64
	.byte 't,0
	.byte 0,0
	.byte 136,14
	.byte 0,0
	.byte 64,'t
	.byte 0,0
	.byte 0,162
	.byte 3,0
	.byte 0,64
	.byte 't,52
	.byte 19,228
	.byte 21,0
	.byte 0,136
	.byte 14,0
	.byte 0,64
	.byte 't,0
	.byte 0,0
	.byte 136,14
	.byte 0,0
	.byte 64,'t
	.byte 0,0
	.byte 0,19
	.byte 241,15
	.byte 36,161
	.byte 92,171
	.byte 'A,216
	.byte 146,164
	.byte 0,0
	.byte 0,0
	.byte 'I,'E
	.byte 'N,'D
	.byte 174,'B
	.byte 96,130
	.byte 60,'e
	.byte 'n,'d
	.byte 62,0
	.dbsym e picture_png _picture_png A[1090:1090]kc
	.area data(ram, con, rel)
	.dbfile D:\hexok项目\AVRNET项目\AVRNET光盘\AVRuIP/fsdata.c
	.area text(rom, con, rel)
	.dbfile D:\hexok项目\AVRNET项目\AVRNET光盘\AVRuIP/fsdata.c
	.dbfunc e load_web_page _load_web_page fV
;              i -> R10,R11
;        webfile -> R16,R17
	.even
_load_web_page::
	xcall push_gset3x
	.dbline -1
	.dbline 224
; /**
;  * \addtogroup httpd
;  * @{
;  */
; 
; /**
;  * \file
;  * HTTP server read-only file system code.
;  * \author Adam Dunkels <adam@dunkels.com>
;  *
;  * A simple read-only filesystem. 
;  */
;  
; /*
;  * Copyright (c) 2001, Swedish Institute of Computer Science.
;  * All rights reserved. 
;  *
;  * Redistribution and use in source and binary forms, with or without 
;  * modification, are permitted provided that the following conditions 
;  * are met: 
;  * 1. Redistributions of source code must retain the above copyright 
;  *    notice, this list of conditions and the following disclaimer. 
;  * 2. Redistributions in binary form must reproduce the above copyright 
;  *    notice, this list of conditions and the following disclaimer in the 
;  *    documentation and/or other materials provided with the distribution. 
;  * 3. Neither the name of the Institute nor the names of its contributors 
;  *    may be used to endorse or promote products derived from this software 
;  *    without specific prior written permission. 
;  *
;  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 
;  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
;  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
;  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 
;  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
;  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 
;  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
;  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
;  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 
;  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 
;  * SUCH DAMAGE. 
;  *
;  * This file is part of the lwIP TCP/IP stack.
;  * 
;  * Author: Adam Dunkels <adam@sics.se>
;  *
;  * $Id: fs.c,v 1.7.2.3 2003/10/07 13:22:27 adam Exp $
;  */
; 
; #include "uip.h"
; #include "httpd.h"
; #include "fs.h"
; #include "fsdata.h"
; 
; #define NULL (void *)0
; #include "fsdata.c"
; 
; #ifdef FS_STATISTICS
; #if FS_STATISTICS == 1
; static u16_t count[FS_NUMFILES];
; #endif /* FS_STATISTICS */
; #endif /* FS_STATISTICS */
; 
; //文件索引表
; struct file_index_table
; {
;   unsigned char filename[10];
;   char *data;
; };file_index[FS_NUMFILES];
; 
; /*-----------------------------------------------------------------------------------*/
; static u8_t
; fs_strcmp(char *str1,char *str2)
; {
;   u8_t i;
;  
;   i = 0;
;  loop:
;   if(str2[i] == 0 ||
;      str1[i] == '\r' || 
;      str1[i] == '\n') {
;     return 0;
;   }
; 
;   if(str1[i] != str2[i]) {
;     return 1;
;   }
;   ++i;
;   goto loop;
; }
; /*-----------------------------------------------------------------------------------*/
; int
; fs_open(char *name, struct fs_file *file)
; {
; #ifdef FS_STATISTICS
; #if FS_STATISTICS == 1
;   u16_t i = 0;
; #endif /* FS_STATISTICS */
; #endif /* FS_STATISTICS */
;   struct fsdata_file_noconst *f;
;     
;   for(f = (struct fsdata_file_noconst *)FS_ROOT;f != NULL;f = (struct fsdata_file_noconst *)f->next) {
; 
;     if(fs_strcmp(name, f->name) == 0) {
; 	  load_web_page(f->constdata);
;       file->data = f->data;
;       file->len = f->len;
; #ifdef FS_STATISTICS
; #if FS_STATISTICS == 1
;       ++count[i];
; #endif /* FS_STATISTICS */
; #endif /* FS_STATISTICS */
;       return 1;
;     }
; #ifdef FS_STATISTICS
; #if FS_STATISTICS == 1
;     ++i;
; #endif /* FS_STATISTICS */
; #endif /* FS_STATISTICS */
; 
;   }
;   return 0;
; }
; /*-----------------------------------------------------------------------------------*/
; void
; fs_init(void)
; {
; #ifdef FS_STATISTICS
; #if FS_STATISTICS == 1
;   u16_t i;
;   for(i = 0; i < FS_NUMFILES; i++) {
;     count[i] = 0;
;   }
; #endif /* FS_STATISTICS */
; #endif /* FS_STATISTICS */
; }
; /*-----------------------------------------------------------------------------------*/
; #ifdef FS_STATISTICS
; #if FS_STATISTICS == 1  
; u16_t fs_count
; (char *name)
; {
;   struct fsdata_file_noconst *f;
;   
;   u16_t i;
; 
;   i = 0;
;   for(f =(struct fsdata_file_noconst *)FS_ROOT;
;       f != NULL;
;       f = (struct fsdata_file_noconst *)f->next) {
; 
;     if(fs_strcmp(name, f->name) == 0) {
;       return count[i];
;     }
;     ++i;
;   }
;   return 0;
; }
; #endif /* FS_STATISTICS */
; #endif /* FS_STATISTICS */
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
	.dbline 225
; /*-----------------------------------------------------------------------------------*/
	clr R10
	clr R11
	.dbline 227
; /*-----------------------------------------------------------------------------------*/
; /*-----------------------------------------------------------------------------------*/
	xjmp L11
L8:
	.dbline 228
	.dbline 229
	movw R30,R10
	add R30,R16
	adc R31,R17
	lpm R30,Z
	ldi R24,<_mypage
	ldi R25,>_mypage
	movw R26,R10
	subi R26,164  ; offset = 92
	sbci R27,255
	add R26,R24
	adc R27,R25
	st x,R30
	.dbline 230
L9:
	.dbline 227
	movw R24,R10
	adiw R24,1
	movw R10,R24
L11:
	.dbline 227
	movw R30,R10
	add R30,R16
	adc R31,R17
	lpm R30,Z
	cpi R30,60
	brne L8
	movw R30,R10
	adiw R30,1
	add R30,R16
	adc R31,R17
	lpm R30,Z
	cpi R30,101
	brne L8
	movw R30,R10
	adiw R30,2
	add R30,R16
	adc R31,R17
	lpm R30,Z
	cpi R30,110
	breq X0
	xjmp L8
X0:
	movw R30,R10
	adiw R30,3
	add R30,R16
	adc R31,R17
	lpm R30,Z
	cpi R30,100
	breq X1
	xjmp L8
X1:
	movw R30,R10
	adiw R30,4
	add R30,R16
	adc R31,R17

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -