1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-02 09:34:22 +00:00

Merge pull request #306 from groessler/something_to_pull

Some Atari runtime library fixes.
This commit is contained in:
Oliver Schmidt 2016-06-07 10:21:59 +02:00
commit effdc58d88
2 changed files with 9 additions and 5 deletions

View File

@ -93,8 +93,10 @@ cont: ldy #3
.ifdef UCASE_FILENAME .ifdef UCASE_FILENAME
.ifdef DEFAULT_DEVICE .ifdef DEFAULT_DEVICE
ldy #$80 ldy #$80
sty tmp2 ; set flag for ucase_fn .else
ldy #$00
.endif .endif
sty tmp2 ; set flag for ucase_fn
jsr ucase_fn jsr ucase_fn
bcc ucok1 bcc ucok1
invret: lda #<EINVAL ; file name is too long invret: lda #<EINVAL ; file name is too long

View File

@ -40,7 +40,9 @@
stx ptr4+1 stx ptr4+1
.ifdef DEFAULT_DEVICE .ifdef DEFAULT_DEVICE
; bit #0 of tmp2 is used as a flag whether device name is present in passed string (1 = present, 0 = not present) lda tmp2
beq hasdev ; don't fiddle with device part
; bit #0 of tmp2 is used as an additional flag whether device name is present in passed string (1 = present, 0 = not present)
ldy #1 ldy #1
inc tmp2 ; initialize flag: device present inc tmp2 ; initialize flag: device present
lda #':' lda #':'
@ -81,11 +83,11 @@ copy_end:
.ifdef DEFAULT_DEVICE .ifdef DEFAULT_DEVICE
lda #1 lda #1
bit tmp2 bit tmp2 ; is a device present in the string?
bne hasdev2 ; yes, don't prepend something bne hasdev2 ; yes, don't prepend something
bpl hasdev2 bpl hasdev2 ; check input parameter (tmp2 != $80)
ldy #128+3 ; no, prepend "D:" (or other device) ldy #128+3 ; no, prepend "Dn:" (__defdev)
sty tmp3 ; adjust stack size used sty tmp3 ; adjust stack size used
ldy #3 ldy #3
jsr subysp ; adjust stack pointer jsr subysp ; adjust stack pointer