Skip to content

Commit 824fa47

Browse files
more
1 parent 4da62e7 commit 824fa47

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

tool/linker/ex7/drvc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,12 @@ static void dos_puts(const char *p) {
1717
dos_putc(c);
1818
}
1919

20+
void entry2(void);
21+
2022
unsigned int near entry_c(void) {
2123
dos_puts(hello_world);
2224
dos_puts(hellostr2);
25+
entry2();
2326
return 0;
2427
}
2528

tool/linker/ex7/drvc2.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
11

22
extern const char hellostr2[];
33

4-
const char hello_world[] = "Hello world. This is code without a C runtime.\r\n";
4+
static const char hello_world[] = "Hello world. This is code without a C runtime take 2.\r\n";
55

6-
void dos_putc(const char c);
6+
static void dos_putc(const char c);
77
#pragma aux dos_putc = \
88
"mov ah,0x02" \
99
"int 21h" \
1010
modify [ah] \
1111
parm [dl]
1212

13-
void dos_puts(const char *p) {
13+
static void dos_puts(const char *p) {
1414
char c;
1515

1616
while ((c = *p++) != 0)
1717
dos_putc(c);
1818
}
1919

20+
void entry2(void) {
21+
dos_puts(hello_world);
22+
dos_puts(hellostr2);
23+
}
24+

0 commit comments

Comments
 (0)