sprintf working! (but not snprintf ...)
This commit is contained in:
parent
2fef698195
commit
b9fd2a2b9c
7 changed files with 1724 additions and 65 deletions
14
05/main.b
14
05/main.b
|
@ -1,3 +1,5 @@
|
|||
#define G_DEBUG 0
|
||||
|
||||
; add 24 + 16 = 40 to the stack pointer to put argc, argv in the right place
|
||||
byte 0x48
|
||||
byte 0x81
|
||||
|
@ -8,7 +10,6 @@ byte 0
|
|||
byte 0
|
||||
goto main
|
||||
|
||||
|
||||
global object_macros_size
|
||||
global function_macros_size
|
||||
; these are allocated in main()
|
||||
|
@ -86,6 +87,15 @@ global functions_required_stack_space
|
|||
#include parse.b
|
||||
#include codegen.b
|
||||
|
||||
function debug_puts
|
||||
argument str
|
||||
if G_DEBUG == 0 goto return_0
|
||||
return puts(str)
|
||||
function debug_putsln
|
||||
argument str
|
||||
if G_DEBUG == 0 goto return_0
|
||||
return putsln(str)
|
||||
|
||||
function types_init
|
||||
argument _types
|
||||
argument ptypes_bytes_used
|
||||
|
@ -208,7 +218,7 @@ function main
|
|||
local i
|
||||
local output_fd
|
||||
local memory
|
||||
|
||||
|
||||
memory = malloc(4000)
|
||||
statement_datas = memory
|
||||
statement_datas_ends = memory + 400
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue