From eee77999764131bd35ce2c471d32cd0b6e85f598 Mon Sep 17 00:00:00 2001 From: Tucker Evans Date: Tue, 8 Oct 2019 20:41:09 -0400 Subject: Add write function assembly --- pc.l | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pc.l') diff --git a/pc.l b/pc.l index 553d495..eb8b4ea 100644 --- a/pc.l +++ b/pc.l @@ -43,6 +43,11 @@ output { tmp->func_info->argc = -1; tmp->func_info->argv = NULL; + fprintf(stdout, ".data\n"); + fprintf(stdout, "int_print:\n\t .asciz \"%%d\\n\"\n"); + fprintf(stdout, "float_print:\n\t .asciz \"%%f\\n\"\n.text\n"); + + return IO; } -- cgit v1.1