summaryrefslogtreecommitdiff
path: root/skullfuck.c
diff options
context:
space:
mode:
Diffstat (limited to 'skullfuck.c')
-rw-r--r--skullfuck.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/skullfuck.c b/skullfuck.c
index a8de668..1c41dc9 100644
--- a/skullfuck.c
+++ b/skullfuck.c
@@ -37,7 +37,7 @@
#define DEC_DATA "\tdecb (%rsi)\n"
#define SUB_DATA "\tsubb $0x%x, (%%rsi)\n"
#define ZERO_DATA "\tmovb $0x00, (%rsi)\n"
-#define PRINT_DATA "\tmovq $0x01, %rax\n" \
+#define WRITE_DATA "\tmovq $0x01, %rax\n" \
"\tmovq $0x01, %rdi\n" \
"\tsyscall\n"
#define READ_DATA "\tmovq $0x00, %rax\n" \
@@ -71,7 +71,7 @@
#define DEC_DATA "\tdecb (%ecx)\n"
#define SUB_DATA "\tsubb $0x%x, (%%ecx)\n"
#define ZERO_DATA "\tmovb $0x00, (%ecx)\n"
-#define PRINT_DATA "\tmovl $0x04, %eax\n" \
+#define WRITE_DATA "\tmovl $0x04, %eax\n" \
"\tmovl $0x01, %ebx\n" \
"\tint $0x80\n"
#define READ_DATA "\tmovl $0x03, %eax\n" \
@@ -98,7 +98,7 @@
#define MAX_CELLS 30000
#define MAX_LOOP_DEPTH 64
-#define SKULLFUCK_VERSION "0.2.0"
+#define SKULLFUCK_VERSION "0.3.0"
#define EXIT_SUCCESS 0
#define EXIT_FAILURE 1
@@ -161,7 +161,7 @@ static int optimize_loops(char **in) {
the collection of adjacent `op` characters, and returns the number
of operations counted. */
static int reduce(char **in, char op) {
- int i;
+ int i;
for (i = 0; (*in)[i] == op; i++);
*in += i - 1;
return i;
@@ -210,7 +210,7 @@ static void write_instructions(FILE *out, char *in) {
}
break;
case '.':
- fputs(PRINT_DATA, out);
+ fputs(WRITE_DATA, out);
break;
case ',':
fputs(READ_DATA, out);