1
0
mirror of https://github.com/cc65/cc65.git synced 2026-04-20 02:17:07 +00:00

more hacking

This commit is contained in:
mrdudz
2014-11-30 11:20:57 +01:00
parent 4275b82117
commit 1365afa845
7 changed files with 49 additions and 16 deletions
+7 -6
View File
@@ -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
}
+2
View File
@@ -77,6 +77,8 @@
# include <lynx.h>
#elif defined(__NES__)
# include <nes.h>
#elif defined(__PCE__)
# include <pce.h>
#endif
+10 -10
View File
@@ -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
+1
View File
@@ -8,6 +8,7 @@
;
.export _exit
.export __STARTUP__ : absolute = 1 ; Mark as startup
.import initlib, donelib
.import push0, _main, zerobss
.import initheap
+19
View 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
View File
@@ -0,0 +1,10 @@
#include <conio.h>
void main(void)
{
clrscr();
// cprintf("hello world");
cputs("hello world");
for(;;);
}