Skip to content

Commit

Permalink
Add usage map
Browse files Browse the repository at this point in the history
  • Loading branch information
LeotendoDev committed Mar 20, 2022
1 parent 43b38a9 commit 6856c4d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
Binary file modified hasm
Binary file not shown.
1 change: 1 addition & 0 deletions headers/hasm.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
#include <stdint.h>

static uint64_t c_source_letter = 0;
void usage(int err);
14 changes: 14 additions & 0 deletions src/hasm.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
#include <stdio.h>
#include <stdlib.h>

#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;
}

0 comments on commit 6856c4d

Please sign in to comment.