Skip to content

Commit

Permalink
sim: added INFO macro
Browse files Browse the repository at this point in the history
  • Loading branch information
agkaminski committed May 8, 2018
1 parent d39a13e commit 1c2a5a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion simulator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ OBJ = addrmode.o alu.o bus.o core.o decoder.o exec.o main.o memory.o serial.o
$(CC) -c -o $@ $< $(CFLAGS)

$(OUT): $(OBJ)
gcc -o $@ $^ $(CFLAGS) $(LIBS)
gcc -o $@ $^ $(LIBS)

.PHONY: clean

Expand Down
6 changes: 6 additions & 0 deletions simulator/error.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,10 @@
fprintf(stderr, "\n" RESET); \
} while (0)

#define INFO(msg, ...) do { \
printf("[INFO] "); \
printf(msg, ##__VA__ARGS__); \
printf("\n"); \
} while (0)

#endif

0 comments on commit 1c2a5a1

Please sign in to comment.