Changed literal zeroes of the style "#>0" into the style "#>$0000".

This commit is contained in:
Greg King
2014-09-10 19:15:07 -04:00
parent e702832e80
commit 74c2415795
16 changed files with 75 additions and 69 deletions

View File

@@ -2,7 +2,7 @@
** _scanf.c
**
** (c) Copyright 2001-2005, Ullrich von Bassewitz <uz@cc65.org>
** 2005-01-24, Greg King <greg.king5@ver5z6n.net>
** 2014-09-10, Greg King <greg.king5@verizon.net>
**
** This is the basic layer for all scanf-type functions. It should be
** rewritten in assembly, at some time in the future. So, some of the code
@@ -275,7 +275,7 @@ static void __fastcall__ Error (unsigned char /* Code */)
(char*) __AX__ = JumpBuf;
asm ("jsr pushax");
asm ("pla");
asm ("ldx #>0");
asm ("ldx #>$0000");
asm ("jmp %v", longjmp);
}
@@ -474,7 +474,7 @@ static char GetFormat (void)
++format;
asm ("ldy #0");
asm ("lda (regsave),y");
asm ("ldx #>0");
asm ("ldx #>$0000");
return (F = (char) __AX__);
}

View File

@@ -1,6 +1,6 @@
;
; 1998-06-02, Ullrich von Bassewitz
; 2013-05-01, Greg King
; 2014-09-10, Greg King
;
; int isgraph (int c);
;
@@ -9,7 +9,7 @@
.include "ctype.inc"
_isgraph:
cpx #>0 ; Char range OK?
cpx #>$0000 ; Char range OK?
bne @L1 ; Jump if no
tay
lda __ctype,y ; Get character classification

View File

@@ -1,6 +1,6 @@
;
; 1998-06-02, Ullrich von Bassewitz
; 2013-05-01, Greg King
; 2014-09-10, Greg King
;
; int ispunct (int c);
;
@@ -9,7 +9,7 @@
.include "ctype.inc"
_ispunct:
cpx #>0 ; Char range OK?
cpx #>$0000 ; Char range OK?
bne @L1 ; Jump if no
tay
lda __ctype,y ; Get character classification

View File

@@ -3,7 +3,7 @@
; /* Standard C function */
;
; 2004-11-28, Ullrich von Bassewitz
; 2004-12-21, Greg King
; 2014-09-10, Greg King
;
.export _vsscanf
@@ -65,7 +65,7 @@
; Return EOF if we are at the end of the string
bne L1
lda #$FF
lda #<-1
tax
rts
@@ -74,17 +74,17 @@
L1: tax ; Save return value
tya ; Low byte of index
ldy #SSCANFDATA::INDEX
add #<1
add #<$0001
sta (ptr1),y
iny
lda (ptr1),y
adc #>1
adc #>$0001
sta (ptr1),y
; Return the char just read
txa
ldx #>0
ldx #>$0000
rts
.endproc
@@ -111,11 +111,11 @@ L1: tax ; Save return value
ldy #SSCANFDATA::INDEX
lda (ptr1),y
sub #<1
sub #<$0001
sta (ptr1),y
iny
lda (ptr1),y
sbc #>1
sbc #>$0001
sta (ptr1),y
; Return c