-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4da62e7
commit 824fa47
Showing
2 changed files
with
11 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,24 @@ | ||
|
||
extern const char hellostr2[]; | ||
|
||
const char hello_world[] = "Hello world. This is code without a C runtime.\r\n"; | ||
static const char hello_world[] = "Hello world. This is code without a C runtime take 2.\r\n"; | ||
|
||
void dos_putc(const char c); | ||
static void dos_putc(const char c); | ||
#pragma aux dos_putc = \ | ||
"mov ah,0x02" \ | ||
"int 21h" \ | ||
modify [ah] \ | ||
parm [dl] | ||
|
||
void dos_puts(const char *p) { | ||
static void dos_puts(const char *p) { | ||
char c; | ||
|
||
while ((c = *p++) != 0) | ||
dos_putc(c); | ||
} | ||
|
||
void entry2(void) { | ||
dos_puts(hello_world); | ||
dos_puts(hellostr2); | ||
} | ||
|