uxn/uxn.c

39 lines
732 B
C
Raw Normal View History

2021-01-29 19:17:59 +00:00
#include <stdio.h>
2021-01-29 19:35:59 +00:00
/*
2021-01-29 19:17:59 +00:00
Copyright (c) 2021 Devine Lu Linvega
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE.
*/
2021-01-29 19:35:59 +00:00
typedef unsigned char Uint8;
#define STACK_DEPTH 256
Uint8 data[STACK_DEPTH];
Uint8 address[STACK_DEPTH];
void
stackprint(Uint8 *stack)
{
int i;
for(i = 0; i < STACK_DEPTH; ++i) {
if(i % 16 == 0)
printf("\n");
printf("%02x ", stack[i]);
}
printf("\n");
}
2021-01-29 19:17:59 +00:00
int
main(int argc, char *argv[])
{
printf("hello\n");
2021-01-29 19:35:59 +00:00
stackprint(data);
2021-01-29 19:17:59 +00:00
return 0;
}