forked from yourtion/30dayMakeOS
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
15 changed files
with
198 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
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 |
---|---|---|
@@ -0,0 1,16 @@ | ||
[FORMAT "WCOFF"] | ||
[INSTRSET "i486p"] | ||
[BITS 32] | ||
[FILE "api021.nas"] | ||
|
||
GLOBAL _api_fopen | ||
|
||
[SECTION .text] | ||
|
||
_api_fopen: ; int api_fopen(char *fname); | ||
PUSH EBX | ||
MOV EDX,21 | ||
MOV EBX,[ESP 8] ; fname | ||
INT 0x40 | ||
POP EBX | ||
RET |
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 |
---|---|---|
@@ -0,0 1,14 @@ | ||
[FORMAT "WCOFF"] | ||
[INSTRSET "i486p"] | ||
[BITS 32] | ||
[FILE "api022.nas"] | ||
|
||
GLOBAL _api_fclose | ||
|
||
[SECTION .text] | ||
|
||
_api_fclose: ; void api_fclose(int fhandle); | ||
MOV EDX,22 | ||
MOV EAX,[ESP 4] ; fhandle | ||
INT 0x40 | ||
RET |
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 |
---|---|---|
@@ -0,0 1,18 @@ | ||
[FORMAT "WCOFF"] | ||
[INSTRSET "i486p"] | ||
[BITS 32] | ||
[FILE "api023.nas"] | ||
|
||
GLOBAL _api_fseek | ||
|
||
[SECTION .text] | ||
|
||
_api_fseek: ; void api_fseek(int fhandle, int offset, int mode); | ||
PUSH EBX | ||
MOV EDX,23 | ||
MOV EAX,[ESP 8] ; fhandle | ||
MOV ECX,[ESP 16] ; mode | ||
MOV EBX,[ESP 12] ; offset | ||
INT 0x40 | ||
POP EBX | ||
RET |
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 |
---|---|---|
@@ -0,0 1,15 @@ | ||
[FORMAT "WCOFF"] | ||
[INSTRSET "i486p"] | ||
[BITS 32] | ||
[FILE "api024.nas"] | ||
|
||
GLOBAL _api_fsize | ||
|
||
[SECTION .text] | ||
|
||
_api_fsize: ; int api_fsize(int fhandle, int mode); | ||
MOV EDX,24 | ||
MOV EAX,[ESP 4] ; fhandle | ||
MOV ECX,[ESP 8] ; mode | ||
INT 0x40 | ||
RET |
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 |
---|---|---|
@@ -0,0 1,18 @@ | ||
[FORMAT "WCOFF"] | ||
[INSTRSET "i486p"] | ||
[BITS 32] | ||
[FILE "api025.nas"] | ||
|
||
GLOBAL _api_fread | ||
|
||
[SECTION .text] | ||
|
||
_api_fread: ; int api_fread(char *buf, int maxsize, int fhandle); | ||
PUSH EBX | ||
MOV EDX,25 | ||
MOV EAX,[ESP 16] ; fhandle | ||
MOV ECX,[ESP 12] ; maxsize | ||
MOV EBX,[ESP 8] ; buf | ||
INT 0x40 | ||
POP EBX | ||
RET |
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
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 |
---|---|---|
@@ -0,0 1 @@ | ||
command |
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 |
---|---|---|
@@ -0,0 1 @@ | ||
cmd.exe |
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 |
---|---|---|
@@ -0,0 1,5 @@ | ||
APP = typeipl | ||
STACK = 1k | ||
MALLOC = 0k | ||
|
||
include ../app_make.txt |
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 |
---|---|---|
@@ -0,0 1 @@ | ||
..\..\z_tools\make.exe %1 %2 %3 %4 %5 %6 %7 %8 %9 |
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 |
---|---|---|
@@ -0,0 1,17 @@ | ||
#include "apilib.h" | ||
|
||
void HariMain(void) | ||
{ | ||
int fh; | ||
char c; | ||
fh = api_fopen("ipl10.nas"); | ||
if (fh != 0) { | ||
for (;;) { | ||
if (api_fread(&c, 1, fh) == 0) { | ||
break; | ||
} | ||
api_putchar(c); | ||
} | ||
} | ||
api_end(); | ||
} |