8

a CHIP-8 emulator
Log | Files | Refs | README

commit 843bda1dd605a7dfbeab4349669945d6ae71d5ac
parent d804131ea9e814054e08ce16e90009b87b199522
Author: Naveen Narayanan <nan@sysgo.com>
Date:   Sun,  6 Mar 2022 16:17:48 +0100

Add usage()

Diffstat:
M8.c | 12+++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/8.c b/8.c @@ -292,8 +292,18 @@ cycle() } } +static void +usage() +{ + fprintf(stderr, "usage: 8 file.rom\n"); + exit(1); +} + int main(int argc, char **argv) { - printf("Welcome to 8\n"); + if (argc < 2) + usage(); + + return 0; }