mirror of
https://github.com/cc65/cc65.git
synced 2025-02-26 23:30:03 +00:00
The %p format specifier was missing
git-svn-id: svn://svn.cc65.org/cc65/trunk@1198 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
cf23f0937c
commit
f901555264
@ -562,7 +562,7 @@ CheckCount:
|
|||||||
|
|
||||||
CheckOctal:
|
CheckOctal:
|
||||||
cmp #'o'
|
cmp #'o'
|
||||||
bne CheckString
|
bne CheckPointer
|
||||||
|
|
||||||
; Integer in octal representation
|
; Integer in octal representation
|
||||||
|
|
||||||
@ -585,6 +585,21 @@ CheckOctal:
|
|||||||
jsr ltoa ; Push arguments, call _ltoa
|
jsr ltoa ; Push arguments, call _ltoa
|
||||||
jmp HaveArg
|
jmp HaveArg
|
||||||
|
|
||||||
|
; Check for a pointer specifier (%p)
|
||||||
|
|
||||||
|
CheckPointer:
|
||||||
|
cmp #'p'
|
||||||
|
bne CheckString
|
||||||
|
|
||||||
|
; It's a pointer. Use %#x conversion
|
||||||
|
|
||||||
|
ldx #0
|
||||||
|
stx IsLong ; IsLong = 0;
|
||||||
|
inx
|
||||||
|
stx AltForm ; AltForm = 1;
|
||||||
|
lda #'x'
|
||||||
|
bne IsHex ; Branch always
|
||||||
|
|
||||||
; Check for a string specifier (%s)
|
; Check for a string specifier (%s)
|
||||||
|
|
||||||
CheckString:
|
CheckString:
|
||||||
@ -615,13 +630,13 @@ CheckUnsigned:
|
|||||||
|
|
||||||
CheckHex:
|
CheckHex:
|
||||||
cmp #'x'
|
cmp #'x'
|
||||||
beq @IsHex
|
beq IsHex
|
||||||
cmp #'X'
|
cmp #'X'
|
||||||
bne UnknownFormat
|
bne UnknownFormat
|
||||||
|
|
||||||
; Hexadecimal integer
|
; Hexadecimal integer
|
||||||
|
|
||||||
@IsHex: pha ; Save the format spec
|
IsHex: pha ; Save the format spec
|
||||||
lda AltForm
|
lda AltForm
|
||||||
beq @L1
|
beq @L1
|
||||||
lda #'0'
|
lda #'0'
|
||||||
@ -641,7 +656,7 @@ CheckHex:
|
|||||||
jsr _strlower ; Make characters lower case
|
jsr _strlower ; Make characters lower case
|
||||||
@L2: jmp HaveArg
|
@L2: jmp HaveArg
|
||||||
|
|
||||||
; Unsigned format character, skip it
|
; Unknown format character, skip it
|
||||||
|
|
||||||
UnknownFormat:
|
UnknownFormat:
|
||||||
jmp MainLoop
|
jmp MainLoop
|
||||||
|
Loading…
x
Reference in New Issue
Block a user