1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-14 16:33:00 +00:00

Merge pull request #494 from jedeoric/master

[telestrat] Adding some vars, adding getcwd management, changing ZP address and ZP length
This commit is contained in:
Oliver Schmidt 2017-09-27 09:52:19 +02:00 committed by GitHub
commit 3a6430b13d
5 changed files with 55 additions and 3 deletions

View File

@ -47,6 +47,8 @@ FILENAME_MAX = 64+1
FILENAME_MAX = 12+1 FILENAME_MAX = 12+1
.elseif .defined(__LUNIX__) .elseif .defined(__LUNIX__)
FILENAME_MAX = 80+1 FILENAME_MAX = 80+1
.elseif .defined(__TELESTRAT__)
FILENAME_MAX = 50+1
.else .else
FILENAME_MAX = 16+1 FILENAME_MAX = 16+1
.endif .endif

View File

@ -16,6 +16,7 @@ FUNCTKEY = $A5
FNAME_LEN = 11 ; maximum length of file-name FNAME_LEN = 11 ; maximum length of file-name
; --------------------------------------------------------------------------- ; ---------------------------------------------------------------------------
; Zero page ; Zero page
@ -26,6 +27,15 @@ RESB := $02
TR0 := $0C TR0 := $0C
TR1 := $0D TR1 := $0D
TR2 := $0E
TR3 := $0F
TR4 := $10
TR5 := $11
TR6 := $12
TR7 := $13
PTR_READ_DEST := $2C ; used for XFREAD and XWRITE only in telemon 3.0 PTR_READ_DEST := $2C ; used for XFREAD and XWRITE only in telemon 3.0
@ -109,6 +119,7 @@ XTEXT = $19
XHIRES = $1A XHIRES = $1A
XFILLM = $1C XFILLM = $1C
XMINMA = $1F XMINMA = $1F
XVARS = $24 ; only in TELEMON 3.0, in telemon 2.4, it's XNOMFI ($24)
XFREAD = $27 ; only in TELEMON 3.0 XFREAD = $27 ; only in TELEMON 3.0
XOPEN = $30 ; only in TELEMON 3.0 XOPEN = $30 ; only in TELEMON 3.0
XCOSCR = $34 ; switch off cursor XCOSCR = $34 ; switch off cursor
@ -129,12 +140,18 @@ XINK = $93
XEXPLO = $9C XEXPLO = $9C
XPING = $9D XPING = $9D
; ---------------------------------------------------------------------------
; ROM entries variables
PWD_PTR = $00
; --------------------------------------------------------------------------- ; ---------------------------------------------------------------------------
; Page $200 ; Page $200
SCRX := $220 SCRX := $220
SCRY := $224 SCRY := $224
ADSCRL := $218 ADSCRL := $218
ADSCRH := $21C ADSCRH := $21C
IRQVECTOR := $2FA
; --------------------------------------------------------------------------- ; ---------------------------------------------------------------------------
@ -146,8 +163,8 @@ BUFEDT := $590
MAX_BUFEDT_LENGTH=110 MAX_BUFEDT_LENGTH=110
; Hardware ; Hardware
CH376_DATA :=$340 CH376_DATA := $340
CH376_COMMAND :=$341 CH376_COMMAND := $341
; MACRO ; MACRO

View File

@ -4,7 +4,7 @@ SYMBOLS {
__RAMEND__: type = weak, value = $9800; __RAMEND__: type = weak, value = $9800;
} }
MEMORY { MEMORY {
ZP: file = "", define = yes, start = $00E0, size = $001A; ZP: file = "", define = yes, start = $00B0, size = $003A;
ORIXHDR: file = %O, type = ro, start = $0000, size = $001F; ORIXHDR: file = %O, type = ro, start = $0000, size = $001F;
BASHEAD: file = %O, define = yes, start = $0801, size = $000D; BASHEAD: file = %O, define = yes, start = $0801, size = $000D;
MAIN: file = %O, define = yes, start = __BASHEAD_LAST__, size = __RAMEND__ - __MAIN_START__; MAIN: file = %O, define = yes, start = __BASHEAD_LAST__, size = __RAMEND__ - __MAIN_START__;

View File

@ -75,6 +75,8 @@ extern FILE* stderr;
# define FILENAME_MAX (12+1) # define FILENAME_MAX (12+1)
#elif defined(__LUNIX__) #elif defined(__LUNIX__)
# define FILENAME_MAX (80+1) # define FILENAME_MAX (80+1)
#elif defined(__TELESTRAT__)
# define FILENAME_MAX (50+1)
#else #else
# define FILENAME_MAX (16+1) # define FILENAME_MAX (16+1)
#endif #endif

View File

@ -0,0 +1,31 @@
;
; Jede (jede@oric.org) 24.09.2017
;
.export initcwd
.import __cwd
.include "zeropage.inc"
.include "telestrat.inc"
initcwd:
ldx #PWD_PTR
BRK_TELEMON XVARS
sta ptr1
sty ptr1+1
ldy #$00
loop:
lda (ptr1),y
beq done
sta __cwd,y
iny
bne loop
done:
sta __cwd,y
rts