mirror of
https://github.com/cc65/cc65.git
synced 2026-04-26 13:18:31 +00:00
remove dangling spaces
This commit is contained in:
@@ -39,4 +39,4 @@ initheap:
|
||||
sta __heapend+1
|
||||
rts
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
; size_t _heapmaxavail (void);
|
||||
;
|
||||
;
|
||||
|
||||
|
||||
.importzp ptr1, ptr2
|
||||
.export __heapmaxavail
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
** Ullrich von Bassewitz, 2012-11-26
|
||||
**
|
||||
** Minimum value of a long. Is used in ascii conversions, since this value
|
||||
** Minimum value of a long. Is used in ascii conversions, since this value
|
||||
** has no positive counterpart than can be represented in 32 bits. In C,
|
||||
** since the compiler will convert to the correct character set for the
|
||||
** since the compiler will convert to the correct character set for the
|
||||
** target platform.
|
||||
*/
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
; Ullrich von Bassewitz, 2004-05-13
|
||||
;
|
||||
; __seterrno: Will set __errno to the value in A and return zero in A. Other
|
||||
; registers aren't changed. The function is C callable, but
|
||||
; registers aren't changed. The function is C callable, but
|
||||
; currently only called from asm code.
|
||||
;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdlib.h>
|
||||
#include <signal.h>
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
;
|
||||
; ctypemask(int c)
|
||||
;
|
||||
; converts a character to test via the is*-functions to the matching ctype-masks
|
||||
; converts a character to test via the is*-functions to the matching ctype-masks
|
||||
; If c is out of the 8-bit range, the function returns with carry set and accu cleared.
|
||||
; Return value is in accu and x has to be always clear when returning
|
||||
; (makes calling code shorter)!
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
.importzp sreg, ptr1, tmp1
|
||||
|
||||
_div: jsr tosdivax ; Division-operator does most of the work
|
||||
|
||||
|
||||
ldy sreg ; low byte remainder from sreg
|
||||
sta sreg ; store low byte quotient to sreg
|
||||
|
||||
|
||||
lda sreg+1 ; high byte remainder from sreg
|
||||
stx sreg+1 ; store high byte quotient to sreg
|
||||
|
||||
|
||||
@@ -7,6 +7,6 @@
|
||||
;
|
||||
|
||||
.export _doesclrscrafterexit
|
||||
.import return0
|
||||
.import return0
|
||||
|
||||
_doesclrscrafterexit = return0
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
bne @L8
|
||||
|
||||
; Error in read. Set the stream error flag and bail out. errno has already
|
||||
; been set by read(). On entry to label @L7, X must be zero.
|
||||
; been set by read(). On entry to label @L7, X must be zero.
|
||||
|
||||
inx ; X = 0
|
||||
lda #_FERROR
|
||||
|
||||
@@ -274,7 +274,7 @@ _free: sta ptr2
|
||||
; }
|
||||
; }
|
||||
;
|
||||
;
|
||||
;
|
||||
; On entry, ptr2 must contain a pointer to the block, which must be at least
|
||||
; HEAP_MIN_BLOCKSIZE bytes in size, and ptr1 contains the total size of the
|
||||
; block.
|
||||
|
||||
@@ -21,4 +21,4 @@ int __fastcall__ fsetpos (FILE* f, const fpos_t *pos)
|
||||
return fseek (f, (fpos_t)*pos, SEEK_SET);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
; Code
|
||||
|
||||
|
||||
.proc _fwrite
|
||||
|
||||
; Save file and place it into ptr1
|
||||
|
||||
@@ -53,7 +53,7 @@ overflow:
|
||||
lda #<ERANGE
|
||||
jsr __seterrno ; Returns 0 in A
|
||||
tax ; Return zero
|
||||
rts
|
||||
rts
|
||||
|
||||
; Success, return buf
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ L1: lda __longminstr,y ; copy -2147483648
|
||||
dey
|
||||
bpl L1
|
||||
jmp L10
|
||||
|
||||
|
||||
; Check if the value is negative. If so, write a - sign and negate the
|
||||
; number.
|
||||
|
||||
@@ -66,7 +66,7 @@ L2: txa ; get high byte
|
||||
|
||||
.if (.cpu .bitand CPU_ISET_65SC02)
|
||||
sta (ptr2)
|
||||
.else
|
||||
.else
|
||||
ldy #0
|
||||
sta (ptr2),y ; store sign
|
||||
.endif
|
||||
@@ -79,7 +79,7 @@ L3: lda ptr1 ; negate val
|
||||
ldx ptr1+1
|
||||
|
||||
jsr negeax
|
||||
|
||||
|
||||
sta ptr1
|
||||
stx ptr1+1
|
||||
jmp ultoa
|
||||
|
||||
@@ -67,7 +67,7 @@ memcpy_getparams: ; IMPORTANT! Function has to leave with Y=0!
|
||||
jsr popptr1 ; save src to ptr1
|
||||
|
||||
; save dest to ptr2
|
||||
iny ; Y=0 guaranteed by popptr1, we need '1' here...
|
||||
iny ; Y=0 guaranteed by popptr1, we need '1' here...
|
||||
; (direct stack access is three cycles faster
|
||||
; (total cycle count with return))
|
||||
lda (sp),y
|
||||
|
||||
@@ -87,7 +87,7 @@ L3: dey
|
||||
sta (ptr1),y ; set bytes in low
|
||||
sta (ptr2),y ; and high section
|
||||
bne L3 ; flags still up to date from dey!
|
||||
leave:
|
||||
leave:
|
||||
jmp popax ; Pop ptr and return as result
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
;
|
||||
;
|
||||
; unsigned int __fastcall__ mul20(unsigned char value);
|
||||
;
|
||||
;
|
||||
; REMARKS: Function is defined to return with carry-flag cleared
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ mul5: adc tmp4 ; * 5
|
||||
inx ; yes, correct...
|
||||
|
||||
mul10: stx tmp4 ; continue with classic shifting...
|
||||
|
||||
|
||||
asl a ; * 10
|
||||
rol tmp4
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
;
|
||||
;
|
||||
; unsigned int __fastcall__ mul40(unsigned char value);
|
||||
;
|
||||
;
|
||||
; REMARKS: Function is defined to return with carry-flag cleared
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ mul5: adc tmp4 ; * 5
|
||||
inx ; yes, correct...
|
||||
|
||||
mul10: stx tmp4 ; continue with classic shifting...
|
||||
|
||||
|
||||
asl a ; * 10
|
||||
rol tmp4
|
||||
|
||||
|
||||
@@ -185,4 +185,4 @@ error: jsr __seterrno
|
||||
name: .addr 0 ; Pointer to name
|
||||
newsize: .byte 0 ; New environment size
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -28,9 +28,9 @@ _raise:
|
||||
sta jmpvec+1
|
||||
lda sigtable+1,x
|
||||
sta jmpvec+2
|
||||
|
||||
|
||||
; Reset the signal handler to SIG_DFL (I don't like this because it may
|
||||
; introduce race conditions, but it's the simplest way to satisfy the
|
||||
; introduce race conditions, but it's the simplest way to satisfy the
|
||||
; standard).
|
||||
|
||||
lda #<__sig_dfl
|
||||
@@ -51,4 +51,4 @@ _raise:
|
||||
invalidsig:
|
||||
rts
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -22,4 +22,4 @@ void __fastcall__ rewind (FILE* f)
|
||||
clearerr(f);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ _strcspn:
|
||||
|
||||
sta tmp1 ; tmp1 = strlen of test chars
|
||||
jsr popptr1 ; get and save s1 to ptr1
|
||||
|
||||
|
||||
ldx #0 ; low counter byte
|
||||
stx tmp2 ; high counter byte
|
||||
|
||||
|
||||
@@ -9,19 +9,19 @@
|
||||
.import popax, popptr1
|
||||
.importzp ptr1, ptr2, ptr3, tmp1, tmp2
|
||||
.macpack cpu
|
||||
|
||||
|
||||
_strncat:
|
||||
inx
|
||||
stx tmp2
|
||||
tax
|
||||
inx
|
||||
stx tmp1 ; save count with each byte incremented separately
|
||||
|
||||
|
||||
jsr popptr1 ; get src
|
||||
|
||||
jsr popax ; get dest
|
||||
sta ptr3 ; remember for function return
|
||||
stx ptr3+1
|
||||
stx ptr3+1
|
||||
stx ptr2+1
|
||||
tay ; low byte as offset in Y
|
||||
.if (.cpu .bitand ::CPU_ISET_65SC02)
|
||||
|
||||
@@ -16,8 +16,8 @@ _strrchr:
|
||||
stx ptr1+1
|
||||
ldx #0 ; default function result is NULL, X is high byte...
|
||||
stx tmp2 ; tmp2 is low-byte
|
||||
stx ptr1 ; low-byte of source string is in Y, so clear real one...
|
||||
|
||||
stx ptr1 ; low-byte of source string is in Y, so clear real one...
|
||||
|
||||
testChar:
|
||||
lda (ptr1),y ; get char
|
||||
beq finished ; jump if end of string
|
||||
|
||||
@@ -68,4 +68,4 @@ error: lda #EINVAL
|
||||
rts
|
||||
|
||||
.endproc
|
||||
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ _vsprintf:
|
||||
ldy #2
|
||||
jsr staxysp
|
||||
|
||||
; Contine by jumping to vsnprintf, which expects ap on the CPU stack and will
|
||||
; Contine by jumping to vsnprintf, which expects ap on the CPU stack and will
|
||||
; cleanup the C stack
|
||||
|
||||
jmp vsnprintf
|
||||
|
||||
Reference in New Issue
Block a user