more hacking
This commit is contained in:
13
cfg/pce.cfg
13
cfg/pce.cfg
@@ -1,3 +1,6 @@
|
||||
SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0300; # 3 pages stack
|
||||
}
|
||||
MEMORY {
|
||||
|
||||
ZP: start = $00, size = $1A, type = rw, define = yes;
|
||||
@@ -37,10 +40,11 @@ SEGMENTS {
|
||||
#HEADER: load = HEADER, type = wprot;
|
||||
|
||||
#aSTARTUP: load = ROM0, type = wprot, define = yes;
|
||||
STARTUP: load = ROM0, type = wprot, define = yes;
|
||||
STARTUP: load = ROM0, type = ro, define = yes;
|
||||
|
||||
CODE: load = ROM, type = wprot, define = yes;
|
||||
RODATA: load = ROM, type = wprot, define = yes;
|
||||
INIT: load = ROM0, type = ro, define = yes, optional = yes;
|
||||
CODE: load = ROM, type = ro, define = yes;
|
||||
RODATA: load = ROM, type = ro, define = yes;
|
||||
|
||||
DATA: load = ROM0, run= RAM, type = rw, define = yes;
|
||||
# BSS: load = RAM2, type = bss, define = yes;
|
||||
@@ -63,6 +67,3 @@ FEATURES {
|
||||
label=__DESTRUCTOR_TABLE__,
|
||||
count=__DESTRUCTOR_COUNT__;
|
||||
}
|
||||
SYMBOLS {
|
||||
__STACKSIZE__ = $0300; # 3 pages stack
|
||||
}
|
||||
|
||||
@@ -77,6 +77,8 @@
|
||||
# include <lynx.h>
|
||||
#elif defined(__NES__)
|
||||
# include <nes.h>
|
||||
#elif defined(__PCE__)
|
||||
# include <pce.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -3,21 +3,21 @@
|
||||
;
|
||||
; clock_t clock (void);
|
||||
;
|
||||
|
||||
.include "pcengine.inc"
|
||||
|
||||
.export _clock
|
||||
.importzp sreg
|
||||
.include "pcengine.inc"
|
||||
|
||||
.export _clock
|
||||
.importzp sreg
|
||||
|
||||
.proc _clock
|
||||
|
||||
ldy #0 ; Byte 3 is always zero
|
||||
sty sreg+1
|
||||
sty sreg
|
||||
ldy #0 ; Byte 3 is always zero
|
||||
sty sreg+1
|
||||
sty sreg
|
||||
|
||||
ldx _tickcount+1
|
||||
lda _tickcount
|
||||
rts
|
||||
ldx _tickcount+1
|
||||
lda _tickcount
|
||||
rts
|
||||
|
||||
.endproc
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
;
|
||||
|
||||
.export _exit
|
||||
.export __STARTUP__ : absolute = 1 ; Mark as startup
|
||||
.import initlib, donelib
|
||||
.import push0, _main, zerobss
|
||||
.import initheap
|
||||
|
||||
19
libsrc/pce/gotoxy.s
Normal file
19
libsrc/pce/gotoxy.s
Normal file
@@ -0,0 +1,19 @@
|
||||
;
|
||||
; Ullrich von Bassewitz, 06.08.1998
|
||||
;
|
||||
; void gotoxy (unsigned char x, unsigned char y);
|
||||
;
|
||||
|
||||
.export _gotoxy
|
||||
.import popa, plot
|
||||
|
||||
.include "pcengine.inc"
|
||||
|
||||
_gotoxy:
|
||||
|
||||
sta CURS_Y ; Set Y
|
||||
jsr popa ; Get X
|
||||
sta CURS_X ; Set X
|
||||
jmp plot ; Set the cursor position
|
||||
|
||||
|
||||
10
testcode/lib/conio.c
Normal file
10
testcode/lib/conio.c
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
#include <conio.h>
|
||||
|
||||
void main(void)
|
||||
{
|
||||
clrscr();
|
||||
// cprintf("hello world");
|
||||
cputs("hello world");
|
||||
for(;;);
|
||||
}
|
||||
Reference in New Issue
Block a user