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 {
|
MEMORY {
|
||||||
|
|
||||||
ZP: start = $00, size = $1A, type = rw, define = yes;
|
ZP: start = $00, size = $1A, type = rw, define = yes;
|
||||||
@@ -37,10 +40,11 @@ SEGMENTS {
|
|||||||
#HEADER: load = HEADER, type = wprot;
|
#HEADER: load = HEADER, type = wprot;
|
||||||
|
|
||||||
#aSTARTUP: load = ROM0, type = wprot, define = yes;
|
#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;
|
INIT: load = ROM0, type = ro, define = yes, optional = yes;
|
||||||
RODATA: load = ROM, type = wprot, define = yes;
|
CODE: load = ROM, type = ro, define = yes;
|
||||||
|
RODATA: load = ROM, type = ro, define = yes;
|
||||||
|
|
||||||
DATA: load = ROM0, run= RAM, type = rw, define = yes;
|
DATA: load = ROM0, run= RAM, type = rw, define = yes;
|
||||||
# BSS: load = RAM2, type = bss, define = yes;
|
# BSS: load = RAM2, type = bss, define = yes;
|
||||||
@@ -63,6 +67,3 @@ FEATURES {
|
|||||||
label=__DESTRUCTOR_TABLE__,
|
label=__DESTRUCTOR_TABLE__,
|
||||||
count=__DESTRUCTOR_COUNT__;
|
count=__DESTRUCTOR_COUNT__;
|
||||||
}
|
}
|
||||||
SYMBOLS {
|
|
||||||
__STACKSIZE__ = $0300; # 3 pages stack
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -77,6 +77,8 @@
|
|||||||
# include <lynx.h>
|
# include <lynx.h>
|
||||||
#elif defined(__NES__)
|
#elif defined(__NES__)
|
||||||
# include <nes.h>
|
# include <nes.h>
|
||||||
|
#elif defined(__PCE__)
|
||||||
|
# include <pce.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,21 +3,21 @@
|
|||||||
;
|
;
|
||||||
; clock_t clock (void);
|
; clock_t clock (void);
|
||||||
;
|
;
|
||||||
|
|
||||||
.include "pcengine.inc"
|
|
||||||
|
|
||||||
.export _clock
|
.include "pcengine.inc"
|
||||||
.importzp sreg
|
|
||||||
|
.export _clock
|
||||||
|
.importzp sreg
|
||||||
|
|
||||||
.proc _clock
|
.proc _clock
|
||||||
|
|
||||||
ldy #0 ; Byte 3 is always zero
|
ldy #0 ; Byte 3 is always zero
|
||||||
sty sreg+1
|
sty sreg+1
|
||||||
sty sreg
|
sty sreg
|
||||||
|
|
||||||
ldx _tickcount+1
|
ldx _tickcount+1
|
||||||
lda _tickcount
|
lda _tickcount
|
||||||
rts
|
rts
|
||||||
|
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
;
|
;
|
||||||
|
|
||||||
.export _exit
|
.export _exit
|
||||||
|
.export __STARTUP__ : absolute = 1 ; Mark as startup
|
||||||
.import initlib, donelib
|
.import initlib, donelib
|
||||||
.import push0, _main, zerobss
|
.import push0, _main, zerobss
|
||||||
.import initheap
|
.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