-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathls.c
More file actions
26 lines (22 loc) · 764 Bytes
/
ls.c
File metadata and controls
26 lines (22 loc) · 764 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*******************************************************************************
> File Name: ls.c
> Author: sillyplus
> Mail: oi_boy@sina.cn
> Created Time: Tue Apr 7 10:01:00 2015
******************************************************************************/
#include "user_program.h"
#include "utils_32cc.h"
struct FILE_TABLE_ENTRY {
const char filename[14], loc, size;
} __attribute__ ((packed));
int main() {
struct FILE_TABLE_ENTRY file_table[32];
unsigned short p, i;
read_disk((void *)file_table, 1, 0x40, 0);
for(i = 0; i < 32; ++i) {
if(file_table[i].size) {
write_str_current(file_table[i].filename, __builtin_strlen(file_table[i].filename));
write_str_current("\r\n", 2);
}
}
}