mirror of
https://github.com/cc65/cc65.git
synced 2025-02-26 07:29:25 +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:
|
||||
cmp #'o'
|
||||
bne CheckString
|
||||
bne CheckPointer
|
||||
|
||||
; Integer in octal representation
|
||||
|
||||
@ -585,6 +585,21 @@ CheckOctal:
|
||||
jsr ltoa ; Push arguments, call _ltoa
|
||||
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)
|
||||
|
||||
CheckString:
|
||||
@ -615,13 +630,13 @@ CheckUnsigned:
|
||||
|
||||
CheckHex:
|
||||
cmp #'x'
|
||||
beq @IsHex
|
||||
beq IsHex
|
||||
cmp #'X'
|
||||
bne UnknownFormat
|
||||
|
||||
; Hexadecimal integer
|
||||
|
||||
@IsHex: pha ; Save the format spec
|
||||
IsHex: pha ; Save the format spec
|
||||
lda AltForm
|
||||
beq @L1
|
||||
lda #'0'
|
||||
@ -641,7 +656,7 @@ CheckHex:
|
||||
jsr _strlower ; Make characters lower case
|
||||
@L2: jmp HaveArg
|
||||
|
||||
; Unsigned format character, skip it
|
||||
; Unknown format character, skip it
|
||||
|
||||
UnknownFormat:
|
||||
jmp MainLoop
|
||||
|
Loading…
x
Reference in New Issue
Block a user