projects
/
fw
/
sdcc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed up support for the gbz80 such that it will at least run (and fail badly) the...
[fw/sdcc]
/
device
/
lib
/
gbz80
/
crt0.s
diff --git
a/device/lib/gbz80/crt0.s
b/device/lib/gbz80/crt0.s
index eb015280ea44f56e557bfb86031dcc953691831e..f4674b6d4f056b327f5da2a7499e531b51912423 100644
(file)
--- a/
device/lib/gbz80/crt0.s
+++ b/
device/lib/gbz80/crt0.s
@@
-1,5
+1,5
@@
- ;; Generic crt0.s for a Z80
- .globl _
_
main
+ ;; Generic crt0.s for a
GB
Z80
+ .globl _main
.area _HEADER (ABS)
;; Reset vector
.area _HEADER (ABS)
;; Reset vector
@@
-31,32
+31,33
@@
init:
ld sp,#0xdfff
;; Use _main instead of main to bypass sdcc's intelligence
ld sp,#0xdfff
;; Use _main instead of main to bypass sdcc's intelligence
- call _
_
main
+ call _main
jp _exit
;; Ordering of segments for the linker.
.area _CODE
jp _exit
;; Ordering of segments for the linker.
.area _CODE
+ .area _GSINIT
+ .area _GSFINAL
+
.area _DATA
.area _DATA
+ .area _BSS
+ .area _CODE
__clock::
ld a,#2
__clock::
ld a,#2
- rst 0x0
0
+ rst 0x0
8
ret
ret
-_getsp::
- ld hl,#0
- add hl,sp
- ret
-
-__printTStates::
- ld a,#3
- rst 0x00
- ret
-
_exit::
;; Exit - special code to the emulator
_exit::
;; Exit - special code to the emulator
- ld a,#
1
- rst 0x0
0
+ ld a,#
0
+ rst 0x0
8
1$:
halt
jr 1$
1$:
halt
jr 1$
+
+ .area _GSINIT
+gsinit::
+
+ .area _GSFINAL
+ ret