diff --git a/hasm b/hasm index 2764b58..e32d7c5 100755 Binary files a/hasm and b/hasm differ diff --git a/headers/hasm.h b/headers/hasm.h index 36fbd15..57d9736 100644 --- a/headers/hasm.h +++ b/headers/hasm.h @@ -2,3 +2,4 @@ #include static uint64_t c_source_letter = 0; +void usage(int err); diff --git a/src/hasm.c b/src/hasm.c index fcb620b..723610f 100644 --- a/src/hasm.c +++ b/src/hasm.c @@ -1,9 +1,23 @@ #include +#include #include "file_buffer.h" +void usage(int err) +{ + FILE* dest = err ? stderr : stdout; + + fprintf(dest, "Usage: hasm [option] [file]\n"); + fprintf(dest, "-I set default include directory\n"); + fprintf(dest, "-v shows you your version of HASM\n"); + fprintf(dest, "-h shows you this helpmap\n"); + + exit(err ? -1 : 0); +} + int main(int argc, char** argv) { read_filesrc("examples/test.hasm"); + usage(1); return 0; }