add printf
This commit is contained in:
parent
b65a0249a5
commit
dce5a43804
@ -11,7 +11,7 @@ INCLUDE_STRING = 1
|
|||||||
|
|
||||||
|
|
||||||
.scope str
|
.scope str
|
||||||
Import str, strf
|
Import str, strf, printf_buffer
|
||||||
Import str, hex_char_to_uint8, hex_str_to_uint
|
Import str, hex_char_to_uint8, hex_str_to_uint
|
||||||
Import str, uint8_to_hex_str, uint_to_hex_str
|
Import str, uint8_to_hex_str, uint_to_hex_str
|
||||||
|
|
||||||
@ -74,5 +74,10 @@ Import str, uint8_to_hex_str, uint_to_hex_str
|
|||||||
; .out .sprintf("info: Strf: called with %d arguments", @N_ARGS)
|
; .out .sprintf("info: Strf: called with %d arguments", @N_ARGS)
|
||||||
.endmacro
|
.endmacro
|
||||||
|
|
||||||
|
.macro Printf fmt,x0,x1,x2,x3,x4,x5,x6,x7,x8,x9
|
||||||
|
Strf fmt,str::printf_buffer,x0,x1,x2,x3,x4,x5,x6,x7,x8,x9
|
||||||
|
PrintNC str::printf_buffer
|
||||||
|
.endmacro
|
||||||
|
|
||||||
.endscope
|
.endscope
|
||||||
.endif ; guard
|
.endif ; guard
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
.include "string.h65"
|
.include "string.h65"
|
||||||
Export str, strf
|
Export str, strf, printf_buffer
|
||||||
|
|
||||||
|
.bss
|
||||||
|
printf_buffer: .res $41
|
||||||
|
|
||||||
.zeropage
|
.zeropage
|
||||||
fmt_idx: .res 1
|
fmt_idx: .res 1
|
||||||
|
Loading…
Reference in New Issue
Block a user