-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
5d37c79
commit 5ac6b1a
Showing
11 changed files
with
149 additions
and
75 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
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,80 @@ | ||
; Parts from Matt "MateoConLechuga" Waltz and | ||
; contributors of http://wikiti.brandonw.net/index.php?title=84PCE:OS:Include_File | ||
; Latest as of 11 February 2016 | ||
ifndef STARTUP_MODULE | ||
define STARTUP_MODULE | ||
;------------------------------------------------------------------------------- | ||
; Standard CE startup module definitions and references | ||
;------------------------------------------------------------------------------- | ||
xref __low_bss | ||
xref __len_code | ||
xref __low_code | ||
xref _main | ||
xref _PopErrorHandler | ||
xref _RunIndicOff | ||
xdef _errno | ||
xdef _init | ||
xdef _exit | ||
xdef __exit | ||
xdef __saveIY | ||
xdef __saveSP | ||
xdef __c_startup | ||
xdef _c_int0 | ||
.assume ADL = 1 | ||
define .header,space=ram | ||
define .icon,space=ram | ||
define .launcher,space=ram | ||
define .libs,space=ram | ||
define .startup,space=ram | ||
|
||
;------------------------------------------------------------------------------- | ||
; Standard CE startup module code | ||
;------------------------------------------------------------------------------- | ||
segment .header | ||
db %EF | ||
db %7B | ||
_init: | ||
db %00 ; Magic byte recognition for C programs | ||
ifdef ICON | ||
xref __program_description_end | ||
jp __program_description_end | ||
endif | ||
;------------------------------------------------------------------------------- | ||
segment .startup | ||
__c_startup: | ||
_c_int0: | ||
di | ||
call %020848 ; _RunIndicOff | ||
ld hl,__low_bss | ||
ld bc,%10DE2 ; Maximum size of BSS+Heap | ||
call %0210DC ; _MemClear | ||
|
||
ld hl,__exit | ||
ld (__saveSP),sp | ||
call _main | ||
__exit: | ||
_exit: | ||
ld sp,(__saveSP) | ||
ld iy,%D00080 ; Restore IY for OS | ||
ret | ||
;------------------------------------------------------------------------------- | ||
segment bss | ||
__saveSP: | ||
ds 3 | ||
__saveIY: | ||
ds 3 | ||
_errno: | ||
ds 3 | ||
;------------------------------------------------------------------------------- | ||
segment code | ||
;------------------------------------------------------------------------------- | ||
; End Standard Startup Module | ||
;------------------------------------------------------------------------------- | ||
endif | ||
end |
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,33 @@ | ||
/************************************************* | ||
* CE debug header file | ||
*************************************************/ | ||
|
||
/* To print to the console, just use | ||
* dbg_printf(dbgout, const char*, ...); */ | ||
|
||
#ifdef dbg_printf | ||
#undef dbg_printf | ||
#endif | ||
|
||
#ifdef dbgout | ||
#undef dbgout | ||
#endif | ||
|
||
#ifdef debugger | ||
#undef debugger | ||
#endif | ||
|
||
#ifndef NDEBUG | ||
|
||
#define dbg_printf sprintf | ||
#define dbgout ((const char*)0xFB0000) | ||
|
||
void debugger(void); /* Opens the debugger */ | ||
|
||
#else | ||
|
||
#define dbg_printf (void) | ||
#define dbgout (NULL) | ||
#define debugger (void) | ||
|
||
#endif |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 was deleted.
Oops, something went wrong.