From 6856c4da88c261bd210c34b1380251ae84e0bf8e Mon Sep 17 00:00:00 2001 From: LeotendoDev Date: Sun, 20 Mar 2022 15:47:02 +0100 Subject: [PATCH] Add usage map --- hasm | Bin 16480 -> 16608 bytes headers/hasm.h | 1 + src/hasm.c | 14 ++++++++++++++ 3 files changed, 15 insertions(+) diff --git a/hasm b/hasm index 2764b584d388c98a4604f96d2ca5355775975bbe..e32d7c5d8bf7b99b5d5da303596cc5630cc6f2d1 100755 GIT binary patch delta 2378 zcmZuzYfO_@7(S;LYLP-)UPIy6R@kqM(_YU4FP9&Nwo0nFgm(NOoa~`t3d6Wn;uc&i9=2JnwtX zdrseT4&&W)JWBgBtS8MxDsCBww=|YFoY*i&?l#Pc-E<@#(8|37TCh@wag55{F{q`2 zu}35Ku0oXlWglU3Z#GuQG^v0OHILH1e;Q%+N2ZSbaVGX~>o=Fuzq?%a5ggX$vSc*l zqbG24-k@d;=TfjPTd+S1#{VmceG0H;o%Z-P%Jz<7lYKG3C6KTw?wMsykA zMZ2}UM=!z@S`_GXkfTpCR^eC{l1YYOnZDW<3OBYy!lX444iRko+uMo1BN&Db{cw#I zL(ocp=pwb75tR)iX~Ce05FOc}aFKaIBSGtKrGGj$h|AEB{oqTmIfpDrW0|a!QQ2Tp zr|@3)|9LMQPuK`qh9uLpOIG-vm|%gymdSTSEkka(rAJ7CVnf_ir!WR&=EiRu;)Vh9 zkV#y8LLel-$$PEvv3X(LA>3avU5o7RO^%f8_fR3k(^nZo#?z-*sSn z&q&xPj;CaIbGu6lqPvN#hQqaYEIv?!rd_clRoa+{<_YK(i0vn#5m!>_vSbIj#W#K^Qc}`$( zi;}r^W#aRvqNwW6KSLjwq36ud^A!Jfu6v&`fuInFZ_9RJMPnKZz3T}Y7nkZ-HMj0Jq5ZERypYdF}leG}W*6m0fyO5}QeEn_U?53@#p zlP}U7X2I=Snj?*V));K}Zwa@w?~=?&{tj*zXxSNJyILZ=wzD1n_7IN8TAG-r>W#ID zBtJ0ID4B%=!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*e#7&i8A8yioYBqtL`Upa9CE*mfGrKAFXtg+q*B3~TR5Rc;!4CEN+ z#<$1K1T_h6U(UXdLl!Xae5Ku=5s}7L4ry4W0f}&aDDp5r1V2|k@7%^!4A#S%!PcP$ zUNG5dEzFqm`A=+)s#!}87A;K!x6!9G+GIlhc-33)dP|Ln&4lKViOm>i8Fa5F8e?hW zUta7_-AI^~wR%^Q3BTls`nakOybMiZGhK!*ac6r7DKft2Kx{Jf5r&f3^u0uFEFEHb zl*SCcOGgw%xoK>Gr0BC-rY9c6rpL?p)dO`*{dMUPjDq*9`-Rswp=jONeHde6(}k;y zzs@!mwRdnynfBRDMfqhomYynNCpOc#rt+)I)wT(;P3pY2fsXW4iTRPe!pxbeGB?kt z-lx`&#vU`YdN6mwSo(M)KWUq&fsv}>tYm;$>2W`8s_129XvC*{Ur|O8$I6N_fEfQx zQ8I|{A}%6+fVcwxNNqbDsMv)J={Kpx(1Kl-C5ai55OO!|Zbs`6KDSWWib$e$mbZny zwUr|^Cbsj;e+r*fn0GfB&tq>nUvRgvv3=^)OGPgYezeF4P_Ii^w8Ep_!?X)hUKd?~ zd2g65z#Xs49pUGb0~u8h3?X`@6~Qgb)B}UEi&nvL`6sMatqs9TzKhNkbuKzbNIP}~ zf_n#Uzul=1M)yC59g3&s9T@b>Gy^IBi^6pg?)vvp33hkvr#?8|anSi44qhS-G7!-N zH5`WM9=rb-dad}0Z}}m(%SEpvZ^5YemZ&#blrzhsgnF`QeK_YC)q4rOBF2vJSbdgX zsNP#V^VaeF2umII)4#G%6ujk9sSa;|rnI3bsx4cN|118{$}me~ZHrI<7zz z*($xTI5tD7S2laN<$=$7gQ8x1Iu?QU$)aAOIxax8?=($90e$*f=~xdmBv 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; }